CN110234020B - Video playing method and device - Google Patents

Video playing method and device Download PDF

Info

Publication number
CN110234020B
CN110234020B CN201810183342.XA CN201810183342A CN110234020B CN 110234020 B CN110234020 B CN 110234020B CN 201810183342 A CN201810183342 A CN 201810183342A CN 110234020 B CN110234020 B CN 110234020B
Authority
CN
China
Prior art keywords
video
playing
video data
address
request
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
CN201810183342.XA
Other languages
Chinese (zh)
Other versions
CN110234020A (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.)
Youku Culture Technology Beijing Co ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201810183342.XA priority Critical patent/CN110234020B/en
Publication of CN110234020A publication Critical patent/CN110234020A/en
Application granted granted Critical
Publication of CN110234020B publication Critical patent/CN110234020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2541Rights Management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/6473Monitoring network processes errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure relates to a video playing method and device. The method comprises the following steps: responding to a video-on-demand request, and acquiring a video playing address corresponding to the video-on-demand request; acquiring video data of the video according to the playing address, wherein the video data is transmitted by an encrypted real-time transmission message protocol RTMPE based on flow control restriction, and the flow control restriction is an upper limit used for restricting the amount of video data cached by terminal equipment in the RTMPE; the video data is played. According to the embodiment of the disclosure, the play address of the video corresponding to the on-demand request is obtained in response to the on-demand request for the video, the video data of the video transmitted based on the RTMPE for adjusting the flow control limit is obtained according to the play address, the video data is played, the transmitted video data is well protected by encrypting the video data transmission channel by using the RTMPE, and therefore the copyright protection of the on-demand video is realized at low cost.

Description

Video playing method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a video playing method and apparatus.
Background
With the arousal of copyright awareness, each video platform has more and more copyright videos, such as various types of single play dramas shot, copyright videos purchased for paying high copyright fees, and the like. The user can view the copyright video of each video platform in various ways, for example, the copyright video can be viewed through a webpage, a tablet computer video software, and the like.
Disclosure of Invention
In view of this, the present disclosure provides a video playing method and apparatus, which can implement copyright protection on a video at a lower cost.
According to an aspect of the present disclosure, a video playing method is provided, which is applied to a terminal device, and the method includes:
responding to a video-on-demand request, and acquiring a video playing address corresponding to the video-on-demand request;
acquiring video data of the video according to the playing address, wherein the video data is transmitted based on an encrypted real-Time Messaging Protocol (RTMPE) for adjusting flow control limit, and the flow control limit is an upper limit used for limiting the amount of video data cached by terminal equipment in the RTMPE;
and playing the video data.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
In a possible implementation manner, obtaining a playing address of a video corresponding to the on-demand request includes:
sending an acquisition request for a playing address of the video to a playing server, wherein the acquisition request comprises parameter information related to the on-demand request, and the parameter information is used for enabling the playing server to generate a secret key and determine the playing address according to the parameter information;
receiving the playing address and the key returned by the playing server,
wherein, obtaining the video data corresponding to the play address comprises:
sending a video playing request to a Content Delivery Network (CDN) server, wherein the video playing request comprises the playing address and the secret key, and the playing address and the secret key are used for enabling the CDN server to authenticate according to the playing address and the secret key;
and receiving the video data sent by the CDN server.
In one possible implementation, the method further includes:
caching the video data which is not played;
an index table is determined according to the time Of a key frame Of a Group Of Pictures (GOP) Of cached video data and the cache address information Of the key frame.
In one possible implementation, the method further includes:
responding to a positioning playing request for positioning and playing the video, and determining time information of the video corresponding to the positioning playing request;
judging whether the index table contains the time information or not;
when the time information is contained, determining cache address information corresponding to the time information according to the index table;
and playing the video data corresponding to the cache address information.
In one possible implementation, the method further includes:
judging whether the cache cleaning condition is met or not;
and when the cache cleaning condition is met, cleaning the cached video data and updating the index table.
In one possible implementation, the determining whether the cache flush condition is satisfied includes:
and when the cached video data is played completely or the frequency of the positioning playing request is greater than or equal to the frequency threshold value, judging that the cache cleaning condition is met.
According to another aspect of the present disclosure, a video playing method is provided, which is applied in a CDN server, and the method includes:
when a video playing request sent by terminal equipment is received, authentication is carried out according to a playing address and a secret key included in the video playing request;
and when the authentication is successful, sending the video data of the playing address to the terminal equipment based on an encrypted real-time transmission message protocol RTMPE for adjusting flow control limitation, wherein the flow control limitation is an upper limit used for limiting the amount of the video data cached by the terminal equipment in the RTMPE.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
According to another aspect of the present disclosure, there is provided a video playing apparatus applied in a terminal device, the apparatus including:
the playing address acquisition module is used for responding to a video on demand request and acquiring a playing address of a video corresponding to the video on demand request;
a video data obtaining module, configured to obtain video data of the video according to the play address, where the video data is video data transmitted by an encrypted real-time transport message protocol (RTMPE) based on a regulation flow control restriction, and the flow control restriction is an upper limit in the RTMPE for restricting an amount of video data buffered by a terminal device;
and the first playing module is used for playing the video data.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
In a possible implementation manner, the play address obtaining module includes:
an obtaining request sending submodule, configured to send an obtaining request for a playing address of the video to a playing server, where the obtaining request includes parameter information related to the on-demand request, and the parameter information is used to enable the playing server to generate a secret key and determine the playing address according to the parameter information;
a receiving submodule, configured to receive the play address and the key returned by the play server,
wherein, the video data acquisition module comprises:
the request sending submodule is used for sending a video playing request to a Content Delivery Network (CDN) server, wherein the video playing request comprises the playing address and the secret key, and the playing address and the secret key are used for enabling the CDN server to authenticate according to the playing address and the secret key;
and the video data receiving submodule is used for receiving the video data sent by the CDN server.
In one possible implementation, the apparatus further includes:
the cache module is used for caching the video data which is not played;
and the index table determining module is used for determining an index table according to the time of the key frame of the picture group GOP of the cached video data and the cache address information of the key frame.
In one possible implementation, the apparatus further includes:
the time information determining module is used for responding to a positioning playing request for positioning playing of the video and determining the time information of the video corresponding to the positioning playing request;
the first judging module is used for judging whether the index table contains the time information or not;
the information determining module is used for determining cache address information corresponding to the time information according to the index table when the time information is contained;
and the second playing module is used for playing the video data corresponding to the cache address information.
In one possible implementation, the apparatus further includes:
the second judgment module is used for judging whether the cache cleaning condition is met or not;
and the processing module is used for clearing the cached video data and updating the index table when the cache clearing condition is met.
In one possible implementation manner, the second determining module includes:
and the judgment submodule is used for judging that the cache cleaning condition is met when the cached video data are played completely or the frequency of the positioning playing request is greater than or equal to the frequency threshold value.
According to another aspect of the present disclosure, there is provided a video playing apparatus applied in a CDN server, the apparatus including:
the authentication module is used for authenticating according to a playing address and a secret key which are included in a video playing request when the video playing request sent by the terminal equipment is received;
and the video data sending module is used for sending the video data of the playing address to the terminal equipment based on an encryption real-time transmission message protocol RTMPE for adjusting flow control limitation when the authentication is successful, wherein the flow control limitation is an upper limit used for limiting the amount of video data cached by the terminal equipment in the RTMPE.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
According to another aspect of the present disclosure, there is provided a video playback apparatus including: a first processor; a first memory for storing first processor-executable instructions; wherein the first processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a first processor, implement the above-described video playback method.
According to another aspect of the present disclosure, there is provided a video playback apparatus including: a second processor; a second memory for storing second processor-executable instructions; wherein the second processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a second processor, implement the above-described video playback method.
According to the embodiment of the disclosure, the play address of the video corresponding to the on-demand request is obtained in response to the on-demand request for the video, the video data of the video transmitted based on the RTMPE for adjusting the flow control limit is obtained according to the play address, the video data is played, the transmitted video data is well protected by encrypting the video data transmission channel by using the RTMPE, and therefore the copyright protection of the on-demand video is realized at low cost.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a video playback method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a video playback method according to an example embodiment.
Fig. 3 is a flow chart illustrating a video playback method according to an example embodiment.
Figure 4 is a schematic diagram illustrating a data organization of an RTMPE transmission according to an example embodiment.
FIG. 5 is a diagram illustrating a memory model in accordance with an exemplary embodiment.
FIG. 6 is a diagram illustrating an index table in accordance with an exemplary embodiment.
Fig. 7 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment.
Fig. 8 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment.
Fig. 9 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment.
Fig. 10 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment.
Fig. 11 is a diagram illustrating an application scenario of a video playing method according to an exemplary embodiment.
Fig. 12 is a block diagram illustrating a video playback device according to an example embodiment.
Fig. 13 is a block diagram illustrating a video playback device in accordance with an exemplary embodiment.
Fig. 14 is a block diagram illustrating a video playback device according to an example embodiment.
Fig. 15 is a block diagram illustrating a video playback device according to an example embodiment.
Fig. 16 is a block diagram illustrating a video playback device according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 is a flow chart illustrating a video playback method according to an exemplary embodiment. The method can be applied to terminal devices, such as mobile phones, tablet computers, and the like, and the disclosure does not limit this. As shown in fig. 1, a video playing method according to an embodiment of the present disclosure includes:
in step S101, in response to a video-on-demand request, a play address of a video corresponding to the video-on-demand request is acquired;
in step S102, video data of the video is acquired according to the play address, where the video data is transmitted based on an encrypted real-time transmission message protocol RTMPE that adjusts a flow control limit, and the flow control limit is an upper limit in RTMPE for limiting an amount of video data buffered by a terminal device;
in step S103, the video data is played.
According to the embodiment of the disclosure, the play address of the video corresponding to the on-demand request is acquired by responding to the on-demand request of the video, the video data of the video transmitted by RTMPE based on the regulation flow control limit is acquired according to the play address, and the video data is played. The RTMPE is used for encrypting the video data transmission channel, so that the transmitted video data can be protected, the video data can be well guaranteed, the RTMPE does not need authentication management, the front-end and back-end playing architecture is slightly changed, the full links of a mobile end and a webpage end can be simultaneously covered, in addition, the video data of the video transmitted by the RTMPE based on the regulation flow control limitation can ensure that the video on demand has better playing performances of higher playing success rate, lower pause rate, small pause ratio, less independent error rate, second playing and the like, and the copyright protection of the video on demand with lower cost is realized.
For example, a user requests a certain video of a certain video platform, for example, the user requests a certain video through a web page or a mobile phone video application program, and the terminal device responds to a request for requesting the video, and acquires a playing address of the video corresponding to the request for requesting the video.
Fig. 2 is a flow chart illustrating a video playback method according to an example embodiment. In one possible implementation, as shown in fig. 2, step S101 may include:
in step S1011, an obtaining request for a playing address of the video is sent to a playing server, where the obtaining request includes parameter information related to the on-demand request, and the parameter information is used to enable the playing server to generate a key and determine the playing address according to the parameter information;
in step S1012, the playback address and the key returned by the playback server are received.
For example, the terminal device may send an acquisition request for a playing address of the video to a playing server to obtain a playing address of the video corresponding to the on-demand request. For example, the terminal device may send an acquisition request for a Play address of the video to a universal Play server ups (universal Play service), where the acquisition request includes parameter information related to the on-demand request, for example, the acquisition request includes Userid (a user account number representing an on-demand video), Ccode (representing a source of the on-demand request, for example, whether the request is from a webpage or a terminal device, etc.), Utid (a terminal device representing an on-demand video), Vid (a video account number on demand), Timestamp (on-demand time information), and the like. The playing server can generate a key and determine a playing address according to the parameter information. For example, the playing server may generate a key according to the parameter information signature, and determine a playing address of a video corresponding to the on-demand request. For example, the playing server determines uniform Resource locators (urls) (uniform Resource locators) of multiple segments of the video requested by the user, that is, the playing address of the video corresponding to the on-demand request.
The terminal device may receive the playback address and the key returned by the playback server, for example, the URLs and the keys of the plurality of segments returned by the playback server. In this way, the terminal equipment responds to the video-on-demand request of the user, and acquires the playing address of the video corresponding to the video-on-demand request so as to play the corresponding video.
Those skilled in the art will understand that the parameter information related to the on-demand request may include various forms, and may be customized, and the playback server may include various forms as long as it can generate the key and determine the playback address according to the parameter information, for example, it may generate the key according to various parameter information signatures, determine the playback address corresponding to the request for obtaining the playback address, and the like, which is not limited in this disclosure.
After the terminal device obtains the playing address of the video corresponding to the on-demand request, the terminal device obtains the video data of the video according to the playing address, wherein the video data is transmitted by an encrypted real-time transmission message protocol RTMPE based on the adjustment flow control limit, and the flow control limit is an upper limit used for limiting the amount of video data cached by the terminal device in the RTMPE (step S102).
In one possible implementation, as shown in fig. 2, step S102 may include:
in step S1021, a video playing request is sent to a content distribution network CDN server, where the video playing request includes the playing address and the key, and the playing address and the key are used to enable the CDN server to authenticate according to the playing address and the key;
in step S1022, video data sent by the CDN server is received.
For example, the terminal device may send a video playing request to a CDN server, where the video playing request includes the playing address and the key, and the playing address and the key are used to enable the CDN server to perform authentication according to the playing address and the key. For example, when the CDN server signs a signature according to the key and determines that the parameter information is consistent with the parameter information verified by the play server, the CDN server successfully authenticates the play address, and the CDN server may start sending corresponding video data to the terminal device. The terminal device may receive video data sent by the CDN server to obtain video data of the video.
By the mode, the playing address and the secret key can be authenticated through the CDN server, the playing of an authorized user is guaranteed, the authentication process is simple, the dependence on factors such as a network is small, the verification time is short, the verification success rate is high, and therefore the situations of tampering, clamping and stealing can be effectively prevented. Those skilled in the art will appreciate that the terminal device may acquire the video data of the video according to the play address in various ways. In addition, the authentication mode may also include various forms, for example, as described above, the CDN server performs authentication according to the play address and the secret key, may also set an authentication white list, and may also ensure that the authorized user plays through the authentication mode of the rtmmpe protocol itself. For example, swf (shock Wave flash) authentication is performed for each request. For example, both the terminal device and the server download the SWF file and calculate the hash value. The server sends a verification request to the terminal device and verifies the hash value returned by the terminal device, if the verification is passed, the authentication is successful, and the like, as long as the authorized user can be ensured to play the video through the authentication, the disclosure does not limit the same.
It should be noted that the video data received by the terminal device and sent by the CDN server is video data transmitted based on an encrypted real-time transport message protocol RTMPE that adjusts a flow control restriction, where the flow control restriction is an upper limit used for restricting an amount of video data cached by the terminal device in the RTMPE. For example, after the CDN server successfully authenticates the play address, the CDN server prepares to start sending video data of the video to the terminal device, and the terminal device prepares to receive the video data sent by the CDN server.
In a possible implementation manner, the terminal device may perform handshake with the CDN server according to a transmission channel handshake process defined by the rtmmpe protocol, and start transmission of video data.
For example, after the CDN server is authenticated successfully, the CDN server and the terminal device may handshake according to a transmission channel handshake process defined by an rtmmpe protocol, thereby establishing an effective rtmmpe connection and starting transmission of video data. Therefore, the characteristics of rapid encryption, no need of authentication management, high efficiency and the like of the RTMPE protocol can be utilized to realize the transmission of the video data. The present disclosure does not limit the manner and process of handshaking between the terminal device and the CDN server.
The video data is transmitted by an encrypted real-time transmission message protocol RTMPE based on the regulation flow control limit, and the flow control limit is an upper limit used for limiting the amount of the video data cached by the terminal equipment in the RTMPE. For example, the rtmmpe is a live broadcast protocol, in a live broadcast, a server needs to transmit video data at a play speed of a live video, so as to synchronize a video data receiving end and a video data transmitting end, for this reason, an upper limit for limiting the amount of video data buffered by a terminal device exists in the rtmmpe, so as to ensure synchronization of the video data receiving end and the video data transmitting end. For example, RTMPE includes a certain parameter that limits an upper limit of the amount of video data buffered by the terminal device, and the parameter is a parameter limited by the flow control. By adjusting the flow control limit of RTMPE, video data can be ensured to be rapidly transmitted between the CDN server and the terminal equipment, and the utilization rate of transmission bandwidth is improved, so that the on-demand video can be played with high quality without pause.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
For example, the flow control limit of the RTMPE can be adjusted by at least one of removing an upper limit in the RTMPE for limiting the amount of video data buffered by the terminal device and increasing the upper limit in the RTMPE for limiting the amount of video data buffered by the terminal device. For example, the flow control limit of the RTMPE can be adjusted by removing a certain parameter that limits the upper limit of the amount of video data buffered by the terminal device or adjusting the value of the parameter, and increasing the upper limit of the amount of video data buffered by the terminal device in the RTMPE.
By the method, the flow control limit of RTMPE can be adjusted in various ways, so that video data can be rapidly transmitted between the CDN server and the terminal equipment, the utilization rate of transmission bandwidth is improved, and high-quality on-demand video playing without blockage is guaranteed. The present disclosure is not limited to the specific manner in which the flow control restrictions are adjusted.
As shown in fig. 1, in step S103, the video data is played.
For example, the terminal device may receive and play video data. For example, the CDN server transmits video data through an RTMPE protocol that adjusts flow control restriction, for example, sends the video data to the terminal device at full speed with maximum bandwidth. The terminal equipment can obtain more video data as much as possible, and the terminal equipment can obtain more video data by fully utilizing a preloading mechanism, a caching mechanism and the like. For example, the terminal device receives URLs of multiple segments of the video returned by the playing server, and when playing video data belonging to a first segment, the terminal device may preload video data of the remaining segments. The terminal device may detect an eop (complete) signal of the video data according to an RTMPE standard, determine whether the fragment downloading is finished, and may pre-download the video data of the next fragment when the fragment downloading is finished. Therefore, the success rate and the fluency of video playing can be improved.
Fig. 3 is a flow chart illustrating a video playback method according to an example embodiment. In one possible implementation, as shown in fig. 3, the method further includes:
in step S104, the video data not played is cached;
in step S105, an index table is determined based on the time of a key frame of a group of pictures GOP of buffered video data and the buffer address information of the key frame.
For example, the terminal device may buffer the unplayed video data, for example, the video duration is 30 minutes, when the terminal device plays from 0 minute to 2 minutes from the beginning of the video, the terminal device may have received the video data of the first 10 minutes of the video, and the terminal device may buffer the unplayed video data, for example, buffer the unplayed video data into a memory queue of the terminal device.
Figure 4 is a schematic diagram illustrating a data organization of an RTMPE transmission according to an example embodiment. In one possible implementation, as shown in fig. 4, the Chunk Format of the video Data sent by the CDN server includes a Chunk Header and Chunk Data Chunk, where the Chunk Data is an AVPacket (a Data structure) in a streaming media flv (flash video) Format. The Chunk Header comprises a Basic Header, a Message Header and an Extended Timestamp.
In a possible implementation manner, the terminal device may determine the index table according to the time of the key frame of the group of pictures GOP of the buffered video data and the buffer address information of the key frame. A group of pictures GOP may refer to a group of pictures that the video coding starts with a key frame (I-frame).
For example, the terminal device may determine the index table according to the time of a key frame (I frame) of a group of pictures GOP of the buffered video data and the buffer address information of the key frame.
FIG. 5 is a diagram illustrating a memory model in accordance with an exemplary embodiment. In a possible implementation manner, as shown in fig. 5, the terminal device may cache a data packet sent by the CDN server in a memory queue, and determine the index table according to the time of a key frame of a group of pictures GOP of the cached video data and cache address information of the key frame.
For example, the first byte of the FLV format packet may indicate whether the Chunk Data is a key frame of a group of pictures GOP (I-frame of a GOP), and after receiving the Chunk Data sent by the CDN server, the terminal device may determine whether the Chunk Data is a key frame of a GOP. When the video Data is a key frame (I-frame of GOP), the Chunk Data (AVPacket Data packet) may be directly buffered in the memory queue, and the terminal device may determine the index table according to the time of the key frame of the GOP of the picture group of buffered video Data and the buffer address information of the key frame because the Chunk Header has the timestamp of the frame Data.
In this way, the index table can be determined according to the time of the key frame of the buffered video data group of pictures GOP and the buffer address information of the key frame, so as to realize positioning playing.
FIG. 6 is a diagram illustrating an index table in accordance with an exemplary embodiment. In a possible implementation manner, as shown in fig. 6, after receiving Chunk Data sent by the CDN server, the terminal device may determine whether the Chunk Data is a key frame of a GOP, for example, if the frame is a key frame, cache the Chunk Data (AVPacket Data packet) in a memory queue (cache address information 1), and establish a corresponding relationship in the index table by having a timestamp (e.g., key frame time 1, 02:00) of the frame Data in the Chunk Header. The next frame is a non-key frame (e.g., B frame), and at this time, the Chunk Data (AVPacket) may be buffered behind the last Chunk Data (e.g., behind buffer address information 1) until the next key frame is determined (e.g., key frame time 2, 02:10), and the next corresponding relationship in the index table is established according to the buffer address information 2 and the timestamp (02:10) of the key frame.
Fig. 7 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment. In one possible implementation, as shown in fig. 7, the method further includes:
in step S106, in response to a positioning play request for positioning and playing the video, determining time information of the video corresponding to the positioning play request;
in step S107, it is determined whether the index table includes the time information;
in step S108, when the time information is included, cache address information corresponding to the time information is determined according to the index table;
in step S109, the video data corresponding to the cache address information is played.
For example, the user may position the video to play during the playing process. For example, when it plays to 2 minutes into the video, the user clicks or fast-forwards to 6 minutes into the video. The terminal equipment responds to a positioning playing request for positioning playing of the video, and can determine the time information of the video corresponding to the positioning playing request. For example, the time information of the video corresponding to the positioning playing request is determined to be 6 minutes of the video. The terminal device may determine whether the index table includes the time information. For example, if the time of the key frame in the index table that is cached and determined before the terminal device is 2 minutes to 15 minutes, at this time, when the index table includes the time information, the cache address information corresponding to the time information is determined according to the index table.
For example, if 6 minutes is exactly the time of a key frame of a GOP, the cache address information corresponding to the time of the key frame in the index table may be determined as the cache address information corresponding to the time information. When 6 minutes is a non-key frame time, for example, 5 minutes and 58 seconds of key frame time and the buffer address time corresponding to the key frame time, and 6 minutes and 08 seconds of key frame time and the buffer address time corresponding to the key frame time exist in the index table, at this time, the terminal device may determine the buffer address information corresponding to the time point (5 minutes and 58 seconds of key frame time) closest to 6 minutes as the buffer address information corresponding to the time information. After the terminal device determines the cache address information corresponding to the time information, the video data corresponding to the cache address information can be played.
By the method, the corresponding video data can be quickly positioned and played through the cache, and the playing fluency of the video-on-demand is ensured. Those skilled in the art will understand that, in response to a positioning play request for positioning playing of the video, time information of the video corresponding to the positioning play request may be determined, and whether the time information is included in the index table may be determined, for example, by querying the index table. When the time information is included, according to the index table, determining the cache address information corresponding to the time information, and playing the video data corresponding to the cache address information, for example, directly sending the video data corresponding to the cache address information to a computer program, such as FFMPEG playing, and the like, which is not limited in this disclosure.
In a possible implementation manner, when the index table does not contain the time information, the terminal device may obtain the video data of the video according to a corresponding play address.
For example, the time of the key frame in the index table that is cached and determined before the terminal device is 2 minutes to 15 minutes, when the time information of the video corresponding to the positioning playing request is determined to be 20 minutes (for example, the user directly clicks the video playing progress bar for 20 minutes), the terminal device determines that the index table does not include the time information, and the terminal device may obtain the video data of the video according to the corresponding playing address. For example, the video may include multiple segments, the terminal device may send a video playing request to the CDN server according to a playing address and time information (20 minutes) of a segment where the 20 minutes is located, after the CDN server succeeds in authentication, may send corresponding video data to the terminal device, the terminal device receives and plays the video data, and the terminal device may dynamically update the index table according to the cached video data, which is not described herein again.
Fig. 8 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment. In one possible implementation, as shown in fig. 8, the method further includes:
in step S110, it is determined whether a cache cleaning condition is satisfied;
in step S111, when the cache cleaning condition is satisfied, the cached video data is cleaned and the index table is updated.
For example, the terminal device may determine whether the cache cleaning condition is satisfied, and when the cache cleaning condition is satisfied, clean the cached video data and update the index table.
By the method, the terminal equipment can timely clear the cached video data and update the index table, and the confidentiality of the on-demand video and the normal playing of the on-demand video are ensured. It will be understood by those skilled in the art that different buffer cleaning conditions may be set, and the buffered video data may be cleaned and the index table may be updated in a manner well known in the relevant art, which is not limited by the present disclosure.
Fig. 9 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment. In one possible implementation, as shown in fig. 9, step S110 may include:
in step S1101, when the playback of the cached video data is completed or the frequency of the positioning playback request is greater than or equal to the frequency threshold, it is determined that the cache cleaning condition is satisfied.
For example, when the buffered video data is played, it is determined that the buffer cleaning condition is satisfied. For example, the video includes multiple segments, and in the video playing process, when the playing of the first segment of the video is completed, the terminal device may destroy the video data of the first segment cached in the memory. Therefore, the memory occupation can be reduced, the terminal equipment does not have the cache of the whole video locally, part of video data is cached in the memory and is cleaned in time, the confidentiality of the video data can be ensured, and the video data is prevented from being stolen.
When the frequency of the positioning playing request is greater than or equal to the frequency threshold, the terminal device may also determine that the cache cleaning condition is satisfied. For example, when a user frequently positions and plays a video, cache fragments, segment cross overlapping and the like are easily caused, and the terminal device may determine that the cache cleaning condition is satisfied when the frequency of the positioning and playing request is greater than or equal to the frequency threshold. Therefore, the video can be played normally and smoothly by the user. Those skilled in the art will appreciate that the cache flush condition may include various forms, and is not limited to the above examples, and the frequency threshold may be set, which is not limited by the present disclosure.
Fig. 10 is a flow chart illustrating a video playback method in accordance with an exemplary embodiment. The method may be applied to a server, and the present disclosure is not limited thereto. As shown in fig. 10, a video playing method according to an embodiment of the present disclosure includes:
in step S201, when a video playing request sent by a terminal device is received, performing authentication according to a playing address and a secret key included in the video playing request;
in step S202, when the authentication is successful, sending the video data of the playing address to the terminal device based on an encrypted real-time transport message protocol RTMPE for adjusting a flow control restriction, where the flow control restriction is an upper limit used for restricting a buffer video data amount of the terminal device in the RTMPE.
According to the embodiment of the disclosure, when a video playing request sent by a terminal device is received, authentication can be performed according to a playing address and a secret key included in the video playing request, when the authentication is successful, video data of the playing address is sent to the terminal device based on an encryption real-time transmission message protocol RTMPE for adjusting flow control limit, the transmitted video data can be protected by utilizing the encryption of the RTMPE to a video data transmission channel, the video data can be well ensured, the RTMPE does not need authentication management, so that the front-end and back-end playing architecture is slightly changed, a full link of a mobile end and a web end can be simultaneously covered, in addition, the video data of the video transmitted based on the RTMPE for adjusting flow control limit can ensure that the video on demand has better playing performance such as higher playing success rate, lower pause rate, small pause ratio, less independent error rate and second playing, copyright protection of the on-demand video at a lower cost is achieved.
For example, when receiving a video playing request sent by a terminal device, the CDN server performs authentication according to a playing address and a secret key included in the video playing request. For example, the CDN server may sign according to the secret key, and when it is determined that the parameter information is consistent with the parameter information verified by the play server, the CDN server successfully authenticates the play address. And when the authentication is successful, the CDN server sends the video data of the playing address to the terminal equipment based on an encrypted real-time transmission message protocol RTMPE for adjusting flow control limit, wherein the flow control limit is an upper limit used for limiting the amount of video data cached by the terminal equipment in the RTMPE.
By the mode, the playing address and the secret key can be authenticated through the CDN server, the playing of an authorized user is guaranteed, the authentication process is simple, the dependence on factors such as a network is small, the verification time is short, the verification success rate is high, and therefore the situations of tampering, clamping and stealing can be effectively prevented. Those skilled in the art will appreciate that the CDN server can authenticate the play address and the key in a variety of ways, and the disclosure is not limited in this regard.
In a possible implementation manner, as described above, after the CDN server succeeds in authentication, the CDN server and the terminal device may perform handshake according to a handshake process of a transmission channel defined by an rtmmpe protocol, and start transmission of video data. Therefore, the characteristics of rapid encryption, no need of authentication management, high efficiency and the like of the RTMPE protocol can be utilized to realize the transmission of the video data.
The CDN server sends the video data of the play address to the terminal device based on an encrypted real-time transport message protocol RTMPE for adjusting a flow control restriction, where the flow control restriction is an upper limit used to limit an amount of video data cached by the terminal device in the RTMPE, and as described above, details are not repeated here.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
For example, the flow control limit of the RTMPE can be adjusted by at least one of removing the upper limit in the RTMPE for limiting the amount of video data buffered by the terminal device and increasing the upper limit in the RTMPE for limiting the amount of video data buffered by the terminal device, and as described above, the description is omitted here.
By the method, the flow control limit of RTMPE can be adjusted in various ways, so that video data can be rapidly transmitted between the CDN server and the terminal equipment, the utilization rate of transmission bandwidth is improved, and high-quality on-demand video playing without blockage is guaranteed. The present disclosure is not limited to the specific manner in which the flow control restrictions are adjusted.
Application example
An application example according to the embodiment of the present disclosure is given below in conjunction with "user-on-demand video" as an exemplary application scenario to facilitate understanding of the flow of the video playing method. It is to be understood by those skilled in the art that the following application examples are for the purpose of facilitating understanding of the embodiments of the present disclosure only and are not to be construed as limiting the embodiments of the present disclosure.
Fig. 11 is a diagram illustrating an application scenario of a video playing method according to an exemplary embodiment. As shown in fig. 11, in this application example, a user requests a video through a terminal device thereof, and the terminal device thereof acquires a playing address of the video corresponding to a request for the video in response to the request for the video by the user. For example, the terminal device sends an acquisition request for a play address of the video to a play server, where the acquisition request includes parameter information related to the on-demand request, such as Userid (representing a user account of the on-demand video), Ccode (representing a source of the on-demand request, for example, whether the on-demand request is from a webpage or a terminal device, etc.), Utid (representing a terminal device of the on-demand video), Vid (an account of the on-demand video), Timestamp (information on-demand time), and so on.
In this application example, the playback server generates a key and determines a playback address according to the parameter information, and the playback server returns the key and the playback address to the terminal device. And the terminal equipment receives the playing address and the secret key returned by the playing server.
In the application example, the terminal device obtains the video data of the video according to the playing address. For example, as shown in fig. 11, the terminal device may send a video playing request to a content delivery network CDN server, where the video playing request includes the playing address and the key.
In this application example, when receiving a video playing request sent by a terminal device, a CDN server may perform authentication according to a playing address and a secret key included in the video playing request, and when the authentication is successful, send video data of the playing address to the terminal device based on an encrypted real-time transport message protocol RTMPE for adjusting a flow control restriction, where the flow control restriction is an upper limit used to limit an amount of video data cached by the terminal device in the RTMPE. For example, the CDN server and the terminal device may handshake according to a handshake process of a transmission channel defined by an RTMPE protocol, and start transmission of video data, where the transmission of the video data is protected by the channel, which may prevent a third party from intercepting data transmission between the CDN server and the terminal device.
In this application example, the transmission of the video data is an encrypted real-time transport message protocol RTMPE based on adjusting the flow control restriction, where adjusting the flow control restriction includes at least one of removing an upper limit for limiting the amount of buffered video data of the terminal device in the RTMPE and increasing an upper limit for limiting the amount of buffered video data of the terminal device in the RTMPE.
In this application example, the terminal device plays the video data. For example, the CDN server transmits video data through an RTMPE protocol that adjusts flow control restriction, for example, sends the video data to the terminal device at full speed with maximum bandwidth. The terminal equipment can obtain more video data by fully utilizing a preloading mechanism, a caching mechanism and the like. In this application example, the terminal device may cache unplayed video data, and determine the index table according to the time of the key frame of the group of pictures GOP of the cached video data and the cache address information of the key frame. For example, the user terminal device plays video for 2 minutes, and the terminal device buffers video data for 10 minutes of the video, at this time, the index table may query the correspondence between the time of the key frame of the group of pictures GOP of the video data between 2 minutes and 10 minutes and the buffer address information of the key frame.
In this application example, a user may wish to perform positioning playing on a video, for example, playing the video for 2 minutes at this time, and directly perform positioning playing on video content for 6 minutes, and a terminal device, in response to a positioning playing request for positioning playing the video, determines time information of the video corresponding to the positioning playing request, determines whether the index table includes the time information, and determines cache address information corresponding to the time information according to the index table when the time information is included, and plays video data corresponding to the cache address information. For example, the index table is queried to determine whether the time information of 6 minutes is contained, and if the time information is contained, the corresponding buffer address information is determined, and the corresponding video data is sent to the FFMPEG for playing.
In the application example, the terminal device determines whether the cache cleaning condition is met, and when the cache cleaning condition is met, the terminal device cleans the cached video data and updates the index table. In this application example, when the cached video data is played completely or the frequency of the positioning play request is greater than or equal to the frequency threshold, it is determined that the cache cleaning condition is satisfied. For example, the video is the first segment from 0 minute to 6 minutes, and after the video data of the first segment is played, the terminal device may clear the cached video data of the first segment and update the index table. For example, the correspondence between the time of the key frame of the GOP included in the first slice in the index table and the cache address information is deleted. When the user frequently positions and plays the video, for example, when the frequency of the positioning and playing request is greater than or equal to the frequency threshold, the terminal device may clean the memory and update the index table.
According to the embodiment of the disclosure, the play address of the video corresponding to the on-demand request is acquired by responding to the on-demand request of the video, the video data of the video transmitted by RTMPE based on the regulation flow control limit is acquired according to the play address, and the video data is played. The RTMPE is used for encrypting the video data transmission channel, so that the transmitted video data can be protected, the video data can be well guaranteed, the RTMPE does not need authentication management, the front-end and back-end playing architecture is slightly changed, the full links of a mobile end and a webpage end can be simultaneously covered, in addition, the video data of the video transmitted by the RTMPE based on the regulation flow control limitation can ensure that the video on demand has better playing performances of higher playing success rate, lower pause rate, small pause ratio, less independent error rate, second playing and the like, and the copyright protection of the video on demand with lower cost is realized.
Fig. 12 is a block diagram illustrating a video playback device according to an example embodiment. As shown in fig. 12, the video playback apparatus includes:
a play address obtaining module 301, configured to respond to a video-on-demand request, and obtain a play address of a video corresponding to the video-on-demand request;
a video data obtaining module 302, configured to obtain video data of the video according to the play address, where the video data is video data transmitted by an encrypted real-time transport message protocol RTMPE that is based on a regulation flow control restriction, and the flow control restriction is an upper limit in the RTMPE that is used to limit an amount of video data buffered by a terminal device;
a first playing module 303, configured to play the video data.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
Fig. 13 is a block diagram illustrating a video playback device in accordance with an exemplary embodiment. As shown in fig. 13, in a possible implementation manner, the play address obtaining module 301 includes:
an obtaining request sending submodule 3011, configured to send an obtaining request for a playing address of the video to a playing server, where the obtaining request includes parameter information related to the on-demand request, and the parameter information is used to enable the playing server to generate a key and determine the playing address according to the parameter information;
a receiving sub-module 3012, configured to receive the playing address and the key returned by the playing server,
wherein the video data obtaining module 302 includes:
a request sending submodule 3021, configured to send a video playing request to a content delivery network CDN server, where the video playing request includes the playing address and the key, and the playing address and the key are used to enable the CDN server to perform authentication according to the playing address and the key;
a video data receiving submodule 3022, configured to receive video data sent by the CDN server.
As shown in fig. 13, in a possible implementation, the apparatus further includes:
a buffer module 304, configured to buffer unplayed video data;
the index table determining module 305 is configured to determine an index table according to the time of the key frame of the group of pictures GOP of the cached video data and the cache address information of the key frame.
As shown in fig. 13, in a possible implementation, the apparatus further includes:
a time information determining module 306, configured to determine, in response to a positioning playing request for positioning playing of the video, time information of the video corresponding to the positioning playing request;
a first determining module 307, configured to determine whether the index table includes the time information;
an information determining module 308, configured to determine, when the time information is included, cache address information corresponding to the time information according to the index table;
and a second playing module 309, configured to play the video data corresponding to the cache address information.
As shown in fig. 13, in a possible implementation, the apparatus further includes:
a second judging module 310, configured to judge whether a cache cleaning condition is met;
and the processing module 311 is configured to, when the cache cleaning condition is met, clean the cached video data and update the index table.
As shown in fig. 13, in a possible implementation manner, the second determining module 310 includes:
the determining sub-module 3101 is configured to determine that the cache clearing condition is met when the cached video data is played completely or the frequency of the positioning playing request is greater than or equal to the frequency threshold.
Fig. 14 is a block diagram illustrating a video playback device according to an example embodiment. As shown in fig. 14, the video playback apparatus includes:
the authentication module 401 is configured to authenticate according to a play address and a secret key included in a video play request when receiving the video play request sent by a terminal device;
and a video data sending module 402, configured to send, to the terminal device, video data of the play address based on an encrypted real-time transport message protocol RTMPE for adjusting a flow control restriction, where the flow control restriction is an upper limit used to restrict a buffer video data amount of the terminal device in the RTMPE when the authentication is successful.
In one possible implementation, the adjusting the flow control limit includes at least one of removing an upper limit in the RTMPE and increasing an upper limit in the RTMPE for limiting the amount of the terminal device buffered video data.
Fig. 15 is a block diagram illustrating a video playback device according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 15, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
Fig. 16 is a block diagram illustrating a video playback device according to an example embodiment. For example, the apparatus 1900 may be provided as a server. Referring to FIG. 16, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the apparatus 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (20)

1. A video playing method is applied to terminal equipment, and is characterized by comprising the following steps:
responding to a video-on-demand request, and acquiring a video playing address corresponding to the video-on-demand request and a key generated according to the video-on-demand request;
acquiring video data of the video according to the playing address and the key, wherein the video data is transmitted by an encrypted real-time transmission message protocol RTMPE based on flow control restriction adjustment, and the flow control restriction is an upper limit used for restricting the amount of video data cached by terminal equipment in the RTMPE;
playing the video data;
wherein, according to the play address and the key, obtaining the video data of the video comprises:
sending a video playing request to a Content Delivery Network (CDN) server, wherein the video playing request comprises the playing address and the secret key, and the playing address and the secret key are used for enabling the CDN server to authenticate according to the playing address and the secret key; and receiving the video data sent by the CDN server.
2. The method of claim 1, wherein adjusting the flow control limit comprises at least one of removing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE and increasing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE.
3. The method of claim 1, wherein obtaining the playing address of the video corresponding to the on-demand request and the key generated according to the on-demand request comprises:
sending an acquisition request for a playing address of the video to a playing server, wherein the acquisition request comprises parameter information related to the on-demand request, and the parameter information is used for enabling the playing server to generate the secret key and determine the playing address according to the parameter information;
and receiving the playing address returned by the playing server and the key.
4. The method of claim 1, further comprising:
caching the video data which is not played;
and determining an index table according to the time of the key frame of the picture group GOP of the cached video data and the cache address information of the key frame.
5. The method of claim 4, further comprising:
responding to a positioning playing request for positioning and playing the video, and determining time information of the video corresponding to the positioning playing request;
judging whether the index table contains the time information or not;
when the time information is contained, determining cache address information corresponding to the time information according to the index table;
and playing the video data corresponding to the cache address information.
6. The method of claim 4, further comprising:
judging whether the cache cleaning condition is met or not;
and when the cache cleaning condition is met, cleaning the cached video data and updating the index table.
7. The method of claim 6, wherein determining whether the cache flush condition is satisfied comprises:
and when the cached video data is played completely or the frequency of the positioning playing request is greater than or equal to the frequency threshold value, judging that the cache cleaning condition is met.
8. A video playing method is applied to a CDN server, and is characterized by comprising the following steps:
when a video playing request sent by terminal equipment is received, authentication is carried out according to a playing address and a secret key which are included in the video playing request, wherein the secret key is generated according to an on-demand request of the terminal;
and when the authentication is successful, sending the video data of the playing address to the terminal equipment based on an encrypted real-time transmission message protocol RTMPE for adjusting flow control limitation, wherein the flow control limitation is an upper limit used for limiting the amount of the video data cached by the terminal equipment in the RTMPE.
9. The method of claim 8, wherein adjusting the flow control limits comprises at least one of removing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE and increasing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE.
10. A video playing device is applied to terminal equipment, and is characterized in that the device comprises:
the playing address acquisition module is used for responding to a video-on-demand request, acquiring a video playing address corresponding to the video-on-demand request and a key generated according to the video-on-demand request;
a video data obtaining module, configured to obtain video data of the video according to the play address and the key, where the video data is video data transmitted by an encrypted real-time transport message protocol (RTMPE) based on a regulation flow control restriction, and the flow control restriction is an upper limit in the RTMPE for restricting an amount of video data buffered by a terminal device;
the first playing module is used for playing the video data;
wherein, the video data acquisition module comprises:
the request sending submodule is used for sending a video playing request to a Content Delivery Network (CDN) server, wherein the video playing request comprises the playing address and the secret key, and the playing address and the secret key are used for enabling the CDN server to authenticate according to the playing address and the secret key; and the video data receiving submodule is used for receiving the video data sent by the CDN server.
11. The apparatus of claim 10, wherein adjusting the flow control limits comprises at least one of removing an upper limit in RTMPE and increasing an upper limit in RTMPE for limiting the amount of buffered video data for the terminal device.
12. The apparatus of claim 10, wherein the play address obtaining module comprises:
an obtaining request sending submodule, configured to send an obtaining request for a playing address of the video to a playing server, where the obtaining request includes parameter information related to the on-demand request, and the parameter information is used to enable the playing server to generate the key and determine the playing address according to the parameter information;
and the receiving submodule is used for receiving the playing address returned by the playing server and the key.
13. The apparatus of claim 10, further comprising:
the cache module is used for caching the video data which is not played;
and the index table determining module is used for determining an index table according to the time of the key frame of the picture group GOP of the cached video data and the cache address information of the key frame.
14. The apparatus of claim 13, further comprising:
the time information determining module is used for responding to a positioning playing request for positioning playing of the video and determining the time information of the video corresponding to the positioning playing request;
the first judging module is used for judging whether the index table contains the time information or not;
the information determining module is used for determining cache address information corresponding to the time information according to the index table when the time information is contained;
and the second playing module is used for playing the video data corresponding to the cache address information.
15. The apparatus of claim 13, further comprising:
the second judgment module is used for judging whether the cache cleaning condition is met or not;
and the processing module is used for clearing the cached video data and updating the index table when the cache clearing condition is met.
16. The apparatus of claim 15, wherein the second determining module comprises:
and the judgment submodule is used for judging that the cache cleaning condition is met when the cached video data are played completely or the frequency of the positioning playing request is greater than or equal to the frequency threshold value.
17. A video playing device is applied to a CDN server, and is characterized by comprising:
the authentication module is used for authenticating according to a playing address and a secret key which are included in a video playing request when the video playing request sent by the terminal equipment is received, wherein the secret key is generated according to the on-demand request of the terminal;
and the video data sending module is used for sending the video data of the playing address to the terminal equipment based on an encryption real-time transmission message protocol RTMPE for adjusting flow control limitation when the authentication is successful, wherein the flow control limitation is an upper limit used for limiting the amount of video data cached by the terminal equipment in the RTMPE.
18. The apparatus of claim 17, wherein adjusting the flow control limits comprises at least one of removing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE and increasing an upper limit for limiting the amount of buffered video data for the terminal device in RTMPE.
19. A video playback apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1 to 9.
20. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1 to 9.
CN201810183342.XA 2018-03-06 2018-03-06 Video playing method and device Active CN110234020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810183342.XA CN110234020B (en) 2018-03-06 2018-03-06 Video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810183342.XA CN110234020B (en) 2018-03-06 2018-03-06 Video playing method and device

Publications (2)

Publication Number Publication Date
CN110234020A CN110234020A (en) 2019-09-13
CN110234020B true CN110234020B (en) 2021-11-19

Family

ID=67862171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810183342.XA Active CN110234020B (en) 2018-03-06 2018-03-06 Video playing method and device

Country Status (1)

Country Link
CN (1) CN110234020B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788374B (en) * 2019-11-05 2023-02-28 腾讯科技(深圳)有限公司 Information processing method, device, equipment and storage medium
CN111131849B (en) * 2019-12-26 2022-07-08 视联动力信息技术股份有限公司 Streaming media live broadcast method and device and computer readable storage medium
CN111954014B (en) * 2020-08-13 2022-01-28 北京金山云网络技术有限公司 Live broadcast stream pushing method and device, storage medium and equipment
CN112565906A (en) * 2020-11-05 2021-03-26 深圳市麦谷科技有限公司 On-demand video processing method and system
CN115623282B (en) * 2022-12-02 2023-04-07 杭州海康威视数字技术股份有限公司 Fixed-point playing method and device of encrypted video, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259861A (en) * 2013-05-16 2013-08-21 深圳市共进电子股份有限公司 Method and system for recording and watching network videos
CN103369351A (en) * 2012-03-29 2013-10-23 深圳市龙视传媒有限公司 Streaming media fast-forward and fast-backward processing method, video server and system
CN103731720A (en) * 2013-11-25 2014-04-16 乐视致新电子科技(天津)有限公司 Method and device for caching multimedia data of smart television
CN104113770A (en) * 2013-04-18 2014-10-22 深圳市云帆世纪科技有限公司 Webpage video playing method and device
CN104144160A (en) * 2014-07-08 2014-11-12 北京彩云动力教育科技有限公司 Online video resource downloading prevention method and system
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN106658067A (en) * 2016-12-31 2017-05-10 ***通信集团江苏有限公司 Cache setting method and apparatus
CN107465679A (en) * 2017-08-07 2017-12-12 郑州仁峰软件开发有限公司 A kind of streaming media control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075792B (en) * 2010-12-23 2013-01-02 华为技术有限公司 Video file playing method and system, user equipment and server equipment
EP3076680A4 (en) * 2013-11-25 2016-10-26 Le Shi Zhi Xin Electronic Technology Tianjin Ltd Video playback method, apparatus and intelligent terminal
CN104284213A (en) * 2014-09-26 2015-01-14 深圳市同洲电子股份有限公司 Hotlink protection method, client side and system
CN105141984A (en) * 2015-08-21 2015-12-09 湖南亿谷科技发展股份有限公司 Network video obtaining system and network video obtaining method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103369351A (en) * 2012-03-29 2013-10-23 深圳市龙视传媒有限公司 Streaming media fast-forward and fast-backward processing method, video server and system
CN104113770A (en) * 2013-04-18 2014-10-22 深圳市云帆世纪科技有限公司 Webpage video playing method and device
CN103259861A (en) * 2013-05-16 2013-08-21 深圳市共进电子股份有限公司 Method and system for recording and watching network videos
CN103731720A (en) * 2013-11-25 2014-04-16 乐视致新电子科技(天津)有限公司 Method and device for caching multimedia data of smart television
CN104144160A (en) * 2014-07-08 2014-11-12 北京彩云动力教育科技有限公司 Online video resource downloading prevention method and system
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN106658067A (en) * 2016-12-31 2017-05-10 ***通信集团江苏有限公司 Cache setting method and apparatus
CN107465679A (en) * 2017-08-07 2017-12-12 郑州仁峰软件开发有限公司 A kind of streaming media control method

Also Published As

Publication number Publication date
CN110234020A (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN110234020B (en) Video playing method and device
US20200236408A1 (en) Reducing time to first encrypted frame in a content stream
CN110138749B (en) Data security protection method and related equipment
US9819652B2 (en) Information interaction methods and devices
CN106911967B (en) Live broadcast playback method and device
EP2744169B1 (en) Method and apparatus for playing streaming media files
US9980136B2 (en) Content access authentication for dynamic adaptive streaming over hypertext transfer protocol
US20140032756A1 (en) Device communication
CN107197320B (en) Video live broadcast method, device and system
WO2012113260A1 (en) Video play method and device
CN104837035A (en) Video playing method and terminal
RU2673560C1 (en) Method and system for displaying multimedia information, standardized server and direct broadcast terminal
CN104125067A (en) Account and token secret key binding method and device
CN110493627B (en) Multimedia content synchronization method and device
CN108667871B (en) Transmission method and device based on P2P
US20220353552A1 (en) Methods and devices for pulling live stream
CN111030897A (en) Wired network distribution method and device, electronic equipment and storage medium
CN110753106A (en) File uploading method and device and electronic equipment
CN108574860B (en) Multimedia resource playing method and device
CN105187154A (en) Response packet reception time delay method and response packet reception time delay device
CN112434339A (en) Information processing method and device
CN111050209A (en) Multimedia resource playing method and device
WO2022237379A1 (en) Screen projection method and electronic device
CN106791925B (en) Video generation method and device
CN110740360B (en) Multimedia resource playing method and device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200426

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Applicant before: Youku network technology (Beijing) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240624

Address after: 101400 Room 201, 9 Fengxiang East Street, Yangsong Town, Huairou District, Beijing

Patentee after: Youku Culture Technology (Beijing) Co.,Ltd.

Country or region after: China

Address before: 310052 room 508, 5th floor, building 4, No. 699 Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Alibaba (China) Co.,Ltd.

Country or region before: China