CN115776602A - On-demand method and system - Google Patents

On-demand method and system Download PDF

Info

Publication number
CN115776602A
CN115776602A CN202211453448.XA CN202211453448A CN115776602A CN 115776602 A CN115776602 A CN 115776602A CN 202211453448 A CN202211453448 A CN 202211453448A CN 115776602 A CN115776602 A CN 115776602A
Authority
CN
China
Prior art keywords
server
video
client
media
establishing
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.)
Pending
Application number
CN202211453448.XA
Other languages
Chinese (zh)
Inventor
许式伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiniu Information Technology Co ltd
Original Assignee
Shanghai Qiniu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiniu Information Technology Co ltd filed Critical Shanghai Qiniu Information Technology Co ltd
Priority to CN202211453448.XA priority Critical patent/CN115776602A/en
Publication of CN115776602A publication Critical patent/CN115776602A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a video-on-demand method and a video-on-demand system, and the method applied to a client comprises the following steps: sending the meta information of the video to a service server of a server side; the method comprises the steps that a service server of a receiving server side returns connection information used for establishing a transmission video; constructing connection description, and establishing a streaming media transmission channel with a media server of a server; and receiving and playing the video sent by the media server of the server. The method and the device convert the stored video into the streaming media for transmission and playing, make full use of the mature solutions of the streaming media in the aspects of self-adaptation of network conditions, delay reduction and the like, for example, reduce the resolution or frame rate to optimize user experience when the network becomes poor, so that the playing technical effect can be improved revolutionarily.

Description

On-demand method and system
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and a system for on-demand broadcasting.
Background
The most important technical direction of the information age is mainly the continuous development and progress based on storage, calculation and transmission, and with the popularization of technology, a large amount of video files are generated on the internet. In order to improve the user experience of accessing these videos, it is necessary to continuously optimize and improve the storage, transmission and playing of these massive video files.
In the prior art, the existing forms of the video mainly include two types, one type is a video file which is already stored, and the other type is a live video file which is generated and transmitted in real time. For live video files, a common technical scheme in the prior art is to adopt an RTC low-delay scheme such as webrtc, or a CDN acceleration scheme such as rtmp, h ls, and other streaming media protocol schemes.
For existing video files, the mainstream technical solution at present is to transmit the video files to a local player or a playing terminal by using a transmission tool in a downloading or caching manner, and then play the video files at the local player or the playing terminal, which results in a large amount of transmission traffic consumption, and is likely to cause jamming and the like when the network environment is not good, thereby seriously affecting the playing experience of the user.
Disclosure of Invention
In order to solve the technical problems in the prior art, the application provides an on-demand method, which is applied to a client and comprises the following steps:
sending the meta information of the video to a service server of a server side;
the method comprises the steps that a service server of a receiving server side returns connection information used for establishing a transmission video;
constructing connection description, and establishing a streaming media transmission channel with a media server of a server;
and receiving and playing the video sent by the media server of the server.
Further, the constructed connection description includes offer sent by the sender, answer replied by the receiver according to the offer, and a transmission protocol.
Further, the connection description also includes settings of video transmission preferences.
Further, the streaming media transmission channel is created based on WebRTC.
The application also provides an on-demand method which is applied to the server and comprises the following steps:
a service server of a server receives meta-information of a video sent by a client;
a service server of a server side returns connection information for establishing a transmission video to a client side;
after the client builds the connection description, the media server of the server and the client build a streaming media transmission channel;
and the media server of the server side acquires the video and sends the video to the client side.
Further, the constructed connection description includes offer sent by the sender, answer replied by the receiver according to the offer, and a transmission protocol.
The application also provides an on-demand method which is applied to the server and the client and comprises the following steps:
the client sends the meta information of the video to a service server of the server;
a service server of a server side receives the meta information of the video and returns connection information for establishing video transmission to a client side;
the client builds connection description and establishes a streaming media transmission channel with a media server of the server;
and the media server of the server side acquires the video and sends the video to the client side.
The application also provides an on-demand system, which comprises a server side and a client side,
the client is used for sending the meta information of the video to the service server of the server, constructing connection description, establishing a streaming media transmission channel with the media server of the server, and playing the video of the media server of the server;
the server side comprises a business server and a media server, wherein:
the service server is used for receiving the meta information of the video sent by the client and returning the connection information for establishing the transmission video to the client;
the media server is used for establishing a streaming media transmission channel with the client, acquiring the video, sending the video to the client and playing the video.
The present invention also provides a storage medium having a computer program stored thereon, which, when executed by a processor, performs the on-demand method as described.
The present invention also provides an electronic device comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the on-demand method as described.
In practical applications, a plurality of modules may be deployed on one target server, or each module may be deployed on a different target server independently, and particularly, in order to provide a stronger computing processing capability, the modules may be deployed on a cluster target server as needed.
Therefore, the technical scheme adopted by the application has the following advantages that:
the method and the device can transmit and play the stored video in a streaming media mode, so that the on-demand effect is realized, and the stored video is converted into the streaming media for transmission and play, so that the mature solutions of the streaming media in the aspects of network condition self-adaption, delay reduction and the like are fully utilized, for example, the resolution or frame rate is reduced to optimize the user experience when the network is deteriorated, and the technical effect of play can be improved revolutionarily.
In order that the present application may be more clearly and completely understood, specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flow chart of an on-demand method according to an embodiment of the present application.
Detailed Description
In the prior art, for existing video files, a mainstream technical scheme is to transmit the video files to a local player or a playing terminal by using a transmission tool in a downloading or caching mode, a user can see a cache strip displayed by downloading through the transmission tool, the cache strip displays the cache amount, generally, some video files can be played after the cache is completely finished, some video files are optimized, and the video files can be played while being cached after a certain proportion.
The method and the device have the advantages that the existing videos needing to be cached or downloaded and played again can be transmitted and played in a streaming media mode through an innovative technical scheme, so that the on-demand effect is achieved, the stored videos are converted into the streaming media for transmission and playing, the relatively mature solutions of the streaming media in the aspects of self-adaption, delay reduction and the like of network conditions are fully played, for example, the code rate is reduced or the playing speed is changed to optimize user experience when the network is poor, and the playing technical effect can be improved revolutionarily.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart of a video-on-demand method according to an embodiment of the present application. As an embodiment mode applied to a client, the technical solution of the present application is: an on-demand method is applied to a client and comprises the following steps:
s1, sending meta information of a video to a service server of a server;
s2, a service server of the receiving server side returns connection information for establishing a transmission video;
s3, constructing a connection description, and establishing a streaming media transmission channel with a media server of a server;
and S4, receiving and playing the video sent by the media server of the server.
The technical solution of the present application will be described in detail below with reference to various preferred embodiments.
S1, sending meta information of a video to a service server of a server;
in order to construct a way of converting a video into a streaming media, a service end is provided with a service server and a media server, wherein:
the service server provides service to the outside through an interface based on the HTTP protocol, and is used for managing and returning media and information of the media server.
The media server provides services to the outside through an interface based on a certain protocol, and the services are used for providing video streams for the client.
In the embodiment of the application, a usage scenario established based on the HTTP protocol, where the meta information is url information, when a client wants to play a video on a certain web page or a certain interface, the client clicks the video to send the url of the video to a service server of a server, and the service server starts to implement step S2.
S2, a service server of the receiving server side returns connection information for establishing a transmission video;
and the service server analyzes the URL and returns connection information for establishing a transmission video to the client.
And S3, constructing connection description and establishing a streaming media transmission channel with a media server of the server.
The client receives the connection information transmitted by the service server, and establishes a streaming media transmission channel with the media server of the server after establishing connection description according to the connection information.
As a preferred embodiment, the connection description in this application includes a WebRTC SDP offer sent by the sender, and a WebRTC SDP answer replied by the receiver according to the offer. And after setting the offer and the answer through the interface of the WebRTC module, the sender can establish WebRTC connection with the media server.
The connection description of the present application is described by taking a WebRTC streaming media transmission channel as an example, and certainly, as a conversion implementation, the connection description may be implemented based on other protocols or frameworks, and when the connection description is implemented by using other protocols or frameworks, there are differences in constructing specific connection descriptions, but the connection descriptions formed by the differences are all for the purpose of implementing streaming media transmission and playback at a server side and a client side, and therefore, these modified embodiments and technical means do not depart from the protection scope of the present application.
In the embodiment of the application, the WebRTC protocol is considered to be provided with bandwidth sensing and logic for correspondingly selecting the optimal video stream parameters. Therefore, the video can automatically adapt to the current network and playing mode when being played, namely, the video corresponds to better user experience, less jamming and higher definition, and the user experience does not need business intervention.
In addition, the method and the device use a WebRTC-based streaming media transmission channel, and in constructing the connection description, the method and the device can further include setting of video transmission preferences, such as video resolution, frame rate and the like, and personalized setting is performed fully according to the current network environment of the client or the performance of the client, so that the playing experience of the user can be further improved.
And S4, receiving and playing the video sent by the media server of the server.
And the media server acquires video information to be played from the connection description, adds a corresponding video stream to a WebRTC connected track (track), and plays the video track on a page clicked by a user after receiving the video track.
In the embodiment of the application, the client and the server are connected based on the WebRTC, and the WebRTC allows a web application or a website to establish a Peer-to-Peer (Peer-to-Peer) connection between browsers without an intermediary, so as to realize transmission of video streams and/or audio streams or any other data.
Moreover, the use of WebRTC is advantageous in that users can create Peer-to-Peer (Peer-to-Peer) data sharing and communication without installing any plug-ins or third party software.
In addition, due to the support of various browsers of WebRTC, the support degree of WebRtc in each browser exceeds 90% at present, so that the technical scheme of the application has wide application prospect.
Therefore, after the streaming media transmission channel is established, the media server of the server side can send the video to the client side in a video streaming mode, and the client side can play the video.
Example two
Based on the above embodiment, the present application further provides an on-demand method, applied to a server, including the following steps:
a service server of a server receives meta information of a video sent by a client;
a service server of a server side returns connection information for establishing a transmission video to a client side;
after the client builds connection description, the media server of the server and the client build a streaming media transmission channel;
and the media server of the server side sends the video to the client side and plays the video.
For details of implementation, refer to the first embodiment.
EXAMPLE III
Based on the first and second embodiments, the present application provides an on-demand method, applied to a server and a client, including the following steps:
the client sends the meta information of the video to a service server of the server;
a service server of a server receives meta information of a video and returns connection information for establishing a transmission video to a client;
the client builds connection description and establishes a streaming media transmission channel with a media server of the server;
and the media server of the server side acquires the video and sends the video to the client side.
For details, refer to the above embodiments.
Example four
Based on the above embodiments, the present application provides an on-demand system, including a server and a client, where:
the client is used for sending the meta information of the video to a service server of the server, constructing connection description, establishing a streaming media transmission channel with a media server of the server, and playing the video of the media server of the server;
the server side comprises a service server and a media server, wherein:
the service server is used for receiving the meta information of the video sent by the client and returning the connection information for establishing the transmission video to the client;
the media server is used for establishing a streaming media transmission channel with the client, acquiring the video, sending the video to the client and playing the video.
The embodiment of the present application further provides a storage medium, where a computer program is stored on the storage medium, and the computer program is executed by a processor to perform the on-demand method.
An embodiment of the present application further provides an electronic device, including: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the on-demand method as described in any one of the above.
It should be noted that, a person skilled in the art can understand that all or part of the steps in the various methods of the foregoing embodiments may be implemented by hardware related to instructions of a computer program, and the computer program may be stored in a computer-readable storage medium, which may include, but is not limited to: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for requesting program is applied to a client and is characterized by comprising the following steps:
sending the meta information of the video to a service server of a server side;
the method comprises the steps that a service server of a receiving server side returns connection information used for establishing a transmission video;
constructing connection description, and establishing a streaming media transmission channel with a media server of a server;
and receiving and playing the video sent by the media server of the server.
2. The on-demand method according to claim 1, wherein the build connection description includes offer sent by the sender, answer by the receiver according to the offer reply, and a transmission protocol.
3. The on-demand method of claim 2, wherein the connection description further includes a setting of a video transmission preference.
4. Method on demand according to claim 1 or 2, characterized in that the streaming media transmission channel is created on the basis of WebRTC.
5. A method for requesting program is applied to a server and is characterized by comprising the following steps:
a service server of a server receives meta-information of a video sent by a client;
a service server of a server side returns connection information for establishing a transmission video to a client side;
after the client builds connection description, the media server of the server and the client build a streaming media transmission channel;
and the media server of the server side acquires the video and sends the video to the client side.
6. The on-demand method according to claim 5, wherein the build connection description includes offer sent by the sender, answer by the receiver in response to the offer, and a transmission protocol.
7. An on-demand method is applied to a server and a client, and is characterized by comprising the following steps:
the client sends the meta information of the video to a service server of the server;
a service server of a server receives meta information of a video and returns connection information for establishing a transmission video to a client;
the client builds connection description and establishes a streaming media transmission channel with a media server of the server;
and the media server of the server side acquires the video and sends the video to the client side.
8. An on-demand system comprises a server and a client, and is characterized in that:
the client is used for sending the meta information of the video to the service server of the server, constructing connection description, establishing a streaming media transmission channel with the media server of the server, and playing the video of the media server of the server;
the server side comprises a service server and a media server, wherein:
the service server is used for receiving the meta information of the video sent by the client and returning the connection information for establishing the transmission video to the client;
the media server is used for establishing a streaming media transmission channel with the client, acquiring the video, sending the video to the client and playing the video.
9. A storage medium having stored thereon a computer program for performing an on-demand method according to any one of claims 1 to 7 when executed by a processor.
10. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the on-demand method according to any one of claims 1 to 7.
CN202211453448.XA 2022-11-21 2022-11-21 On-demand method and system Pending CN115776602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211453448.XA CN115776602A (en) 2022-11-21 2022-11-21 On-demand method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211453448.XA CN115776602A (en) 2022-11-21 2022-11-21 On-demand method and system

Publications (1)

Publication Number Publication Date
CN115776602A true CN115776602A (en) 2023-03-10

Family

ID=85389533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211453448.XA Pending CN115776602A (en) 2022-11-21 2022-11-21 On-demand method and system

Country Status (1)

Country Link
CN (1) CN115776602A (en)

Similar Documents

Publication Publication Date Title
US9979771B2 (en) Adaptive variable fidelity media distribution system and method
US10264093B2 (en) Systems and methods for partial video caching
US9584569B2 (en) Method and system for supplying media over communication networks
EP0961490A2 (en) Internet convolution audio/video server
US20130219441A1 (en) Method, server and terminal for audio and video on demand
CN108063769B (en) Method and device for realizing content service and content distribution network node
CA2845092A1 (en) Segmented content delivery
WO2017063574A1 (en) Streaming media adaptive transmission method and device
US20080115177A1 (en) Method and system for providing a file
US20130151723A1 (en) Stream media channel switch method, switch agent, client and terminal
JP6538061B2 (en) Method of providing content portions of multimedia content to a client terminal and corresponding cache
JP2008236073A (en) Data transfer system and data transfer method
CN115776602A (en) On-demand method and system
KR102237900B1 (en) Method for retrieving, by a client terminal, a content part of a multimedia content
CN115604248A (en) File transmission method and device
WO2001095119A1 (en) Caching architecture for delivery of multimedia content
SG184587A1 (en) A method and apparatus for caching and retrieving a stream object

Legal Events

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