CN112532719B - Information stream pushing method, device, equipment and computer readable storage medium - Google Patents

Information stream pushing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112532719B
CN112532719B CN202011356004.5A CN202011356004A CN112532719B CN 112532719 B CN112532719 B CN 112532719B CN 202011356004 A CN202011356004 A CN 202011356004A CN 112532719 B CN112532719 B CN 112532719B
Authority
CN
China
Prior art keywords
server
request
pushing
transfer protocol
information stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011356004.5A
Other languages
Chinese (zh)
Other versions
CN112532719A (en
Inventor
张鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011356004.5A priority Critical patent/CN112532719B/en
Publication of CN112532719A publication Critical patent/CN112532719A/en
Application granted granted Critical
Publication of CN112532719B publication Critical patent/CN112532719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

The application provides a pushing method, a pushing device, pushing equipment and a computer readable storage medium of an information stream; the method comprises the following steps: responding to the push triggering operation, and sending a request of a hypertext transfer protocol carrying a first head mark to a server; the first head mark is used for prompting the server to continuously receive the pushed video information stream; continuously collecting video information streams, and continuously pushing the video information streams to a server through a request of a hypertext transfer protocol; responding to the pushing end operation, stopping collecting the video information stream, and determining a pushing end prompting mode corresponding to the first head mark based on the first head mark; and prompting the server to finish the pushing flow by a pushing flow finishing prompting mode corresponding to the first head mark. By means of the method and the device, scene limitation of video information stream pushing can be reduced by means of cloud technology.

Description

Information stream pushing method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to cloud technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for pushing an information stream.
Background
Live broadcast is an emerging online social mode, and multimedia contents such as on-site audio and video at a live broadcast end can be shared to different users on line for watching in real time through a cloud technology. When live broadcasting is carried out, the live broadcasting end needs to push live broadcasting content, namely video information streams to a live broadcasting server in an uninterrupted mode, and the live broadcasting server distributes the received video information streams to terminals of audiences, so that live broadcasting real-time playing is achieved. In the related art, a protocol for pushing a video information stream during live broadcast has a smaller range of push scenes that can be covered, so that the scene limitation of video information stream pushing is higher.
Disclosure of Invention
The embodiment of the application provides a pushing method, device and equipment of information streams and a computer readable storage medium, which can reduce scene limitation of video information stream pushing.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a pushing method of an information stream, which comprises the following steps:
responding to the push triggering operation, and sending a request of a hypertext transfer protocol carrying a first head mark to a server; the first head identifier is used for prompting the server to continuously receive the pushed video information stream;
Continuously collecting the video information stream, and continuously pushing the video information stream to the server through the request of the hypertext transfer protocol;
stopping collecting the video information stream in response to a pushing end operation, and determining a pushing end prompting mode corresponding to the first head mark based on the first head mark;
and prompting the server that the pushing flow is ended by a pushing flow ending prompting mode corresponding to the first head mark.
In some embodiments of the present application, after the sending the request for the hypertext transfer protocol carrying the first header identifier to the server, the continuously collecting the video information stream, and before continuously pushing the video information stream to the server through the request for the hypertext transfer protocol, the method further includes:
receiving a connection success message returned by the server aiming at the request of the hypertext transfer protocol;
and responding to the connection success message, continuously collecting the video information stream, and continuously pushing the video information stream to the server through the request of the hypertext transfer protocol.
In some embodiments of the present application, after the request for carrying the encoded data block of the preset size on the hypertext transfer protocol is sent to the server to prompt the server to push, the method further includes:
And sending any request message to the server by using the request of the hypertext transfer protocol.
The embodiment of the application provides a pushing method of an information stream, which comprises the following steps:
receiving a request of a hypertext transfer protocol carrying a first head identifier sent by a push stream device;
responding to the request of the hypertext transfer protocol, and continuously reading out a video information stream from the request of the hypertext transfer protocol;
and stopping reading the video information stream from the request of the hypertext transfer protocol when the pushing equipment detects that the pushing equipment utilizes the pushing ending prompt mode corresponding to the first head mark to prompt that the pushing is ended.
In some embodiments of the present application, after the stopping reading the video information stream from the request for the hypertext transfer protocol, the method further comprises:
determining a pulling flow ending prompt mode corresponding to a second head identifier of the pulling flow equipment based on the second head identifier;
and prompting the end of the pulling device by using a pulling end prompting mode corresponding to the second head mark.
The embodiment of the application provides a pushing method of an information stream, which comprises the following steps:
when a streaming operation is detected, a streaming message is sent to a server, and a video presentation interface is displayed;
Receiving a response of the server to the hypertext transfer protocol sent by the pull stream message;
continuously analyzing video stream information from the response of the hypertext transfer protocol; the video information stream is transmitted to the server by the streaming pushing device through a request of a hypertext transfer protocol carrying a first head mark for prompting the server to continuously receive the pushed video information stream;
and displaying the video information stream on the live broadcast presentation interface.
In some embodiments of the present application, after continuously parsing out video stream information from the response of the hypertext transfer protocol, the method further comprises:
stopping analyzing the video information stream from the response of the hypertext transfer protocol and displaying ending prompt information on the video presentation interface when detecting that the response of the hypertext transfer protocol carries a coded data block with a preset size; or,
and stopping analyzing the video information stream from the response of the hypertext transfer protocol when the response of the hypertext transfer protocol is detected to be closed, and displaying the ending prompt information on the video presentation interface.
An embodiment of the present application provides a plug-flow device, which is characterized by comprising:
the first sending module is used for responding to the push triggering operation and sending a request of the hypertext transfer protocol carrying the first head mark to the server; the first head identifier is used for prompting the server to continuously receive the pushed video information stream; and continuing to push the video information stream to the server via the hypertext transfer protocol request;
the video recording module is used for continuously collecting the video information stream; stopping collecting the video information stream in response to a push ending operation;
the prompt determination module is used for determining a pushing flow ending prompt mode corresponding to the first head mark based on the first head mark;
and the prompt execution module is used for prompting the server to finish the pushing flow through a pushing flow finishing prompt mode corresponding to the first head mark.
In some embodiments of the present application, the first head identifier comprises: the method comprises the steps of transmitting head identifiers by block coding, wherein a push flow ending prompting mode corresponding to the first head identifier comprises the following steps: prompting the end of push based on carrying a coded data block of a preset size in the request of the hypertext transfer protocol;
And the prompt execution module is further used for carrying the coded data block with the preset size on the request of the hypertext transfer protocol, sending the coded data block to the server, and prompting the server to finish pushing.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark comprises the following steps: prompting a push end based on a request to close the hypertext transfer protocol;
and the prompt execution module is also used for closing the request of the hypertext transfer protocol and prompting the server to push the stream to end.
In some embodiments of the present application, the plug flow device further includes: a first receiving module;
the first receiving module is used for receiving a connection success message returned by the server aiming at the request of the hypertext transfer protocol;
the video recording module is further used for responding to the connection success message and continuously collecting the video information stream;
the first sending module is further configured to continuously push the video information stream to the server according to the request of the hypertext transfer protocol.
In some embodiments of the present application, the first sending module is further configured to send an arbitrary request message to the server by using the request of the hypertext transfer protocol.
An embodiment of the present application provides an information distribution apparatus, including:
the second receiving module is used for receiving a request of the hypertext transfer protocol carrying the first head mark sent by the push stream equipment;
the information reading module is used for responding to the request of the hypertext transfer protocol and continuously reading out a video information stream from the request of the hypertext transfer protocol; and stopping reading the video information stream from the request of the hypertext transfer protocol when the pushing equipment detects that the pushing equipment utilizes the pushing ending prompt mode corresponding to the first head mark to prompt that the pushing is ended.
In some embodiments of the present application, the first head identifier comprises: the method comprises the steps of transmitting head identifiers by block coding, wherein a push flow ending prompting mode corresponding to the first head identifier comprises the following steps: prompting the end of push based on carrying a coded data block of a preset size in the request of the hypertext transfer protocol;
and the information reading module is further used for stopping reading the video information stream from the request of the hypertext transfer protocol when the request of the hypertext transfer protocol is detected to carry the encoded data block with the preset size.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark comprises the following steps: prompting a push end based on a request to close the hypertext transfer protocol;
The information reading module is further configured to stop reading the video information stream from the request of the hypertext transfer protocol when detecting that the request of the hypertext transfer protocol is closed.
In some embodiments of the present application, the information distribution apparatus further includes: a second transmitting module;
the second receiving module is further configured to receive a pull stream message sent by the pull stream device; the streaming message is used for pulling the video information stream;
the second sending module is used for responding to the streaming message and sending a response of the hypertext transfer protocol carrying the second header identification to the streaming equipment; the second header identifier is used for prompting the streaming device to continuously receive the video information stream; and continuously transmitting the video information stream to the streaming equipment through the response of the hypertext transfer protocol.
In some embodiments of the present application, the second sending module is further configured to send a connection success message of the request for the hypertext transfer protocol to a push device.
In some embodiments of the present application, the information distribution apparatus further includes: a pulling flow ending prompt module;
the pull-stream ending prompting module is used for determining a pull-stream ending prompting mode corresponding to the second head identifier of the pull-stream equipment based on the second head identifier; and prompting the end of the pulling device by using a pulling end prompting mode corresponding to the second head mark.
In some embodiments of the present application, the pull-stream end prompting module is further configured to carry the encoded data block with the preset size on a response of the hypertext transfer protocol, send the encoded data block to the pull-stream device, and prompt the pull-stream device to end the pull-stream; or closing the response of the hypertext transfer protocol to prompt the end of the streaming equipment.
The embodiment of the application provides a draw stream device, which comprises:
the third sending module is used for sending a streaming message to the server when the streaming operation is detected;
the information display module is used for displaying the live broadcast presentation interface;
a third receiving module, configured to receive a response of the server to the hypertext transfer protocol sent by the pull-stream message;
the information flow analysis module is used for continuously analyzing the video flow information from the response of the hypertext transfer protocol; the video information stream is transmitted to the server by the streaming pushing device through a request of a hypertext transfer protocol carrying a first head mark for prompting the server to continuously receive the pushed video information stream;
and the information display module is also used for displaying the video information stream on the live broadcast presentation interface.
In some embodiments of the present application, the information flow parsing module is further configured to stop parsing the video information flow from the response of the hypertext transfer protocol and display end prompt information on the video presentation interface when detecting that the response of the hypertext transfer protocol carries a coded data block of a preset size; or stopping analyzing the video information stream from the response of the hypertext transfer protocol when the response of the hypertext transfer protocol is detected to be closed, and displaying the ending prompt information on the video presentation interface.
The embodiment of the application provides a plug flow device, which comprises:
the first memory is used for storing executable information stream pushing instructions;
and the first processor is used for realizing the pushing method of the information flow provided by the pushing equipment side when executing the executable information flow pushing instruction stored in the first memory.
The embodiment of the application provides a server, which comprises:
the second memory is used for storing executable information stream pushing instructions;
and the second processor is used for realizing the information flow pushing method provided by the server side in the embodiment of the application when executing the executable information flow pushing instruction stored in the second memory.
The embodiment of the application provides a drawing device, which comprises:
the third memory is used for storing executable information stream pushing instructions;
and the third processor is used for realizing the information flow pushing method provided by the streaming equipment side in the embodiment of the application when executing the executable information flow pushing instruction stored in the third memory.
The embodiment of the application provides a computer readable storage medium, which stores executable information stream pushing instructions, and is used for realizing the information stream pushing method provided by the pushing equipment side of the embodiment of the application when a first processor is caused to execute the information stream pushing instructions; or when the second processor is caused to execute, the pushing method of the information flow provided by the server side in the embodiment of the application is realized; and when the third processor is caused to execute, the pushing method of the information flow provided by the streaming equipment side in the embodiment of the application is realized.
The embodiment of the application has the following beneficial effects: the push device pushes the live information stream through the request of the hypertext transfer protocol, and by means of the wide use of the hypertext transfer protocol, the video information stream can be continuously pushed to the server no matter an application program, a browser and the like in the push device, namely, the push device can realize the whole coverage of the push scene on the Internet by only using one transfer protocol, so that the push scene is richer, and the scene limitation of the push of the video information stream is reduced.
Drawings
FIG. 1 is a schematic diagram of an alternative architecture of an information flow pushing system 100 provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of the plug-flow device in fig. 1 according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of the server in fig. 1 according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of the drawing device in fig. 1 according to an embodiment of the present application;
fig. 5 is a schematic flow chart of an alternative method for pushing an information flow according to an embodiment of the present application;
fig. 6 is a second flowchart of an alternative method for pushing an information flow according to an embodiment of the present application;
fig. 7 is a schematic flow chart of pushing a live stream and pulling a live stream based on an HTTP protocol according to an embodiment of the present application;
fig. 8 is a schematic diagram of a process for a media server to read a live stream according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
Before further describing embodiments of the present application in detail, the terms and expressions that are referred to in the embodiments of the present application are described, and are suitable for the following explanation.
1) Cloud Technology (Cloud Technology) refers to a hosting Technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied by the cloud computing business mode, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to the subsequent embodiment for logic processing, the data with different levels can be processed separately, and the data of various industries needs strong system rear shield support and can be realized only through cloud computing.
2) Live broadcast can be realized, and a spectator can watch remote site live through a network, namely, a party initiating live broadcast shares multimedia contents such as on-site audio, video and the like to the spectator in real time. Live broadcast is an emerging social way, with more and more users on the network.
3) The video information stream pushing refers to pushing live broadcast content, namely live broadcast information stream composed of multimedia content, to a server uninterruptedly so that the server can distribute the information stream to terminals of viewers watching live broadcast, and the live broadcast process is realized.
4) The push stream device is a terminal for generating a multimedia information stream, namely a terminal used when a so-called anchor is used for live broadcasting, namely a live broadcasting terminal.
5) And the streaming equipment is used for receiving the multimedia information stream, namely a terminal used by a viewer when watching live broadcast, namely a playing end. In one live broadcast, the number of playing devices may be 0 to N.
6) The server is a bridge between the live broadcast end and the playing end. In live broadcast, the push device sends the generated multimedia information stream to a server, and the server distributes the multimedia information stream to a viewer terminal.
7) The hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP), which is one of the protocols of the application layer, is the most widely used network protocol on the internet.
Live broadcast is used as an emerging online social mode, and multimedia contents such as audio and video on site at a live broadcast end can be shared to different users on line in real time for watching, so that the online social mode is richer. When live broadcasting is carried out, the live broadcasting end is responsible for generating live broadcasting content, namely generating a live broadcasting information stream of multimedia, and then pushing the live broadcasting information stream to the live broadcasting server uninterruptedly. The live broadcast server distributes the received information stream to the terminal of the audience, namely to the playing end, and the playing end plays the received multimedia live broadcast information stream, thereby realizing the real-time playing of live broadcast.
In the live field, protocols that can be used for live information stream push are not in minority, and there are: real-time messaging protocol (Real Time Messaging Protocol, RTMP) and variants thereof, real-time streaming protocol (Real Time Streaming Protocol, RTSP) based on Real-time transport protocol (Real-time Transport Protocol, RTP) or Real-time transport control protocol (Real-time Transport Control Protocol, RTCP), streaming media network protocol (HTTP Live Streaming, HLS) based on hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP), full duplex communication protocol (WebSocket) based on TCP, and Web Real-time communication (Web Real-Time Communication, webRTC).
RTMP is a protocol developed for audio, video and data transfer between Flash players and servers. There are three varieties of RTMP, respectively: the plain text protocol operating on top of TCP uses port 1935, RTMPT (penetrable firewall) encapsulating RTMP in HTTP requests, and RTMPs encapsulating RTMP in HTTPs. RTMP and its variants employ real-time streaming, which has its own handshaking and has its own user control commands, e.g. Creat, publish, play, unpublish, etc., by which RTMP is very suitable for pushing information streams on live, even when pushing live information streams, using less than that many control commands. The RTMP has the advantages of simple realization and simpler access, can meet the pushing requirement of live information streams, and can directly push the live information streams as long as the Flash plug-in is loaded on the browser.
However, RTMP has not been updated for a long time, and RTMP itself is not compatible with video in encoding format h.265, and does not support audio at sampling rates above 44.1 k. Moreover, flash is not popular any more and is rarely used, so that RTMP cannot be directly watched in a browser or possibly cannot pass through a firewall, so that the RTMP cannot cover most of live information stream pushing scenes of the internet, and only pushing live information streams by using a webpage supporting Flash can be realized. Meanwhile, a variation RTMPT of RTMP is implemented based on the HTTP protocol, so that live information streams can be pushed using the HTTP protocol, so that a firewall can be penetrated. However, RTMPT is complex to implement, relies on the support of Keep-Alive, acquires a unique ID through one HTTP request, and then initiates a new POST request to transfer data each time there is data. Moreover, the control instructions in the RTMPT protocol are only supported by a specific streaming media server, and are not supported by any other server, so that the use of RTMPT is limited, that is, RTMPT can only cover live information stream pushing scenes with a specific streaming media server, for example, can only push live information streams on a web page supporting Flash.
RTP is a transport protocol for live information streams on the Internet, and consists of two closely linked parts, namely: RTP-transmitting data with real-time properties, RCTP-detects server quality and transmits information of ongoing session participants. The RTP protocol, when established over the user datagram protocol (User Datagram Protocol, UDP), specifies the standard packet format for delivering audio and video over the internet. RTP protocol is used in conjunction with RTCP protocol in streaming media systems, video conferencing and video telephony systems. The RTP protocol does not provide for on-time delivery mechanisms or other quality of service (Quality of Service, qoS) guarantees, so that RTP does not guarantee delivery or prevent out-of-order delivery nor does it determine the reliability of the underlying network. RTP performs ordered transmission, which allows the receiver to reassemble the sender's packet sequence based on sequence numbers, while sequence numbers can also be used to determine the appropriate packet positions, e.g., on video decoding, without requiring sequential decoding. RTCP is the sister protocol of RTP. RTCP provides off-channel control for RTP information streams and periodically transmits control data between participants in a multimedia session, so that the main function of RCTP is to provide feedback for the quality of service provided by RTP. RTCP gathers statistics of related media connections, e.g., number of transport bytes, number of transport packets, number of lost packets, delay jitter, unidirectional and bidirectional network delays, etc. The application may use the information provided by RTCP to improve quality of service, e.g. to limit the information flow, or to use a codec with less compression instead. RTCP itself does not provide data encryption or authentication, its companion protocol Secure Real-time transport protocol (SRTCP) can be used for such purposes.
The RSTP protocol is architecturally located above the RTP protocol and the RTCP protocol, which defines how efficiently a corresponding application transmits multimedia data over an IP network, i.e. defines the streaming format, which is transmitted via RTP. The RTSP can transmit data based on RTP, can select channels such as TCP, UDP, multicast UDP and the like to transmit data, has good expansibility, and is a network application protocol similar to the HTTP protocol. Compared with the RTSP and the HTTP, the HTTP transmits webpage data and multimedia data transmitted by the RTSP; HTTP is requested by the terminal and the server responds, and RTSP may be bi-directional, i.e. both the terminal and the server may issue requests. Although RTSP has a good real-time effect and is suitable for video chat and video detection, RTSP is complex to implement, and information collected according to RTCP can only attempt to improve service quality, not a final means for improving service quality. Most importantly, although the RTSP protocol resembles the HTTP protocol, the HTTP protocol is not actually used, and thus, RTSP cannot push live streams directly in the browser and may not penetrate the firewall.
The HLS directly generates a slice file of the video at the terminal, then uploads the slice file of the live information stream to the server by using an HTTP uploading mode, and then the server updates a play list to achieve the live function. HLS directly uses the HTTP protocol, which facilitates access costs under the internet, however, the delay of HLS is affected by the slice file size and the transmission process is discontinuous. For example, the code rate of the live stream is relatively uniform, but each time a slice file is requested, the bandwidth is suddenly increased by a small peak, so that the live stream with low delay is not suitable for video on demand. It can be seen that HLS does not cover push scenes of live information streams well.
The WebSocket is an upgrade version of the HTTP protocol, and can upgrade the TCP connection used by the HTTP protocol into a bidirectional communication manner, so that the terminal can push the live information stream during live broadcast through the WebSocket, and then the server can read data from the TCP connection. WebRTC is a standard real-time communication protocol in HTML5 that exists for enabling real-time communication of audio and video between two parties. However, webSocket and WebRTC do not have good support at the mobile end and are implemented more heavily and thus are rarely used by the mobile end. It can be seen that WebSocket and WebRTC are harder to cover to the terminal, so that WebSocket and WebRTC are harder to cover to the scene of pushing the live information stream in the terminal.
As can be seen from the above description, the protocols used in the related art when pushing the live information stream have pushing scenes of the live information stream that are difficult to cover, in other words, the protocols used in the related art for pushing the live information stream can only cover one smaller pushing scene of the live information stream, that is, the range of the pushing scenes of the live information stream that can be covered by the protocols is smaller, so that the limitation on the pushing scenes of the live information stream is higher.
And because the data format supported by a part of protocols is limited, the live information stream with a specific format can be pushed only, and the live information stream with some formats can not be pushed during live broadcast, so that the scene limitation of live information stream pushing is further improved. Meanwhile, when a part of protocols push information streams, the information streams need to be sliced, so that the transmission speed of the information streams is unstable when the information streams are pushed. When information stream pushing is carried out based on a part of protocols, the push address only comprises the target address, the release point and the stream ID, so that the flexibility of the push address is low.
Based on the above problems, the application provides a new live information stream pushing mode, so that live information stream pushing can cover any corner of the internet, the range of a pushing scene of the covered live information stream is expanded as much as possible, and the limitation of the scene of live information stream pushing is reduced.
Since the HTTP protocol is the most widely used protocol on the internet, it can be used to pull a live stream, but cannot push a live stream. Pulling live stream information essentially amounts to downloading a large "infinite" file (since the live is not known when it will end, and thus the size of the video pulled is not known). However, the HTTP protocol implements a download scheme for large files of unknown size in two ways: the server uses a special header identifier in a Response message (HTTP Response message) to inform that the size of the live information stream is unknown, so that the terminal only needs to continuously receive the live information stream. For example, the server informs the terminal that the size of the live broadcast information stream to be transmitted is unknown length through a block coding (Transfer-Encoding) header identifier in response, and transmits a data packet to the terminal until the live broadcast is finished, and transmits the last data packet with the size of 0 to indicate the end of the live broadcast; or the server closes the connection (connection) head through unilateral in response, and simultaneously informs the terminal that the size of the live information stream to be sent is unknown by using the head without setting the size of the response body (Content-Length), and when the live broadcast is finished, the server directly disconnects the response, such as the response TCP connection, and the terminal perceives that the response connection generates errors, thereby finishing the live broadcast playing.
The above is a procedure of pulling the direct broadcast stream using the HTTP protocol, however, in the live broadcast stream pushing procedure, the terminal cannot use to notify the server to pull the direct broadcast stream from the terminal by one request, because: pulling the direct-broadcasting information stream means that the server initiates a request to the terminal, but the terminal cannot detect the request initiated by the server due to the existence of the firewall, so that an HTTP request for the server to pull the direct-broadcasting information stream to the terminal cannot be initiated, and the server cannot pull the direct-broadcasting information stream from the terminal.
In the HTTP protocol, a terminal transmits data to a server by a Request message of HTTP (Request message of HTTP). However, in the HTTP protocol, there is no provision that the request method cannot use a special header identification, such as Transfer-Encoding: a locked header or a short link of Content-Length (carrying a Connection header) to continue the transmission of the request-making procedure.
Based on the above-mentioned thought, the embodiments of the present application may continuously push the live information stream to the server by using the request with the same specific header identifier as in the HTTP response method, where the server is responsible for continuously reading out data from the request sent by the terminal.
The embodiment of the application provides a pushing method, device and equipment of information streams and a computer readable storage medium, which can reduce scene limitation of video information stream pushing. The following describes exemplary applications of the push device, the server and the play device provided in the embodiments of the present application, where the push device and the play device provided in the embodiments of the present application may be implemented as various types of user terminals, and may also be implemented as a server. The server of the application may be an independent physical server, may be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms, and the like. The user terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, etc. The user terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein. In the following, exemplary applications of the push device, the play device, and the server will be described.
Referring to fig. 1, fig. 1 is a schematic diagram of an alternative architecture of an information flow pushing system 100 according to an embodiment of the present application, to support an information flow pushing application, a pushing device 200, a server 400, and a pulling device 500 are connected through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two.
When the push device 200 detects a push trigger operation on the "start live" virtual key of the graphical interface 200-1, a request of the hypertext transfer protocol carrying a first header identifier is sent to the server 400 in response to the push trigger operation, where the first header identifier is used to prompt the server to continuously receive the pushed video information stream. The server 400 receives a request for a hypertext transfer protocol carrying a first header identification sent by the push device 200.
The push device 200 then continues to collect the video information stream and send the video information stream to the server 400 as requested by the hypertext transfer protocol. The server 400 continues to read the video information stream from the hypertext transfer protocol request in response to the hypertext transfer protocol request. Meanwhile, when the streaming device 500 detects a streaming operation of the user, a streaming message is sent to the server 400, and a live presentation interface is displayed on the graphical interface 500-1. After receiving the pull message sent by the pull device 500, the server 400 sends, in response to the pull message, a hypertext transfer protocol response carrying a second header identifier to the pull device 500, where the second header identifier is used to prompt the pull device to continuously receive the video information stream, and continuously send the video information stream to the pull device 500 through the hypertext transfer protocol response. After receiving the hypertext transfer protocol response sent by the server 400 for the streaming message, the streaming device 500 continuously parses the video information stream from the hypertext transfer protocol response and presents the video information stream on the live presentation interface.
When the pushing device 200 detects the pushing end operation, the video information stream is stopped being collected in response to the pushing end operation, a pushing end prompting mode corresponding to the first head mark is determined based on the first head mark, and the server 400 is prompted to push end through the pushing end prompting mode corresponding to the first head mark. When the server 400 detects that the push device 200 uses the push end prompting mode corresponding to the first header identifier to prompt that the push is ended, the video information stream is stopped from being read from the request of the hypertext transfer protocol. Meanwhile, the server 400 also uses the pull-end prompting mode corresponding to the second header identifier to prompt the pull-end device 500 that the pull has ended.
Referring to fig. 2, fig. 2 is a schematic structural diagram of the plug-flow device in fig. 1 provided in an embodiment of the present application, and the plug-flow device 200 shown in fig. 2 includes: at least one first processor 210, a first memory 250, at least one first network interface 220, and a first user interface 230. The various components in the push device 200 are coupled together by a first bus system 240. It is appreciated that the first bus system 240 is used to enable connected communications between these components. The first bus system 240 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as first bus system 240 in fig. 2.
The first processor 210 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose processor may be a microprocessor or any conventional processor or the like.
The first user interface 230 includes one or more first output devices 231, including one or more speakers and/or one or more visual displays, that enable presentation of media content. The first user interface 230 also includes one or more first input devices 232 including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The first memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. The first memory 250 optionally includes one or more storage devices physically remote from the first processor 210.
The first memory 250 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (RAM, random Access Memory). The first memory 250 described in embodiments of the present application is intended to comprise any suitable type of memory.
In some embodiments, the first memory 250 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
A first operating system 251 including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a first network communication module 252 for reaching other computing devices via one or more (wired or wireless) first network interfaces 220, the exemplary first network interface 220 comprising: bluetooth, wireless compatibility authentication (Wi-Fi), universal serial bus (USB, universal Serial Bus), and the like;
a first rendering module 253 for enabling the rendering of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more first output devices 231 (e.g., a display screen, a speaker, etc.) associated with the first user interface 230;
a first input processing module 254 for detecting one or more user inputs or interactions from one of the one or more first input devices 232 and translating the detected inputs or interactions.
In some embodiments, the plug-in device provided in the embodiments of the present application may be implemented in a software manner, and fig. 2 shows a plug-in device 255 stored in a first memory 250, which may be software in the form of a program and a plug-in, and includes the following software modules: the first sending module 2551, the video recording module 2552, the prompt determining module 2553, the prompt executing module 2554, and the first receiving module 2555 are logical, and thus may be arbitrarily combined or further split according to the implemented functions. The functions of the respective modules will be described hereinafter.
In other embodiments, the pushing device provided in the embodiments of the present application may be implemented in hardware, and by way of example, the pushing device provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the pushing method of the information flow provided in the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic components.
Exemplary, an embodiment of the present application provides a plug-flow device, including:
the first memory is used for storing executable information stream pushing instructions;
and the first processor is used for realizing the pushing method of the information flow provided by the pushing equipment side when executing the executable information flow pushing instruction stored in the first memory.
Referring to fig. 3, fig. 3 is a schematic structural diagram of the server in fig. 1 provided in an embodiment of the present application, and the server 400 shown in fig. 3 includes: at least one second processor 410, a second memory 450, at least one second network interface 420, and a second user interface 430. The various components in server 400 are coupled together by a second bus system 440. It is appreciated that the second bus system 440 is used to enable connected communication between these components. The second bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 3 as second bus system 440.
The second processor 410 may be an integrated circuit chip with signal processing capabilities such as a general purpose processor, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., where the general purpose processor may be a microprocessor or any conventional processor, etc.
The second user interface 430 includes one or more first output devices 431, including one or more speakers and/or one or more visual displays, that enable presentation of media content. The second user interface 430 also includes one or more second input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The second memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. The second memory 450 optionally includes one or more storage devices physically remote from the second processor 410.
The second memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (RAM, random Access Memory). The second memory 450 described in the embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, the secondary memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
A second operating system 451 including system programs, such as a framework layer, a core library layer, a driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
a second network communication module 452 for reaching other computing devices via one or more (wired or wireless) second network interfaces 420, the exemplary second network interface 420 comprising: bluetooth, wireless compatibility authentication (Wi-Fi), universal serial bus (USB, universal Serial Bus), and the like;
a second presentation module 453 for enabling presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more second output devices 431 (e.g., a display screen, speakers, etc.) associated with the second user interface 430;
a second input processing module 454 for detecting one or more user inputs or interactions from one of the one or more second input devices 432 and translating the detected inputs or interactions.
In some embodiments, the information distribution apparatus provided in the embodiments of the present application may be implemented in a software manner, and fig. 3 shows the information distribution apparatus 455 stored in the second memory 450, which may be software in the form of a program, a plug-in, or the like, including the following software modules: the second receiving module 4551, the information reading module 4552, the second sending module 4553, and the end of pull prompting module 4554 are logical, and thus may be arbitrarily combined or further split according to the implemented functions. The functions of the respective modules will be described hereinafter.
In other embodiments, the information distribution apparatus provided in the embodiments of the present application may be implemented in hardware, and by way of example, the information distribution apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the pushing method of the information flow provided in the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic components.
Exemplary, embodiments of the present application provide a server, including:
the second memory is used for storing executable information stream pushing instructions;
and the second processor is used for realizing the information flow pushing method provided by the server side in the embodiment of the application when executing the executable information flow pushing instruction stored in the second memory.
Referring to fig. 4, fig. 4 is a schematic structural diagram of the drawing device in fig. 1 provided in the embodiment of the present application, and the drawing device 500 shown in fig. 4 includes: at least one third processor 510, a third memory 550, at least one third network interface 520, and a third user interface 530. The various components in the pull-stream device 500 are coupled together by a third bus system 540. It is appreciated that the third bus system 540 is used to enable connected communications between these components. The third bus system 540 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as a third bus system 540 in fig. 4.
The third processor 510 may be an integrated circuit chip with signal processing capabilities such as a general purpose processor, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., where the general purpose processor may be a microprocessor or any conventional processor, etc.
The third user interface 530 includes one or more third output devices 531 that enable presentation of media content, including one or more speakers and/or one or more visual displays. The third user interface 530 also includes one or more third input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The third memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. The third memory 550 may optionally include one or more storage devices physically remote from the third processor 510.
The third memory 550 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (RAM, random Access Memory). The third memory 550 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, the third memory 550 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
A third operating system 551 including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a third network communication module 552 for reaching other computing devices via one or more (wired or wireless) third network interfaces 520, the exemplary third network interface 520 comprising: bluetooth, wireless compatibility authentication (Wi-Fi), universal serial bus (USB, universal Serial Bus), and the like;
a third rendering module 553 for enabling the rendering of information (e.g., a user interface for operating a peripheral device and displaying content and information) via one or more third output devices 531 (e.g., a display screen, speakers, etc.) associated with a third user interface 530;
a third input processing module 554 for detecting one or more user inputs or interactions from one of the one or more third input devices 532 and translating the detected inputs or interactions.
In some embodiments, the pulling device provided in the embodiments of the present application may be implemented in a software manner, and fig. 4 shows a pulling device 555 stored in a third memory 550, which may be software in the form of a program, a plug-in, or the like, including the following software modules: the third sending module 5551, the information presentation module 5552, the third receiving module 5553, and the information flow parsing module 5554 are logical, and thus may be arbitrarily combined or further split according to the implemented functions. The functions of the respective modules will be described hereinafter.
In other embodiments, the current pulling apparatus provided in the embodiments of the present application may be implemented in hardware, and by way of example, the current pulling apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the pushing method of the information stream provided in the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic components.
Exemplary, embodiments of the present application provide a pull-stream device, including:
the third memory is used for storing executable information stream pushing instructions;
and the third processor is used for realizing the information flow pushing method provided by the streaming equipment side in the embodiment of the application when executing the executable information flow pushing instruction stored in the third memory.
In the following, an exemplary application and implementation of the push device, the server, and the pull device provided in the embodiments of the present application will be described. It should be noted that, the method for pushing the information flow provided by the application may be implemented by means of cloud technology.
Referring to fig. 5, fig. 5 is a schematic flow diagram of an alternative method for pushing an information stream according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 5.
S101, a streaming device responds to a streaming triggering operation and sends a request of a hypertext transfer protocol carrying a first head mark to a server; the first header identification is used to prompt the server to continue receiving the pushed video information stream.
The live broadcast method and the live broadcast device are realized in a scene that a user transmits live broadcast content to a server through a plug-flow device, for example, the live broadcast application program of a smart phone is used for uploading the live broadcast where the user is located to the server in real time, or the webpage of a personal computer is used for uploading the live broadcast where the user is located to the server in real time. In the running state of the push device, whether a user performs push triggering operation is detected, when the push triggering operation triggered by the user is detected, the push device definitely starts live broadcasting at the current user, so that the push device can respond to the push triggering operation triggered by the user to generate a request of a hypertext transfer protocol, the request of the hypertext transfer protocol is carried with the generated first head mark, and then the request of the hypertext transfer protocol carrying the first head mark is sent to a server through a network, so that the server definitely starts pushing video information flow at the current requirement of the push device. The server receives a request of a hypertext transfer protocol carrying a first head identifier sent by a push stream device.
It should be noted that, since the push device does not know when the user ends the live broadcast, that is, the video information stream to be sent is unknown to the push device, and is infinite, in order to ensure that no clip and delay occurs in the live broadcast as much as possible, the push device can utilize a long connection to continuously push the video information stream during the push, so that the server is ensured to continuously receive the video information stream without disconnection. Therefore, when the pushing device needs to start pushing the video information stream, the first head mark for prompting the server to continuously receive the video information stream is generated, the first head mark is carried in the hypertext transfer protocol and is sent to the server, so that the server is informed that the size of the video information stream to be transmitted is unknown, and the pushing device and the server are always in a connection state in the live broadcast process.
It will be appreciated that in some embodiments of the present application, the push triggering operation may be a triggered operation event of the user on the display interface of the push device, for example, the user clicking a "start live" virtual key on a live web page, or clicking a "live to everyone" virtual key on the main interface of the live application. The operation event triggered by the user on the display interface of the push device may be a click, a double click, or a long press, which is not limited herein.
In other embodiments of the present application, the push triggering operation may also be a voice command of the user, for example, a statement that the user speaks that "live broadcast is started now" or a sound with a specific rhythm that the user utters may be the push triggering operation. Further, before the live broadcast starts, the user can record the sound for starting the live broadcast on the push device, so that when the push device detects the sound similar to the recorded sound, the current detection of the push triggering operation of the user is confirmed.
The first header identifier is a header identifier selected from all available header identifiers of the hypertext transfer protocol, and is capable of indicating that the size of the transferred data is unknown. In some embodiments, the push device may use the block coded transport header identification as the first header identification. In other embodiments, the push device may use the unilateral closed connection header identifier as the first header identifier without indicating the size of the video information stream to inform that the size of the video information stream is unknown.
Illustratively, the push device may use the Transfer-encoding in the Request of HTTP (HyperText Transfer protocol) header (chuckly encoded transport header identification) to inform the server that the video stream size to be transmitted is unknown; the push device may use a Connect to close header in the HTTP Request, without specifying the Content-Length (size of the video stream), to inform the server that the size of the video stream to be transmitted is unknown.
S102, continuously collecting the video information stream by the streaming pushing equipment, and continuously pushing the video information stream to the server through a request of a hypertext transfer protocol.
After the streaming device sends a request of the hypertext transfer protocol to the server and successfully establishes connection with the server, the streaming device continuously collects live images and live sounds of the current scene, and integrates the collected live images and live sounds on a time axis, so that continuous collection of video information streams is realized. The streaming device then carries the video information stream with the request body in the request of the hypertext transfer protocol, and continuously sends it to the server. The server continues to read the video information stream from the hypertext transfer protocol request in response to the hypertext transfer protocol request. Thus, the server can obtain the video information stream which is continuously received and sent by the push stream device, so that the server can store the video information stream or distribute the video information stream to the pull stream device of the audience. Wherein the request body is specially used for storing the transmitted data in the request of the hypertext transfer protocol.
It should be noted that, because the request of the hypertext transfer protocol is a long connection, the long connection is not disconnected before the transmission is finished, so that the streaming device can continuously send the generated video information stream to the server through the long connection, thereby realizing that the transmission of the video information stream is completed by only using one long connection, and compared with the slicing push mode in the related art, the stability of the video information stream transmission can be improved.
S103, the pushing equipment responds to the pushing ending operation, stops collecting the video information stream, and determines a pushing ending prompting mode corresponding to the first head mark based on the first head mark.
Since in practice, whether the live broadcast is ended or not is controlled by the user, the push device also determines whether the user ends the push by whether the user triggers a push ending operation. When the pushing equipment detects the pushing ending operation triggered by the user, the user is definitely about to end live broadcasting at present, so that the pushing equipment can respond to the pushing ending operation to stop collecting live images and live sounds of the current scene, thereby stopping generating video information streams and stopping pushing. Meanwhile, the pushing equipment can also use the first head mark to select a pushing end prompting mode corresponding to the first head mark from candidate prompting modes, so that the server pushing equipment is prompted to stop pushing by using the determined pushing end prompting mode later.
It should be understood that the candidate alert mode refers to all alert modes that can be used to alert the server to the end of live broadcast. The candidate prompting mode can include prompting the end of live broadcasting of the server through a coded data block with a preset size and prompting the end of live broadcasting by directly utilizing a request for closing the hypertext transfer protocol. Of course, other prompting modes may also be included in the candidate prompting modes, and the application is not specifically limited herein.
In the embodiment of the present application, the first header identifier is used to determine the prompting mode of the end of the push stream corresponding to the first header identifier, so that the server can accurately determine the end of the push stream. This is because: because what is the message and response used in data transmission has been specified using the hypertext transfer protocol, based on this, when the first header identifier does not correspond to the push end prompt mode, for example, the first header identifier is a block code transmission header identifier, and the push end prompt mode is a request to directly close the hypertext transfer protocol, the server cannot make sure whether the network is currently in error and the line is broken, or the push end is broken; when the first header identifier is a unilaterally closed connection header identifier and the push end prompting mode is that the push end is prompted based on a coded data block with a preset size, the server cannot clearly determine whether the data is lost due to network errors or whether the push end is true. Thus, in the embodiment of the present application, the pushing end prompting mode corresponding to the first header identifier should be selected to prompt the server that pushing ends.
It will be appreciated that the push end operation may be a triggered operation event by the user on the display interface of the push device, for example, the user clicking on a "end live" virtual key on a live web page, or a "close live" virtual key on the main interface of an application providing live functionality. The operation event triggered by the user on the display interface of the push device may be a click, a double click, or a long press, which is not limited herein.
In other embodiments of the present application, the push end operation may be a voice command of the user, for example, a statement of "end live" uttered by the user, or a statement of "thank you for watching" uttered by the user, and we review the next term "uttered by the user, and these statements may all be regarded as the push end operation. Furthermore, the user can record the statement for triggering and ending the live broadcast recording on the push device, so that when the push device detects the statement which is the same as or similar to the recorded statement for triggering and ending the live broadcast to a certain extent, the push device confirms that the push ending operation of the user is currently detected.
S104, the pushing equipment prompts the server to push the stream through a pushing ending prompt mode corresponding to the first head mark.
After determining the push ending prompt mode corresponding to the first head mark, the push device executes the action specified by the push ending prompt mode to prompt the server that the user finishes live broadcasting, thereby prompting the server that the push needs to be ended. The streaming device thus completes the process of pushing the video information stream to the server.
It should be noted that, since the first header identifier may be a block code transmission header identifier or a unilateral connection header identifier, the two different header identifiers can determine a push end prompting mode. The method of prompting the live broadcast end determines whether the push device and the server can still be connected when the live broadcast is ended, so that the first head mark can determine the connection condition between the push device and the live broadcast server when the push is ended, and the push device can conveniently determine the mode for continuing to communicate with the server at the follow-up time.
And S105, stopping reading the video information stream from the request of the hypertext transfer protocol when the server detects that the pushing equipment prompts the pushing to be finished by using the pushing ending prompt mode corresponding to the first head mark.
When the server detects that the push equipment utilizes the push ending prompt mode corresponding to the first head mark to prompt the user to end live broadcast, the server definitely finishes the current push, so that the process of reading the video information stream from a request body in the request of the hypertext transfer protocol is stopped in response to the push ending prompt mode.
In the embodiment of the application, since the push device pushes the live information stream through the request of the hypertext transfer protocol, by means of the wide use of the hypertext transfer protocol, the video information stream can be continuously pushed to the server no matter an application program or a browser in the push device, namely, the push device only uses one transfer protocol, the whole coverage of the push scene on the internet is realized, so that the push scene is richer, and the scene limitation of the push of the video information stream is reduced.
In addition, as the streaming equipment only uses the long connection of the request of the hypertext transfer protocol to realize the push of the video information stream, compared with the video information stream push mode of the related technology, the streaming equipment does not need to transmit the video information stream in a slicing way, and the stability of the streaming of the video information is improved. In addition, the hypertext transfer protocol supports more video information stream formats, for example, the video information streams in FLV and FMP4 formats can be transmitted, so that the format of the video information stream is not dependent when the video information stream is pushed. Meanwhile, the hypertext transfer protocol has the advantages of flexible uniform resource locator (Uniform Resource Locator, URL), authentication, 302 skip, session maintenance, load balancing scheduling capability and the like, so that the request based on the hypertext transfer protocol also has the advantages of flexible URL, authentication, 302 skip, session maintenance, load balancing scheduling capability and the like when pushing video information streams.
In some embodiments of the present application, the first head identifier comprises: the block coding transmission head mark, the push flow ending prompting mode corresponding to the first head mark comprises: prompting, by the streaming device, that the server is directly broadcast to end in a streaming end prompting manner corresponding to the first header identifier based on that the request of the hypertext transfer protocol carries the encoded data block with the preset size to prompt that the streaming ends, that is, a specific implementation process of S104 may include: s1041, as follows:
s1041, the pushing device carries the coded data block with the preset size on the request of the hypertext transfer protocol, and sends the coded data block to the server to prompt the server to push.
When the first header identifier is a block coding transmission header identifier, the streaming device transmits the live information stream to the server through the coding data block, so that the streaming device can prompt the server to end streaming through the coding data block with a preset size. When the pushing device detects the pushing end operation of the user, a coded data block with a preset size is generated, and then the coded data block with the preset size is carried in a request body of the hypertext transfer protocol and is sent to the server, so that the server is prompted to end pushing in this way.
It can be understood that the preset size may be set to 0 byte, or may be set to 10 bytes, or may be set to other sizes according to actual requirements, which is not limited herein.
For example, when the push device detects that the user triggers the push end operation, a coded data packet with a size of 0 bytes may be generated, and then the data table is carried in a Request of HTTP and sent to the server.
It should be noted that, in the embodiment of the present application, when the push device prompts the server to push, the request of the hypertext transfer protocol is not closed, so that the request of the hypertext transfer protocol can be used for carrying the data push from the push device to the server continuously in the following process according to the active connection between the push device and the server in the old time.
That is, in some embodiments of the present application, after the push device sends a request for carrying the encoded data block of the preset size on the hypertext transfer protocol to the server and prompts the server to push, i.e. after S1041, the method may further include: s1042, the following:
s1042, the push device sends any request message to the server by using the request of the hypertext transfer protocol.
After prompting the server to push, when the pushing equipment needs to interact with the server, the pushing equipment can directly send any generated request message to the server through the request of the hypertext transfer protocol without establishing new connection with the server.
For example, when the streaming device needs to send a request message for deleting an already stored video information stream to the server or send a request message for pushing a new video information stream again to the server after the streaming device prompts the server to end, the request message for deleting the already stored video information stream or the request message for pushing a new video information stream again may be carried in the request of the hypertext transfer protocol and sent to the server.
In the embodiment of the application, the streaming promotion equipment can realize the end of streaming promotion of the prompt server by carrying the coded data block with the preset size on the request of the hypertext transfer protocol, so that the end of streaming promotion of the prompt server can be realized under the condition that the connection with the server is not disconnected.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark comprises the following steps: prompting the end of the push based on the request for closing the hypertext transfer protocol, in this case, the push device prompts the server to end the push by using a push end prompting mode corresponding to the first header identifier, that is, a specific implementation process of S104 may include: s1043, as follows:
S1043, the pushing device closes the request of the hypertext transfer protocol, and prompts the server to push.
When the first header identifier contains a unilaterally closed connection header identifier, the streaming device is indicated to directly disconnect the request of the hypertext transfer protocol when the user finishes live broadcasting, so that the transmission of any data or message to the server is stopped to prompt the server that streaming has ended.
It should be noted that, in the embodiment, the push device directly closes the request of the hypertext transfer protocol, so that after the push is finished, the long connection between the push device and the server is already disconnected, and at this time, if the push device needs to send a message or data to the server, the push device needs to re-establish a connection with the server. That is, in the embodiments of the present application, once the push ends, the request of the hypertext transfer protocol used at the time of push cannot be multiplexed any more.
It will be appreciated that in the embodiments of the present application, the streaming device may not perform any encapsulation processing on the video information stream when transmitting the video information stream, i.e. the streaming device may transmit pure audio and video data through a request of the hypertext transfer protocol.
In the embodiment of the application, the streaming equipment can prompt the server to finish streaming by directly disconnecting the request of the hypertext transfer protocol with the server, so that the streaming can be finished without generating auxiliary data packets or information except the video information stream.
In some embodiments of the present application, identifying at the first header includes: the block coding transmission head mark, the push flow ending prompting mode corresponding to the first head mark comprises: based on the condition that the pushing device is prompted to end by carrying the coded data block with the preset size in the request of the hypertext transfer protocol, when the server detects that the pushing device utilizes the pushing end prompting mode corresponding to the first head identifier to prompt that the pushing ends, the reading of the video information stream from the request of the hypertext transfer protocol is stopped, that is, the specific implementation process of S105 may include: s1051, as follows:
s1051, when the server detects that the request of the hypertext transfer protocol carries the coded data block with the preset size, the video information stream is stopped from being read from the request of the hypertext transfer protocol.
When the server reads the video information stream from the hypertext transfer protocol request, the server analyzes the hypertext transfer protocol request, extracts the request body from the hypertext transfer protocol request, and then reads the encoded data block from the request body to form the video information stream by using the read encoded data block. When the encoded data block read from the request body by the server is of a preset size, it is clear that the user has finished live broadcasting, that is, the push device has finished push, and the previously received encoded data block already contains all video and audio data generated by the user during live broadcasting, at this time, the server does not read the video information stream from the request of the hypertext transfer protocol any more, and the reading process of the video information stream is finished.
It should be noted that, in the embodiment of the present application, although the server has stopped reading the video information stream from the request of the hypertext transfer protocol, the request of the hypertext transfer protocol is not disconnected, that is, the server and the push device remain connected through the request of the hypertext transfer protocol, so that the server may also read other messages or data sent by the push device from the request of the hypertext transfer protocol in the following.
In the embodiment of the application, when the server detects the coded data block with the preset size sent by the push device through the request of the hypertext transfer protocol, it is clear that the user has finished live broadcasting, so that the receiving of the video information stream is stopped under the condition that the connection with the push device is not disconnected.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the first direct broadcasting ending prompting mode comprises the following steps: the push end is prompted based on a request to close the hypertext transfer protocol. In this case, when the server detects that the pushing device uses the pushing end prompting mode corresponding to the first header identifier to prompt that the pushing is ended, stopping reading the video information stream from the request of the hypertext transfer protocol, that is, the specific implementation mode of S105 may include: s1052, as follows:
S1052, when the server detects that the request of the hypertext transfer protocol is closed, stopping reading the video information stream from the request of the hypertext transfer protocol.
When the server detects that the push device has closed the hypertext transfer protocol request, it will be clear that the push device has stopped pushing, and then that the user has finished living broadcast, so that the server will not continue to read the video information stream from the hypertext transfer protocol request.
It will be appreciated that since the hypertext transfer protocol request has been closed, which corresponds to a disconnection between the server and the push device, the request from the server is not accessible to the push device, and thus the communication link between the push device and the server is re-established only when the push device sends a new connection to the server.
In this embodiment of the present application, when the server detects that the streaming device closes the request of the hypertext transfer protocol, it definitely indicates that streaming has ended, so that the video information stream is no longer read from the request of the hypertext transfer protocol, that is, the receiving process of the video information stream is ended.
In some embodiments of the present application, after sending a request of the hypertext transfer protocol carrying the first header identifier to the server, the streaming device continuously collects the video information stream, and continuously pushes the video information stream to the server by the request of the hypertext transfer protocol, that is, after S101 and before S102, the method may further include: s106 to S107, as follows:
S106, the server sends a connection success message of the request for the hypertext transfer protocol to the push stream device.
After receiving the request of the hypertext transfer protocol sent by the push device, the server generates a connection success message that the connection with the push device has been successfully established, and then the server sends the generated connection success message to the push device through the network. The push device receives a connection success message returned by the server for the request of the hypertext transfer protocol, and confirms that the connection is successfully established with the server through the connection success message.
And S107, the streaming pushing equipment responds to the connection success message, continuously collects the video information stream and continuously sends the video information stream to the server through the request of the hypertext transfer protocol.
To avoid that the pushing of the video information stream is not valid, the push device will start pushing the video information stream to the server after it has been clarified that it has successfully established a connection with the server. That is, the streaming device starts to collect the video information stream in response to the connection success message sent by the server, and continuously sends the video information stream to the server through the request of the hypertext transfer protocol.
In the embodiment of the application, the streaming device starts to push the video information stream to the server after receiving the connection success message returned by the server aiming at the request of the hypertext transfer protocol, thereby improving the success rate of pushing the video information stream.
In some embodiments of the present application, the server may further continuously send the video information stream to the pull stream device of the viewer while receiving the video information stream pushed by the push stream device. Based on fig. 5, referring to fig. 6, fig. 6 is a second flowchart of an alternative method for pushing an information flow according to an embodiment of the present application. In some embodiments of the present application, after the server continues to read the video information stream from the request of the hypertext transfer protocol in response to the request of the hypertext transfer protocol, before the push device detects the push end operation, that is, after S102, before S103, the method may further include:
and S201, when the streaming equipment detects streaming operation, sending streaming information to the server, and displaying a live broadcast presentation interface.
The streamcast device is a device used by viewers to watch live. When the streaming device detects a streaming operation of the viewer, it is clear that the viewer needs to watch live, so that in response to the streaming operation, a streaming message is sent to the server to pull the video information stream from the server. Meanwhile, the streaming equipment also generates a video presentation interface and jumps to the video presentation interface from the current display interface, so that the display of the video presentation interface is realized. And the server receives a streaming message sent by the streaming device, wherein the streaming message is used for pulling the video information stream.
It will be appreciated that the streaming operation may be an operation event triggered by the viewer on the display interface of the streaming device, for example, the viewer clicking a virtual key of "play live", or clicking into a live room playing live, etc. The streaming operation may also be a voice instruction of the viewer, for example, "play live broadcast of the most fire" spoken by the viewer, or "play live broadcast of a certain blogger with goods", etc. The specific pulling operation may be set according to actual requirements, which is not limited herein.
S202, the server responds to the streaming message and sends a response of the hypertext transfer protocol carrying the second header identification to the streaming device.
Wherein the second header identification is used for prompting the streaming device to continuously receive the video information stream.
After receiving the pull message, the server generates a response of the hypertext transfer protocol, generates a second header identification which can represent that the size of the video information stream to be transmitted is unknown, carries the second header identification in the response of the hypertext transfer protocol, and sends the second header identification to the pull device. The streaming device receives a response from the server to the hypertext transfer protocol sent by the streaming message.
It should be noted that, the second header identifier may be a block code transmission header identifier, or may be a unilateral closed connection header identifier, which is not limited herein. That is, in the embodiment of the present application, the first header identifier and the second header identifier may be selected from the block code transmission header identifier and the unilateral closed connection header identifier, and the first header identifier and the second header identifier may be the same header identifier or different header identifiers.
S203, the server continuously sends the video information stream to the streaming equipment through the response of the hypertext transfer protocol.
S204, the streaming equipment displays the video information stream on the live broadcast presentation interface.
The server continuously sends the video information stream received from the push device to the pull device, wherein the video information stream carries a response body in the response of the hypertext transfer protocol. The streaming device continuously parses the video information stream from the hypertext transfer protocol response. Thus, the streaming device obtains the video information stream pushed by the push device. Wherein the video information stream is transmitted to the server by the push device via a request carrying a hypertext transfer protocol characterizing a second header identification of the video information stream of unknown size. The streaming device displays the video information stream in the video presentation interface, so that the live action recorded by the streaming device is played in the streaming device of the audience.
In the embodiment of the application, the server can continuously transmit the video information stream to the streaming equipment of the audience through the response of the hypertext transfer protocol with the second header identifier, so that the live broadcast process of the streaming equipment of the audience can be realized, the bidirectional communication characteristic is realized, and the one-to-one real-time video communication of both parties is realized.
The server not only can send the video information stream to the streaming equipment, but also can prompt the streaming equipment to end streaming when the user finishes live broadcasting. In some embodiments of the present application, after the server stops reading the pull stream information stream from the request of the hypertext transfer protocol, i.e., after S105, the method may further include: S205-S206, as follows:
s205, the server determines a pulling end prompt mode corresponding to the second head identifier of the pulling device based on the second head identifier.
S206, the server utilizes a pulling flow ending prompt mode corresponding to the second head mark to prompt the pulling flow equipment to end pulling flow.
After detecting that the push device prompts the live broadcast to finish, the server firstly stops reading the video information stream from the request of the hypertext transfer protocol, and simultaneously selects a pull stream finishing prompt mode corresponding to the second head mark from the pull stream finishing prompt modes, and then prompts that the live broadcast of the push device is finished by utilizing the pull stream finishing prompt mode corresponding to the second head mark.
It can be understood that, when the second header identifier is a block coding transmission header identifier, the pull stream end prompting mode corresponding to the second header identifier prompts the pull stream end based on carrying a coding data block with a preset size in the response of the hypertext transmission protocol; when the second head mark is a unilateral closing connection head mark, the pulling end prompting mode corresponding to the second head mark is based on the disconnection response to prompt the pulling equipment to end pulling.
In the embodiment of the application, when the live broadcast is finished, the server not only can stop reading the video information stream from the request of the hypertext transfer protocol, but also can prompt the streaming equipment that the live broadcast is finished in a streaming end prompt mode corresponding to the second header identification, so that the streaming equipment can respond in time.
In some embodiments of the present application, after the streaming device continuously parses the video information stream from the response of the hypertext transfer protocol, that is, after the step of executing the corresponding streaming device side in S105, the method further includes: s207 or 208, as follows:
s207, stopping analyzing the video information stream from the response of the hypertext transfer protocol and stopping displaying the ending prompt information on the video presentation interface when the streaming device detects that the response of the hypertext transfer protocol carries the coded data block with the preset size.
And S208, stopping analyzing the video information stream from the response of the hypertext transfer protocol and stopping displaying the ending prompt information on the video presentation interface when the streaming equipment detects that the response of the hypertext transfer protocol is disconnected.
When the streaming device detects a coded data block with a preset size from the response of the hypertext transfer protocol, or detects that the response of the hypertext transfer protocol is closed, the server clearly indicates that the streaming has ended, and then the user clearly ends the live broadcast, so that the streaming device can stop analyzing the video information stream from the response of the hypertext transfer protocol, and does not continue to display the video information stream on the live broadcast presentation interface, but generates and displays ending prompt information, thereby prompting the audience that the live broadcast has ended.
It can be understood that the ending prompt message may be a text prompt message of "live broadcast has ended", or may be a previous interface for directly jumping back to the live broadcast presentation interface, that is, an interface displayed by the jumping back stream device when live broadcast is not started.
In the embodiment of the application, the server can prompt the streaming equipment to end the streaming through the coded data block with the preset size or the response of directly closing the hypertext transfer protocol, and the streaming equipment can generate and display the end prompt information when the live broadcast is ended, so that the process of pulling the video information stream from the server is ended.
In some embodiments of the present application, after the video presentation interface displays the video information stream, the streaming device may further receive playback, fast-rewinding, fast-forwarding operation information of the viewer, so that the data slicing header of the hypertext transfer protocol used when transmitting data is used to implement playback, fast-rewinding, fast-forwarding, and the like of the video information stream.
In the following, an exemplary application of the embodiments of the present application in a practical application scenario will be described.
The embodiment of the application is realized in a scene of pushing the live stream and pulling the live stream by using the HTTP protocol. The live stream pushing means that the live stream (video information stream) generated by recording by the main broadcasting end (pushing equipment) is pushed to the media service end (server), and the direct stream pulling means that the media service end distributes the live stream to the audience end (pulling equipment).
Fig. 7 is a schematic flow chart of pushing a live stream and pulling a live stream based on an HTTP protocol according to an embodiment of the present application. Referring to fig. 7, pushing a live stream and pulling a live stream includes the steps of:
s301, a host side sends a carrier-Encoding to a media server side: a locked header or Content: the HTTP Request connection of the close header.
In pushing live streams, the Request connection of HTTP (Request of Hypertext Transfer protocol) may be POST/live/cctv.flv.HTTP1.1 Content-Type:. Video/x-flv, where Transfer-Encoding is used: a chunked header (chunk-coded transport header) tells the media server that the live stream is of unknown length. The HTTP Request connection may also be put/live/lpl.flvtoken=x.http/1.1 Content-Type:. Video/x-flv, in which case Content is used: close header (unilaterally close connection header identification) while indicating that the size of the live stream is unknown by not setting the Content-Length header.
S302, the media server returns HTTP/1.1 200OK message (connection success message).
And S303, continuously transmitting the collected live stream by the anchor terminal through the Request.
When Transfer-Encoding is used: when the chunk headers are generated, the anchor end can send standard HTTP chunk data packets to the media server end, each chunk packet has a specified data size, the media server end analyzes the data content, and reads the live stream, so that the acquired live stream is continuously transmitted through the Request. When using Content: when the close head is closed, the media server only needs to continuously receive the live stream.
S304, when the audience terminal needs to play live broadcast, a request for pulling the direct broadcast stream is sent to the media server terminal.
When the audience needs to play live broadcast, the audience can send get/live/lpl.flvtoken=key.http/1.1 (streaming message) to the media server to pull the direct broadcast stream.
S305, the media server returns a carrier-Encoding to the audience terminal: a locked header or Content: response connection of HTTP (hypertext transfer protocol Response) of close header.
The Response of HTTP may be HTTP/1.1/200.OK Content-type.video/x-flv using Transfer-Encoding: chunked (chunked encoded transport header identification is the second header identification).
S306, the media server side continuously transmits the content of the Request data body to the audience side.
S307, the anchor terminal sends a chunk data packet with the size of 0 to the media server terminal, or directly closes the Request connection.
When the live broadcast is finished, the host side sends a chunk data packet (a coded data block with a preset size) with the size of 0 to the media server side, and marks the end of the live broadcast, and at the moment, after the end of the live broadcast, the Request of the HTTP can still be used as an active long connection to bear subsequent other requests. Or when the live broadcast is finished, the host side directly closes the Request connection (Request for closing the hypertext transfer protocol), and the media server senses the connection error so as to know that the live broadcast is finished. In this way, this Request connection cannot be reused after the end of the live broadcast.
And S308, when the audience terminal detects that the media server terminal sends a chunk with the size of 0 or the media server closes the connection, the end of live broadcast is perceived.
It should be noted that, the media server in this embodiment is a standard HTTP server, and receiving the live stream pushed by the Request is equivalent to receiving the Request for uploading the very large and unknown file, but the common HTTP server only can receive the uploading function of the limited-length file, and after the file is received, the file is temporarily stored in the memory or the external memory, and then the Request for processing the uploading file is triggered to the network manager. The media server in this embodiment cannot select a common HTTP server, and must select a standard HTTP server, which must read the streaming data from the Request body in the acquired Requset connection until the live streaming is finished.
Fig. 8 is a schematic diagram of a process of reading a live stream by a media server provided in an embodiment of the present application, referring to fig. 8, a main cast end 8-1 places the live stream in a Requset body8-2, uploads the live stream to a media server 8-3, and the media server 8-3 continuously reads content 8-4 from a Request body until the Request body is perceived to have an identifier indicating the end of the live stream, and stops reading to implement reading of live stream data.
Furthermore, the embodiment of the application can also rely on the chunkext header in the HTTP protocol to realize the playback, fast forward and fast backward schemes of RTSP, so that the push stream based on the HTTP protocol has more flexibility.
By means of the mode, by means of wide application of the HTTP protocol, any corner of the Internet, such as an APP and a browser, can be used for pushing live streams easily, and the live streams can be pushed independently of the format of the live streams, whether FLV is the live stream in the FMP4 format, and the live streams do not need to be fragmented, are suitable for only one connection, and are stable in transmission speed. Moreover, as the URL of the HTTP is very flexible, the URL pushed by the live stream can be very flexible, and the live stream does not have three parts, namely a target address or host, a distribution point and a stream id like RTMP, and meanwhile, the scheme can utilize all the convenience possessed by the HTTP, such as authentication, 302 jump, session maintenance, load balancing and the like. The scheme also realizes the bidirectional behavior of Requset, response, has the bidirectional traffic characteristic, and performs one-to-one real-time video communication on both sides, etc.
Continuing with the description below of an exemplary structure provided by embodiments of the present application that is implemented as a software module, in some embodiments, as shown in fig. 2, the software module stored in the push device 255 of the first memory 250 may include:
a first sending module 2551, configured to send, in response to a push triggering operation, a request for a hypertext transfer protocol carrying a first header identifier to a server; the first head identifier is used for prompting the server to continuously receive the pushed video information stream; and continuing to push the video information stream to the server via the hypertext transfer protocol request;
a video recording module 2552, configured to continuously collect the video information stream; stopping collecting the video information stream in response to a push ending operation;
a prompt determination module 2553, configured to determine, based on the first header identifier, a prompting manner of ending the push stream corresponding to the first header identifier;
and the prompt execution module 2554 is configured to prompt, by using a prompt mode of ending the push flow corresponding to the first header identifier, that the push flow of the server is ended.
In some embodiments of the present application, the first head identifier comprises: the method comprises the steps of transmitting head identifiers by block coding, wherein a push flow ending prompting mode corresponding to the first head identifier comprises the following steps: prompting the end of push based on carrying a coded data block of a preset size in the request of the hypertext transfer protocol;
The prompt execution module 2554 is further configured to carry the encoded data block with the preset size on the request of the hypertext transfer protocol, send the encoded data block to the server, and prompt the server to end pushing.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark comprises the following steps: prompting a push end based on a request for the hypertext transfer protocol;
the prompt execution module 2554 is further configured to close the request of the hypertext transfer protocol and prompt the server to push.
In some embodiments of the present application, the plug-flow device 255 further includes: a first receiving module 2555;
the first receiving module 2555 is configured to receive a connection success message returned by the server for the request of the hypertext transfer protocol;
the video recording module 2552 is further configured to continuously collect the video information stream in response to the connection success message;
the first sending module 2551 is further configured to continuously push the video information stream to the server through the request of the hypertext transfer protocol.
In some embodiments of the present application, the first sending module 2551 is further configured to send any request message to the server using the request of the hypertext transfer protocol.
Continuing with the description below of an exemplary structure of the information distribution device 455 implemented as a software module provided in the embodiments of the present application, in some embodiments, as shown in fig. 3, the software module stored in the information distribution device 455 of the second memory 450 may include:
a second receiving module 4551, configured to receive a request of a hypertext transfer protocol carrying a first header identifier sent by a push device;
an information reading module 4552 configured to respond to the request of the hypertext transfer protocol, and continuously read out a video information stream from the request of the hypertext transfer protocol; and stopping reading the video information stream from the request of the hypertext transfer protocol when the pushing equipment detects that the pushing equipment utilizes the pushing ending prompt mode corresponding to the first head mark to prompt that the pushing is ended.
In some embodiments of the present application, the first head identifier comprises: the method comprises the steps of transmitting head identifiers by block coding, wherein a push flow ending prompting mode corresponding to the first head identifier comprises the following steps: prompting the end of push based on carrying a coded data block of a preset size in the request of the hypertext transfer protocol;
The information reading module 4552 is further configured to stop reading the video information stream from the request of the hypertext transfer protocol when it is detected that the request of the hypertext transfer protocol carries the encoded data block of the preset size.
In some embodiments of the present application, the first head identifier comprises: the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark comprises the following steps: prompting a push end based on a request to close the hypertext transfer protocol;
the information reading module 4552 is further configured to stop reading the video information stream from the request for the hypertext transfer protocol when it is detected that the request for the hypertext transfer protocol is closed.
In some embodiments of the present application, the information distribution device 455 further includes: a second transmission module 4553;
the second receiving module 4551 is further configured to receive a pull stream message sent by the pull stream device; the streaming message is used for pulling the video information stream;
the second sending module 4553 is configured to send, in response to the pull stream message, a response of the hypertext transfer protocol carrying the second header identifier to the pull stream device; the second header identifier is used for prompting the streaming device to continuously receive the video information stream; and continuously transmitting the video information stream to the streaming equipment through the response of the hypertext transfer protocol.
In some embodiments of the present application, the second sending module 4553 is further configured to send a connection success message of the request for the hypertext transfer protocol to a push device.
In some embodiments of the present application, the information distribution device 455 further includes: a pull end prompt module 4554;
the pull-out end prompting module 4554 is configured to determine, based on the second header identifier, a pull-out end prompting manner corresponding to the second header identifier of the pull-out device; and prompting the end of the pulling device by using a pulling end prompting mode corresponding to the second head mark.
In some embodiments of the present application, the pull-end prompting module 4554 is further configured to carry the encoded data block of the preset size on a response of the hypertext transfer protocol, send the encoded data block to the pull-end prompting device, and prompt the pull-end of the pull-end device; or closing the response of the hypertext transfer protocol to prompt the end of the streaming equipment.
Continuing with the description below of an exemplary structure of the pull-streaming device 555 provided in embodiments of the present application implemented as a software module, in some embodiments, as shown in fig. 4, the software module stored in the pull-streaming device 555 of the third memory 550 may include:
A third sending module 5551, configured to send a pull stream message to the server when a pull stream operation of the user is detected;
the information display module 5552 is configured to display a live presentation interface;
a third receiving module 5553, configured to receive a response of the server to the hypertext transfer protocol sent by the pull stream message; the video information stream is transmitted to the server by the streaming pushing device through a request of a hypertext transfer protocol carrying a first head mark for prompting the server to continuously receive the pushed video information stream;
the information flow parsing module 5554 is configured to parse the video flow information continuously from the response of the hypertext transfer protocol; the video information stream is transmitted to the server by the streaming pushing device through a request of a hypertext transfer protocol carrying a first head mark for prompting the server to continuously receive the pushed video information stream;
the information presentation module 5552 is further configured to present the video information stream on the live presentation interface.
In some embodiments of the present application, the information flow parsing module 5554 is further configured to stop parsing the video information flow from the response of the hypertext transfer protocol and display end prompt information on the video presentation interface when detecting that the response of the hypertext transfer protocol carries a coded data block of a preset size; or stopping analyzing the video information stream from the response of the hypertext transfer protocol when the response of the hypertext transfer protocol is detected to be closed, and displaying the ending prompt information on the video presentation interface.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for pushing the information stream according to the embodiment of the present application.
The embodiment of the application provides a computer readable storage medium storing executable instructions, wherein executable information stream pushing instructions are stored, when the executable information stream pushing instructions are executed by a first processor, the first processor is caused to execute a pushing method of an information stream provided by a stream pushing device side of the embodiment of the application, when the executable information stream pushing instructions are executed by a second processor, the second processor is caused to execute the pushing method of the information stream provided by a server side of the embodiment of the application, and when the executable information stream pushing instructions are executed by a third processor, the third processor is caused to execute the pushing method of the information stream provided by the stream pulling device side of the embodiment of the application.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable information stream pushing instructions may be in the form of programs, software modules, scripts, or code written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
As an example, the executable information stream pushing instructions may, but need not, correspond to files in a file system, may be stored as part of a file holding other programs or data, for example, in one or more scripts in a hypertext markup language (HTML, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, sub-programs, or portions of code).
As an example, the executable information stream push instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communication network.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and scope of the present application are intended to be included within the scope of the present application.

Claims (12)

1. A method for pushing an information stream, comprising:
responding to the push triggering operation, and sending a request of a hypertext transfer protocol carrying a first head mark to a server; the first head mark is used for prompting the server to continuously receive the pushed video information stream, wherein the first head mark comprises a block coding transmission head mark and a unilateral closing connection head mark;
continuously collecting the video information stream, and continuously pushing the video information stream to the server through a long connection by the request of the hypertext transfer protocol, wherein the long connection is a connection which is not disconnected before the transmission is finished;
Stopping collecting the video information stream in response to a pushing end operation, and determining a pushing end prompting mode corresponding to the first head mark based on the first head mark;
when the first head mark is the block coding transmission head mark, the pushing end prompting mode corresponding to the first head mark prompts the pushing end based on carrying a coding data block with a preset size in a request of the hypertext transmission protocol, and the coding data block with the preset size is carried on the request of the hypertext transmission protocol and is sent to the server, so that the pushing end of the server is prompted under the condition that the connection with the server is not disconnected, and the server stops receiving the video information stream and keeps the connection;
and when the first head mark is the unilateral closed connection head mark, prompting a pushing flow ending prompting mode corresponding to the first head mark to prompt the pushing flow to be ended based on a request for closing the hypertext transfer protocol, closing the request of the hypertext transfer protocol to stop transmitting data to the server, prompting the server to stop pushing flow to be ended, so that the server stops receiving the data, and disconnecting the connection.
2. A method for pushing an information stream, comprising:
receiving a request of a hypertext transfer protocol carrying a first head identifier sent by a plug-flow device, wherein the first head identifier comprises a block coding transmission head identifier and a unilateral closing connection head identifier;
continuously reading a video information stream from the hypertext transfer protocol request through a long connection in response to the hypertext transfer protocol request, wherein the long connection is a connection that is not broken before the transmission is finished;
when the first head mark is the block coding transmission head mark, the pushing end prompting mode corresponding to the first head mark prompts pushing end based on carrying coding data blocks with preset sizes in the request of the hypertext transmission protocol, and when detecting that the request of the hypertext transmission protocol carries the coding data blocks with preset sizes, the method stops reading the video information stream from the request of the hypertext transmission protocol under the condition of not disconnecting the connection with the pushing equipment, and maintains the connection;
and when the first head mark is the unilateral closing connection head mark, prompting the pushing flow end corresponding to the first head mark based on the request for closing the hypertext transfer protocol, stopping reading the video information flow from the request of the hypertext transfer protocol and disconnecting the connection.
3. The method according to claim 2, wherein after said reading of a video information stream from said hypertext transfer protocol request is continued over a long connection in response to said hypertext transfer protocol request, wherein said long connection is a connection that is not broken until the end of the transmission;
when the pushing device detects that the pushing device utilizes the pushing ending prompting mode corresponding to the first head identifier to prompt that pushing is ended, before stopping reading the video information stream from the request of the hypertext transfer protocol, the method further comprises:
receiving a pulling message sent by pulling equipment; the streaming message is used for pulling the video information stream;
responding to the pull message, and sending a response of the hypertext transfer protocol carrying the second header identification to the pull device; the second header identifier is used for prompting the streaming device to continuously receive the video information stream;
and continuously transmitting the video information stream to the streaming equipment through the response of the hypertext transfer protocol.
4. A method for pushing an information stream, comprising:
when a streaming operation is detected, a streaming message is sent to a server, and a video presentation interface is displayed;
Receiving a response of the server to the hypertext transfer protocol sent by the pull stream message;
continuously analyzing a video information stream from the response of the hypertext transfer protocol through a long connection, wherein the long connection is a connection which is not disconnected before the transmission is finished;
the video information stream is transmitted to the server by a streaming pushing device through a request carrying a hypertext transfer protocol prompting the server to continuously receive a first head identifier of the pushed video information stream, wherein the first head identifier comprises a block coding transmission head identifier and a unilateral closing connection head identifier;
when the first head mark is the block coding transmission head mark, the pushing end prompting mode corresponding to the first head mark prompts the pushing end based on carrying a coding data block with a preset size in a request of the hypertext transmission protocol, and the coding data block with the preset size is carried on the request of the hypertext transmission protocol and is sent to the server, so that the pushing end of the server is prompted under the condition that the connection with the server is not disconnected, and the server stops receiving the video information stream and keeps the connection;
When the first head mark is the unilateral closed connection head mark, the pushing end prompting mode corresponding to the first head mark prompts pushing end based on a request for closing the hypertext transfer protocol, the request for closing the hypertext transfer protocol is used for stopping transmitting data to the server, prompting the server that pushing ends, so that the server stops receiving the data, and disconnecting the connection;
and displaying the video information stream on the video presentation interface.
5. A plug-flow device, comprising:
the first sending module is used for responding to the push triggering operation and sending a request of the hypertext transfer protocol carrying the first head mark to the server; the first head mark is used for prompting the server to continuously receive the pushed video information stream, wherein the first head mark comprises a block coding transmission head mark and a unilateral closing connection head mark; and continuing to push the video information stream to the server via a long connection via the hypertext transfer protocol request, wherein the long connection is a connection that does not break until the end of the transmission;
The video recording module is used for continuously collecting the video information stream; stopping collecting the video information stream in response to a push ending operation;
a prompt determining module, configured to, when the first header identifier is the block coded transmission header identifier, prompt the end of push for the corresponding first header identifier in a manner that the push is ended based on carrying a coded data block with a preset size in a request of the hypertext transmission protocol, carry the coded data block with the preset size in the request of the hypertext transmission protocol, and send the coded data block to the server, so as to prompt the end of push for the server, so that the server stops receiving the video information stream and maintains the connection;
the prompt determining module is further configured to, when the first header identifier is the unilateral connection header identifier, prompt, by using a push end prompt manner corresponding to the first header identifier, that a push end is prompted based on a request for closing the hypertext transfer protocol, close a request for the hypertext transfer protocol to stop transmitting data to the server, prompt the server that push ends, so that the server stops receiving the data, and disconnect the connection;
And the prompt execution module is used for prompting the server to finish the pushing flow through a pushing flow finishing prompt mode corresponding to the first head mark.
6. An information distribution apparatus, comprising:
the second receiving module is used for receiving a request of a hypertext transfer protocol carrying a first head identifier sent by a push stream device, wherein the first head identifier comprises a block coding transmission head identifier and a unilateral closed connection head identifier;
an information reading module, configured to respond to the request of the hypertext transfer protocol, and continuously read out a video information stream from the request of the hypertext transfer protocol through a long connection, where the long connection is a connection that is not broken before the transmission ends;
when the first head mark is the block coding transmission head mark, the pushing end prompting mode corresponding to the first head mark prompts pushing end based on carrying coding data blocks with preset sizes in the request of the hypertext transmission protocol, and when detecting that the request of the hypertext transmission protocol carries the coding data blocks with preset sizes, the method stops reading the video information stream from the request of the hypertext transmission protocol under the condition of not disconnecting the connection with the pushing equipment, and maintains the connection;
And when the first head mark is the unilateral closing connection head mark, prompting the pushing flow end corresponding to the first head mark based on the request for closing the hypertext transfer protocol, stopping reading the video information flow from the request of the hypertext transfer protocol and disconnecting the connection.
7. A pull-up device, comprising:
a third sending module, configured to send a pull stream message to the server when a pull stream operation is detected,
the information display module is used for displaying a video presentation interface;
a third receiving module, configured to receive a response of the server to the hypertext transfer protocol sent by the pull-stream message;
the information flow analysis module is used for continuously analyzing the video information flow from the response of the hypertext transfer protocol through long connection, wherein the long connection is a connection which is not broken before the transmission is finished;
the video information stream is transmitted to the server by a streaming pushing device through a request carrying a hypertext transfer protocol prompting the server to continuously receive a first head identifier of the pushed video information stream, wherein the first head identifier comprises a block coding transmission head identifier and a unilateral closing connection head identifier;
When the first head mark is the block coding transmission head mark, the pushing end prompting mode corresponding to the first head mark prompts pushing end based on carrying coding data blocks with preset sizes in the request of the hypertext transmission protocol, and when detecting that the request of the hypertext transmission protocol carries the coding data blocks with preset sizes, the method stops reading the video information stream from the request of the hypertext transmission protocol under the condition of not disconnecting the connection with the pushing equipment, and maintains the connection;
when the first head mark is the unilateral closing connection head mark, the pushing flow ending prompting mode corresponding to the first head mark prompts pushing flow ending based on the request for closing the hypertext transfer protocol, and when the request for closing the hypertext transfer protocol is detected, reading the video information flow from the request for closing the hypertext transfer protocol is stopped, and the connection is disconnected;
the information display module is further configured to display the video information stream on the video presentation interface.
8. A plug-flow apparatus, comprising:
the first memory is used for storing executable information stream pushing instructions;
A first processor configured to implement the method of claim 1 when executing the executable information stream push instruction stored in the first memory.
9. A server, comprising:
the second memory is used for storing executable information stream pushing instructions;
a second processor, configured to implement the method of claim 2 when executing the executable information stream pushing instruction stored in the second memory.
10. A draw stream apparatus comprising:
the third memory is used for storing executable information stream pushing instructions;
a third processor, configured to implement the method of claim 4 when executing the executable information stream pushing instruction stored in the third memory.
11. A computer readable storage medium storing executable information push instructions for implementing the method of claim 1 when executed by a first processor; or for implementing the method of claim 2 when executed by a second processor; for execution by a third processor, implementing the method of claim 4.
12. A computer program product comprising executable instructions for implementing the method of claim 1 when executed by a first processor; or for implementing the method of claim 2 when executed by a second processor; for execution by a third processor, implementing the method of claim 4.
CN202011356004.5A 2020-11-26 2020-11-26 Information stream pushing method, device, equipment and computer readable storage medium Active CN112532719B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011356004.5A CN112532719B (en) 2020-11-26 2020-11-26 Information stream pushing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011356004.5A CN112532719B (en) 2020-11-26 2020-11-26 Information stream pushing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112532719A CN112532719A (en) 2021-03-19
CN112532719B true CN112532719B (en) 2024-04-02

Family

ID=74994035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011356004.5A Active CN112532719B (en) 2020-11-26 2020-11-26 Information stream pushing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112532719B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438506B (en) * 2021-06-02 2023-04-07 曙光网络科技有限公司 Video file restoration method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297452A (en) * 2012-02-24 2013-09-11 北京对角巷科技发展有限公司 Method and system for publishing and broadcasting streaming media on Internet in live mode
CN110785978A (en) * 2017-06-20 2020-02-11 瑞典爱立信有限公司 Apparatus and method for live uplink adaptive streaming
CN111935443A (en) * 2020-10-12 2020-11-13 融智通科技(北京)股份有限公司 Method and device for sharing instant messaging tool in real-time live broadcast of video conference

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110915180B (en) * 2017-05-16 2022-06-28 瑞典爱立信有限公司 Low-latency media ingestion system, apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297452A (en) * 2012-02-24 2013-09-11 北京对角巷科技发展有限公司 Method and system for publishing and broadcasting streaming media on Internet in live mode
CN110785978A (en) * 2017-06-20 2020-02-11 瑞典爱立信有限公司 Apparatus and method for live uplink adaptive streaming
CN111935443A (en) * 2020-10-12 2020-11-13 融智通科技(北京)股份有限公司 Method and device for sharing instant messaging tool in real-time live broadcast of video conference

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
http推流原理;瞎猫;《知乎》;第1-4页 *

Also Published As

Publication number Publication date
CN112532719A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
US12096046B2 (en) Live streaming method and system, server, and storage medium
US10863247B2 (en) Receiving device and data processing method
US9979690B2 (en) Method and apparatus for social network communication over a media network
CN106254951B (en) A kind of net cast creation method and its system, access device, management equipment
KR101647938B1 (en) Method and System for Providing Media Streaming By Interworking Heterogeneous Network through a Mobile Communication Network
US20110321062A1 (en) Capturing events from and providing targeted messages to a digital media device
CN106464933B (en) Apparatus and method for remotely controlling rendering of multimedia content
CN110740386B (en) Live broadcast switching method and device and storage medium
JPWO2016174960A1 (en) Reception device, transmission device, and data processing method
CN107547517B (en) Audio and video program recording method, network equipment and computer device
CN113132194A (en) Information transfer method, device, equipment, server and storage medium
CN114040232A (en) Screen projection system, method, electronic device and storage medium
CN112532719B (en) Information stream pushing method, device, equipment and computer readable storage medium
CN110392275B (en) Sharing method and device for manuscript demonstration and video networking soft terminal
CN113055636B (en) Data processing method and conference system
US10425689B2 (en) Reception apparatus, transmission apparatus, and data processing method
CN110719435B (en) Method and system for carrying out terminal conference
WO2014169634A1 (en) Media playing processing method, apparatus and system, and media server
KR101528268B1 (en) System and method for streaming content to remote locations
US11778011B2 (en) Live streaming architecture with server-side stream mixing
Zhang Kaleidoscope: A cloud-based platform for real-time video-based interaction
CN115499693A (en) Multi-screen different display control method, device and system, storage medium and electronic equipment
CN117676181A (en) Method and device for delaying live broadcast
Raesi See, What I See (SWIS); Design and Implementation of a Virtual Living Room in Cyberspace
KR20130115950A (en) Apparatus and method for supporting broadcast service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40040479

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant