CN106961614B - Method and system for playing encrypted video through network - Google Patents

Method and system for playing encrypted video through network Download PDF

Info

Publication number
CN106961614B
CN106961614B CN201710098331.7A CN201710098331A CN106961614B CN 106961614 B CN106961614 B CN 106961614B CN 201710098331 A CN201710098331 A CN 201710098331A CN 106961614 B CN106961614 B CN 106961614B
Authority
CN
China
Prior art keywords
video
playing
segment
key
decoding
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
CN201710098331.7A
Other languages
Chinese (zh)
Other versions
CN106961614A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710098331.7A priority Critical patent/CN106961614B/en
Publication of CN106961614A publication Critical patent/CN106961614A/en
Application granted granted Critical
Publication of CN106961614B publication Critical patent/CN106961614B/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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • 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/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26613Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing keys in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption

Landscapes

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

Abstract

The invention relates to the field of network multimedia, in particular to a method and a system for playing an encrypted video network. The method for playing the encrypted video network comprises the following steps: the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted; receiving playing information returned by the server aiming at the playing request, and playing the front-segment video of the target video according to the playing information; asynchronously requesting the key of the back-end video and decrypting the back-end video; and when the playing of the front-segment video is finished, directly playing the decrypted rear-segment video. The invention avoids the problem that the time delay of the first frame is increased when the encrypted video network is played, and improves the user experience.

Description

Method and system for playing encrypted video through network
Technical Field
The invention relates to the field of network multimedia, in particular to a method and a system for playing an encrypted video network.
Background
With the development of network technology, a large amount of video data is spread through a network, and people have been used to obtain video data from the network. Due to protection of video copyright, copyright video generally needs to be encrypted, so that a network communication process of requesting a key and a buffering logic of decrypting the video are required before playing of the client video.
Therefore, when the inventor applies the above scheme, it is found that the existing copyright protection system using content encryption as a means causes a delay of the user seeing the first frame of picture to be lengthened, and user experience is reduced.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the copyright protection system taking content encryption as a means increases the time delay of the user for seeing the first frame of picture, and reduces the user experience.
In order to solve the above problems, the solution of the present invention is a scheme based on segmented playing of video and asynchronous request for play permission, and the method is as follows: the video data A needing protection is segmented into at least two segments according to a set sequence, wherein the segments are A1 and A2, A1 is one segment, and A2 is at least one segment; carrying out encryption processing on A2, wherein A1 uses a pre-distribution key to encrypt or keep an unencrypted state; when a user requests to play A, playing A1 first; asynchronously requesting the key of A2 through network communication while playing A1, and obtaining the key of A2 when the user meets the set conditions; decrypting A2 to prepare for playing A2; when the playback of A1 is finished, A2 is played directly.
The embodiment of the invention discloses a method for playing an encrypted video network, which comprises the following steps:
the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
receiving playing information returned by the server aiming at the playing request, and playing the front-segment video of the target video according to the playing information;
asynchronously requesting a key of the back-end video and decrypting the back-end video;
and when the playing of the front-segment video is finished, directly playing the decrypted rear-segment video.
Preferably, the step of receiving the playing information returned by the server in response to the playing request, and playing the front-segment video of the target video according to the playing information includes: receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip; if the encryption state of the front-segment video is not encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, configuring a buffer area, and decoding and playing the front-segment video.
Further, the step of asynchronously requesting the key of the back-end video and decrypting the back-end video comprises: asynchronously requesting a key of the back video aiming at user information according to the encrypted state of the back video; receiving a key of the back-end video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority; accessing the playing address of the back video and downloading the back video; and decrypting the front set frame of the rear section of video according to the key and the encryption algorithm corresponding to the key, and storing the front set frame in a temporary storage area.
Further, when the playing of the front-segment video is finished, the step of directly playing the decrypted back-segment video includes:
when the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, and decoding a front set frame of the rear-segment video in the temporary storage area; according to the segment duration of the front segment video, when the playing of the front segment video is finished, directly playing a front set frame of the rear segment video; decrypting the remaining video segments of the back segment video except the front set frame; restarting a decoder according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments and the sequence of the numbers of the remaining video segments when the decoding of the current video segment is finished, configuring a buffer area and decoding the next video segment aiming at the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
Further, when the playing of the front-segment video is finished, the step of directly playing the decrypted back-segment video includes:
when the decoding of the front-segment video is finished, adding a front setting frame of the rear-segment video in the temporary storage area to a decoder corresponding to the front-segment video; when the playing of the front section of video is finished, playing a front set frame of the rear section of video; decrypting the remaining video segments of the back segment video except the front set frame; according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments, and according to the sequence of the numbers of the remaining video segments, when the decoding of the current video segment is finished, adding the next video segment aiming at the current video segment to a decoder corresponding to the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
Further, the step of receiving the playing information returned by the server in response to the playing request and playing the front-segment video of the target video according to the playing information further includes: if the encryption state of the front-segment video is encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, decrypting the front-segment video according to a preset secret key and a preset encryption algorithm, configuring a buffer area, and decoding and playing the front-segment video.
The embodiment of the invention also discloses a system for playing the encrypted video network, which comprises the following steps:
the playing request module is used for initiating a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module is used for receiving playing information returned by the server aiming at the playing request and playing the front-segment video of the target video according to the playing information;
the asynchronous decryption module is used for asynchronously requesting the key of the back-end video and decrypting the back-end video;
and the play control module is used for directly playing the decrypted back-end video when the playing of the front-end video is finished.
Preferably, the playing module includes: the playing information module is used for receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip; a first front-segment playing module, configured to access the front-segment video playing address if the front-segment video is not encrypted, download the front-segment video according to the segment size and the encoding and decoding format of the front-segment video, configure a buffer, and decode and play the front-segment video.
Further, the asynchronous decryption module comprises: the key request module is used for asynchronously requesting the key of the back video aiming at the user information according to the encrypted state of the back video; the key receiving module is used for receiving a key of the back-end video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority; the back-end downloading module is used for accessing the back-end video playing address and downloading the back-end video; and the set frame decryption module is used for decrypting the front set frame of the rear section of video according to the secret key and the encryption algorithm corresponding to the secret key and storing the front set frame in the temporary storage area.
Further, the play control module includes: the first setting frame decoding module is used for restarting a decoder when the decoding of the front-segment video is finished, configuring a buffer area and decoding a front setting frame of the rear-segment video in the temporary storage area; the first setting frame playing module is used for directly playing the front setting frame of the rear video when the playing of the front video is finished according to the segment duration of the front video; the first back section decryption module is used for decrypting the remaining video segments of the back section video except the front setting frame; a first sequential playing module, configured to restart a decoder, configure a buffer, and decode a next video segment for a current video segment according to the segment size, segment duration, and encoding and decoding format of the remaining video segments and according to the sequence of the numbers of the remaining video segments when the current video segment is decoded; and directly playing the next video clip when the playing of the current video clip is finished.
Further, the play control module includes: a second setting frame decoding module, configured to add a previous setting frame of the next video in the temporary storage area to a decoder corresponding to the previous video when the previous video is decoded; the second setting frame playing module is used for playing the front setting frame of the rear video when the playing of the front video is finished; the second back section decryption module is used for decrypting the video segments of the back section except the video segments of the front set frame; a second sequential playing module, configured to add a next video segment to the decoder corresponding to the current video segment when the current video segment is decoded according to the segment size, the segment duration, the encoding and decoding format of the remaining video segments and the sequence of the numbers of the remaining video segments; and directly playing the next video clip when the playing of the current video clip is finished.
Further, the playing module further comprises: and the second front-segment playing module is used for accessing the front-segment video playing address if the encryption state of the front-segment video is encrypted, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, decrypting the front-segment video according to a preset secret key and a preset encryption algorithm, configuring a buffer area, and decoding and playing the front-segment video.
In addition, the embodiment of the invention also discloses a video playing system, which comprises a server and at least one player, wherein the server comprises:
the compression and encryption module is used for segmenting each video into a front-segment video and a rear-segment video according to a set sequence and encrypting the rear-segment video; the front-segment video is a video clip; the back segment video is at least one video clip;
a play request response module, configured to receive a play request for the target video initiated by the player, and return, to the play request, play information corresponding to the target video;
the key returning module is used for receiving a key request of the player for the back-end video and returning the key of the back-end video when a set condition is met;
the player includes:
the playing request module is used for initiating a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module is used for receiving playing information returned by the server aiming at the playing request and playing the front-segment video of the target video according to the playing information;
the asynchronous decryption module is used for asynchronously requesting the key of the back-end video and decrypting the back-end video;
and the play control module is used for directly playing the decrypted back-end video when the playing of the front-end video is finished.
Compared with the prior art, the embodiment of the invention has the following advantages: because the mode of sectionally playing the video and asynchronously requesting the back-end video playing key is adopted, the network communication process of requesting the key and the buffering logic of decrypting the video are asynchronously carried out in the video playing process, thereby avoiding the problem of time delay increase of the first frame when the encrypted video is played in a network, and improving the user experience.
Drawings
FIG. 1a is a schematic structural view of the present invention;
FIG. 1b is a schematic diagram of the solution of the present invention;
fig. 2 is a flowchart of a method for encrypted video network playing according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for encrypted video network playing according to a second embodiment of the present invention;
fig. 4 is a flowchart of another method for network playback of encrypted video according to a third embodiment of the present invention;
fig. 5 is a block diagram of a system for playing encrypted video over a network according to a fourth embodiment of the present invention;
fig. 6 is a block diagram of another system for network playback of encrypted video according to a fifth embodiment of the present invention;
fig. 7 is a block diagram of another system for network playback of encrypted video according to a sixth embodiment of the present invention;
fig. 8 is a block diagram of a video playing system according to a seventh embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1a and 1b, the technical solution of the present invention is applied in a network environment, where a player forms a many-to-one or many-to-many connection with a server in a network communication manner; the player can be a client installed in various terminals, and can also be a webpage terminal or other forms; splitting each source video, namely each target video into a front section and a rear section at least according to a set sequence through a server, encrypting the rear section of video through a compression encryption module, and not encrypting the front section of video or encrypting the front section of video by adopting a pre-distributed key; after the player initiates a playing request for a target video, the player receives playing information of the target video returned by the server aiming at the playing request; the playing information can be searched by the server through an index service; the player plays the front-segment video according to the playing information and synchronously and asynchronously makes the playing preparation of the back-segment video; and directly playing the decrypted back-end video after the playing of the front-end video is finished.
The first embodiment is as follows:
referring to fig. 2, an embodiment of the present invention provides a method for network playback of encrypted video, including steps 101-104:
step 101: the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted.
The player initiates a playing request for the target video, which may be that the player initiates a playing request for the target video to the server through network communication when the player detects a playing requirement of the user for the target video, or may be that the player initiates a playing request for the target video to the server through network communication. For example, when a user performs a click operation on an icon of a certain video in the player, and the player detects the operation information for the video, a play request for a target video is initiated to the server through network communication. The playing request includes a local network address corresponding to the player and also includes tag information of the target video.
The target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front video is a video clip, the back video is at least one video clip, and the back video is encrypted. The setting order may be chronological order, content order, or other order. For example, for a target video, the total time length is 150 minutes, and the video is split into two segments of the first 10 minutes and the second 140 minutes, or two segments of the first 75 minutes and the second 75 minutes, or two segments of the first 100 minutes and the second 50 minutes, or two segments of the first 10 minutes, the middle 30 minutes and the second 110 minutes according to the set sequence. For example, a cartoon is divided into 10 words, which can be divided into two words, i.e., the first word, the second word and the eighth word, or three words, i.e., the first word, the third word and the sixth word, according to the content. In a word, the video is not limited according to the segmentation mode of the set sequence, and can be split into two sections, three sections or even more sections. The video clips that are divided and encrypted respectively may be stored in the server, or may be stored in a memory in other network environments, but the server needs to store playing information of the video clips, which at least includes information such as a playing address, an encryption state, a corresponding key and encryption algorithm, and a coding and decoding format.
The front-segment video is not encrypted or encrypted by adopting a pre-distributed key; the pre-distribution key is loaded in the player in advance, may be downloaded from a server through network communication and loaded in the player when the user plays the encrypted video for the first time by using the player, may be built in the player all the time, and is issued together with the player code, or may be issued through other manners. The latter video is encrypted and encrypted by a certain key in a certain encryption algorithm.
Step 102: and receiving playing information returned by the server aiming at the playing request, and playing the front-segment video of the target video according to the playing information.
The player receives playing information returned by the server according to the playing request, wherein the playing information may include the number, file size, duration, encoding and decoding format, playing address and encryption state of each video segment of the target video; and the player downloads and plays the front-segment video of the target video according to the playing information.
The playing information is the playing information returned by the server for the playing request, and may be the playing information of the target video corresponding to the tag information of the target video searched by the index service for the tag information of the target video in the playing request and returned by the server.
Step 103: and asynchronously requesting the key of the back-end video and decrypting the back-end video.
In the process of downloading and playing the front-segment video of the target video, the player asynchronously initiates a key request for the rear-segment video of the target video to the server through network communication; when the set conditions are met, the player obtains the key of the back-end video returned by the server; and the player asynchronously downloads the back-end video according to the playing information and decrypts the back-end video according to the obtained key of the back-end video.
The key of the back-end video is returned by the server aiming at the key request when meeting the set condition; the key request comprises user information; the setting condition may be that the user information has a play right.
The player has loaded or existed decryption programs for various encryption algorithms, so that the decryption of the later video by the key of the later video may be performed according to the decryption program corresponding to the default encryption algorithm, or according to the decryption program corresponding to the encryption algorithm in the playing information.
Step 104: and when the playing of the front-segment video is finished, directly playing the decrypted rear-segment video.
And the player directly plays the decrypted back-end video when the playing of the front-end video is finished. The player may determine whether the previous segment of video is played or not by determining the duration of the previous segment of video in the playing information, or by other methods. The player may prepare to play the later video during playing the former video, for example, decode a previous frame of the later video, for example, the previous 100 frames, and prepare to play the remaining part of the later video; when the playing of the front-segment video is finished, directly playing the front setting frame of the rear-segment video; and before the playing of the front setting frame of the rear video is finished, the playing of the next segment is ready.
The embodiment of the invention has the following advantages: because the mode of sectionally playing the video and asynchronously requesting the back-end video playing key is adopted, the network communication process of requesting the key and the buffering logic of decrypting the video are asynchronously carried out in the video playing process, thereby avoiding the problem of time delay increase of the first frame when the encrypted video is played in a network, and improving the user experience.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example two:
referring to fig. 3, a second embodiment of the present invention provides a method for network playback of encrypted video, including the steps of 201:
step 201: the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted.
The player initiates a playing request of the target video to the server through network communication; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the latter video is encrypted. Particularly, the time length of the rear-segment video can be longer than that of the front-segment video, so that the content of the encrypted video can be protected as much as possible on the basis of not influencing the user experience.
Step 202: receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding format of each video clip.
The player receives playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video segment information comprises the video segment number of the target video, the segment size, the segment duration and the coding and decoding format of each video segment.
The playing information is the playing information returned by the server for the playing request, and may be the playing information of the target video corresponding to the tag information of the target video searched by the index service for the tag information of the target video in the playing request and returned by the server.
Step 203: if the encryption state of the front-segment video is not encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, configuring a buffer area, and decoding and playing the front-segment video.
Accessing the previous segment video playing address in the playing information if the previous segment video encryption status is unencrypted according to the encryption status of each video segment in the playing information, where the playing address may be a URL (uniform resource Locator) address; downloading the previous-segment video according to the playing address of the previous-segment video, and judging whether the previous-segment video is downloaded or not according to the file size of the previous-segment video; configuring the buffer, initializing the decoder according to the codec format of the previous segment of video, decoding and playing the previous segment of video, and then executing step 205.
The configuration buffer may be configured by combining the file size of the previous segment of video with specific conditions, such as I/O speed and CPU processing speed, or may be configured according to preset conditions.
Step 204: if the encryption state of the front-segment video is encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, decrypting the front-segment video according to a preset secret key and a preset encryption algorithm, configuring a buffer area, and decoding and playing the front-segment video.
According to the encryption state of each video clip in the playing information, if the encryption state of the previous segment of video is encrypted, accessing the playing address of the previous segment of video, wherein the playing address can be a URL address; downloading the previous-segment video according to the playing address of the previous-segment video, and judging whether the previous-segment video is downloaded or not according to the file size of the previous-segment video; decrypting the previous segment of video according to a preset key and a preset encryption algorithm, configuring a buffer, initializing a decoder according to the coding and decoding format of the previous segment of video, decoding and playing the previous segment of video, and then executing step 205.
The preset key and the preset encryption algorithm are loaded in the player in advance, and may be downloaded from a server and loaded in the player through network communication when the user plays the encrypted video for the first time by using the player, or may be built in the player all the time, issued together with the player code, or may be issued through other manners.
Step 205: and according to the encrypted state of the back-end video, asynchronously requesting the key of the back-end video aiming at user information.
According to the encrypted state of the back video in the playing information or the default encrypted state of the back video, aiming at user information, which can be a player account number registered by a user or identity information of the user, when the player downloads and plays the front video, a request for a key of the back video is asynchronously sent to the server through network communication; the request may include user information, an identifier of the back-end video, and a local address of the player.
Step 206: receiving a key of the back-end video and an encryption algorithm corresponding to the key; and the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority.
When the player downloads and plays the front-segment video, the player receives the key of the back-segment video and the encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority.
The server stores user information with playing permission, and judges whether the user information has authority or not, and can judge whether the user has the playing permission or not, whether account balance is insufficient or not and the like; for example, if the user has the play permission and the account balance is sufficient, the server determines that the user information has the right.
Step 207: and accessing the playing address of the back video and downloading the back video.
And when the player downloads and plays the front-segment video, the player accesses the playing address of the back-segment video in the playing information to download the back-segment video.
Step 208: and decrypting the front set frame of the rear section of video according to the key and the encryption algorithm corresponding to the key, and storing the front set frame in a temporary storage area.
When the player downloads and plays the front-segment video, the player decrypts the front-set frame of the rear-segment video according to the key and the encryption algorithm corresponding to the key, and stores the front-set frame of the rear-segment video in a temporary storage area; the temporary storage area may be in a memory locally corresponding to the player, or may be in a hard disk locally corresponding to the player. A decryption program corresponding to the encryption algorithm corresponding to the key is stored in the player. The step of decrypting the previous setting frame of the later video is to prepare for playing the next video as soon as possible before the playing of the previous video is finished, and to link the playing of the next video when the playing of the previous video is finished, so that a method of decrypting the previous setting frame of the later video first is adopted, for example, the previous 200 frames of the later video are decrypted first; however, before the end of the playing of the previous setting frame of the latter video, it is also necessary to prepare for the playing of the next video.
Step 209: and when the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, and decoding a front set frame of the rear-segment video in the temporary storage area.
When the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, initializing the decoder according to the coding and decoding format of the first segment of the rear-segment video in the playing information, and decoding the front setting frame of the rear-segment video in the temporary storage area.
Step 210: and according to the segment duration of the front segment video, when the playing of the front segment video is finished, directly playing the front set frame of the rear segment video.
Judging whether the playing of the front-segment video is finished or not according to the segment duration of the front-segment video; when the front section video is played, the front setting frame of the rear section video is directly played and is just connected with the playing of the front end video.
Step 211: and decrypting the residual video segments of the rear-segment video except the front setting frame.
Decrypting the remaining video segments of the rear-segment video except the front setting frame; the decryption process may be started after the decryption of the previous setting frame of the later video is completed, as long as the playback of the first video segment of the later video except the remaining portion of the previous setting frame is ready before the playback of the previous setting frame of the later video is completed.
Step 212: restarting a decoder according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments and the sequence of the numbers of the remaining video segments when the decoding of the current video segment is finished, configuring a buffer area and decoding the next video segment aiming at the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
For the first video segment of the rest part of the rear video except the front setting frame, when the decoding of the front setting frame of the rear video is completed, restarting a decoder, configuring a buffer area, initializing the decoder according to the coding and decoding format of the first video segment of the rear video in the playing information, and decoding the first video segment of the rest part of the rear video except the front setting frame; when the playing of the front setting frame of the rear video is finished, directly playing the first video clip of the rear video except the rest part of the front setting frame, and just connecting with the playing of the front setting frame of the rear video. According to the steps, according to the coding sequence, sequentially aiming at other video clips of the back-end video, when the decoding of the current video clip is completed, restarting a decoder, configuring a buffer area, and decoding the next video clip aiming at the current video clip; and when the current video clip is played, directly playing the next video clip.
The embodiment of the invention has the following advantages: the front-segment video is not encrypted in advance or the preset key is used for encrypting the rear-segment video, the modes of video segment playing and asynchronous request of the rear-segment video playing key are adopted, the decoder is restarted after the current video segment is decoded, and the next video segment aiming at the current video segment is decoded, so that the playing of the next video segment is prepared in advance before the current video segment is played, the network communication process of the request key and the buffer logic of the decrypted video are asynchronously carried out in the video playing process, and the playing of each video segment is smoothly linked, so that the problem of time delay increase of the first frame during the network playing of the encrypted video is solved, and the user experience is improved.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example three:
referring to fig. 4, a third embodiment of the present invention provides a method for network playback of encrypted video, including the steps of 301-312:
step 301: the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted.
Step 302: receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding format of each video clip.
Step 303: if the encryption state of the previous segment of video is not encrypted, accessing the playing address of the previous segment of video, downloading the previous segment of video according to the segment size and the encoding and decoding format of the previous segment of video, configuring a buffer area, decoding and playing the previous segment of video, and then executing step 305.
Step 304: if the encryption state of the previous segment of video is encrypted, accessing the playing address of the previous segment of video, downloading the previous segment of video according to the segment size and the encoding and decoding format of the previous segment of video, decrypting the previous segment of video according to a preset key and a preset encryption algorithm, configuring a buffer, decoding and playing the previous segment of video, and then executing step 305.
Step 305: and according to the encrypted state of the back-end video, asynchronously requesting the key of the back-end video aiming at user information.
Step 306: receiving a key of the back-end video and an encryption algorithm corresponding to the key; and the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority.
Step 307: and accessing the playing address of the back video and downloading the back video.
Step 308: and decrypting the front set frame of the rear section of video according to the key and the encryption algorithm corresponding to the key, and storing the front set frame in a temporary storage area.
Step 309: when the decoding of the front-segment video is finished, adding the front setting frame of the rear-segment video in the temporary storage area to a decoder corresponding to the front-segment video.
When the decoding of the front-segment video is finished, adding the front setting frame of the rear-segment video in the temporary storage area to a decoder corresponding to the front-segment video, and decoding the front setting frame of the rear-segment video in the temporary storage area; generally, the codec formats of the video segments belonging to the same video are the same, so that there is no need to initialize the decoder again here. In practical applications, the player may complete the step of adding the pre-set frame of the post-segment video in the temporary storage area to the decoder corresponding to the pre-segment video by filling the interface of the decoder buffer area, for example, a mode of calling an application interface may be adopted.
Step 310: and when the playing of the front section of video is finished, playing the front setting frame of the rear section of video.
Judging whether the playing of the front-segment video is finished or not according to the segment duration of the front-segment video; when the playing of the front section of video is finished, the player directly plays the front set frame of the rear section of video, and the front set frame is just connected with the playing of the front end video.
Step 311: and decrypting the residual video segments of the rear-segment video except the front setting frame.
Decrypting the remaining video segments of the rear-segment video except the front setting frame; the decryption process may be started after the decryption of the previous setting frame of the later video is completed, as long as the playback of the first video segment of the later video except the remaining portion of the previous setting frame is ready before the playback of the previous setting frame of the later video is completed.
Step 312: according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments, and according to the sequence of the numbers of the remaining video segments, when the decoding of the current video segment is finished, adding the next video segment aiming at the current video segment to a decoder corresponding to the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
When the decoding of the front setting frame of the rear video is finished, adding the first video clip of the remaining part of the rear video except the front setting frame to a decoder corresponding to the front setting frame of the rear video, and decoding the first video clip of the remaining part of the rear video except the front setting frame; when the playing of the front setting frame of the rear video is finished, the player directly plays the first video clip of the rear video except the rest part of the front setting frame, and the playing is just connected with the playing of the front setting frame of the rear video. According to the steps, according to the coding sequence, sequentially aiming at other video clips of the back-end video, when the decoding of the current video clip is completed, the next video clip aiming at the current video clip is added to a decoder corresponding to the current video clip; when the playing of the current video clip is finished, the player directly plays the next video clip; generally, the codec formats of the video segments belonging to the same video are the same, so that there is no need to initialize the decoder again here.
The embodiment of the invention has the following advantages: because the front-segment video is not encrypted in advance or the preset key is used for encrypting the rear-segment video, the modes of video segment playing and asynchronous request of the rear-segment video playing key are adopted, and the mode that compressed data aiming at the next video segment of the current video segment is added to a decoder corresponding to the current video segment when the decoding of the current video segment is completed is adopted, the network communication process of requesting the key and the buffer logic of decrypting the video are asynchronously carried out in the video playing process, and the playing of each video segment is smoothly linked, so that the problem of time delay increase of the first frame during the network playing of the encrypted video is solved, and the user experience is improved.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example four:
referring to fig. 5, a fourth embodiment of the present invention provides a system for network playing of encrypted video, including:
a play request module 60, configured to initiate a play request for a target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module 70 is configured to receive playing information returned by the server for the playing request, and play the front-segment video of the target video according to the playing information;
an asynchronous decryption module 80, configured to asynchronously request the key of the back-end video and decrypt the back-end video;
and the playing control module 90 is configured to directly play the decrypted back-end video when the playing of the front-end video is finished.
The embodiment of the invention has the following advantages: because the mode of sectionally playing the video and asynchronously requesting the back-end video playing key is adopted, the network communication process of requesting the key and the buffering logic of decrypting the video are asynchronously carried out in the video playing process, thereby avoiding the problem of time delay increase of the first frame when the encrypted video is played in a network, and improving the user experience.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Example five:
referring to fig. 6, a fifth embodiment of the present invention provides a system for playing an encrypted video over a network, including:
a play request module 60, configured to initiate a play request for a target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
a playing information module 701, configured to receive playing information returned by the server in response to the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip;
a first front-end playing module 702, configured to access the front-end video playing address if the front-end video is not encrypted, download the front-end video according to the segment size and the encoding and decoding format of the front-end video, configure a buffer, decode and play the front-end video;
a second front-segment playing module 703, configured to access the front-segment video playing address if the encryption state of the front-segment video is encrypted, download the front-segment video according to the segment size and the encoding and decoding format of the front-segment video, decrypt the front-segment video according to a preset key and a preset encryption algorithm, configure a buffer, and decode and play the front-segment video.
A key request module 801, configured to asynchronously request a key of the subsequent video according to the encrypted state of the subsequent video and for user information;
a key receiving module 802, configured to receive a key of the subsequent video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority;
a back-end downloading module 803, configured to access the back-end video playing address and download the back-end video;
a set frame decryption module 804, configured to decrypt the front set frame of the back segment video according to the key and the encryption algorithm corresponding to the key, and store the front set frame in the temporary storage area;
a first setting frame decoding module 901, configured to restart a decoder, configure a buffer, and decode a previous setting frame of the next video in the temporary storage when the previous video is decoded;
a first setting frame playing module 902, configured to directly play the previous setting frame of the next video when the playing of the previous video is finished according to the segment duration of the previous video;
a first back-end decryption module 903, configured to decrypt the remaining video segments of the back-end video except the previous setting frame;
a first sequential playing module 904, configured to restart the decoder, configure the buffer area, and decode the next video segment of the current video segment according to the segment size, the segment duration, the encoding and decoding format of the remaining video segments and the sequence of the numbers of the remaining video segments when the current video segment is decoded; and directly playing the next video clip when the playing of the current video clip is finished.
The embodiment of the invention has the following advantages: the front-segment video is not encrypted in advance or the preset key is used for encrypting the rear-segment video, the modes of video segment playing and asynchronous request of the rear-segment video playing key are adopted, the decoder is restarted after the current video segment is decoded, and the next video segment aiming at the current video segment is decoded, so that the playing of the next video segment is prepared in advance before the current video segment is played, the network communication process of the request key and the buffer logic of the decrypted video are asynchronously carried out in the video playing process, and the playing of each video segment is smoothly linked, so that the problem of time delay increase of the first frame during the network playing of the encrypted video is solved, and the user experience is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Example six:
referring to fig. 7, a sixth embodiment of the present invention provides a system for network playing of encrypted video, including:
a play request module 60, configured to initiate a play request for a target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
a playing information module 701, configured to receive playing information returned by the server in response to the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip;
a first front-end playing module 702, configured to access the front-end video playing address if the front-end video is not encrypted, download the front-end video according to the segment size and the encoding and decoding format of the front-end video, configure a buffer, decode and play the front-end video;
a second front-segment playing module 703, configured to access the front-segment video playing address if the encryption state of the front-segment video is encrypted, download the front-segment video according to the segment size and the encoding and decoding format of the front-segment video, decrypt the front-segment video according to a preset key and a preset encryption algorithm, configure a buffer, and decode and play the front-segment video.
A key request module 801, configured to asynchronously request a key of the subsequent video according to the encrypted state of the subsequent video and for user information;
a key receiving module 802, configured to receive a key of the subsequent video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority;
a back-end downloading module 803, configured to access the back-end video playing address and download the back-end video;
a set frame decryption module 804, configured to decrypt the front set frame of the back segment video according to the key and the encryption algorithm corresponding to the key, and store the front set frame in the temporary storage area;
a second setting frame decoding module 905, configured to add, when the decoding of the front-stage video is completed, a front setting frame of the rear-stage video in the temporary storage area to a decoder corresponding to the front-stage video;
a second setting frame playing module 906, configured to play the previous setting frame of the next video when the previous video is played;
a second rear-segment decryption module 907 for decrypting the remaining video segments of the rear-segment video excluding the previous setting frame;
a second sequential playing module 908, configured to add, according to the segment size, the segment duration, and the encoding and decoding format of the remaining video segments and according to the sequence of the numbers of the remaining video segments, a next video segment for the current video segment to a decoder corresponding to the current video segment when the current video segment is decoded; and directly playing the next video clip when the playing of the current video clip is finished.
The embodiment of the invention has the following advantages: because the front-segment video is not encrypted in advance or the preset key is used for encrypting the rear-segment video, the modes of video segment playing and asynchronous request of the rear-segment video playing key are adopted, and the mode that compressed data aiming at the next video segment of the current video segment is added to a decoder corresponding to the current video segment when the decoding of the current video segment is completed is adopted, the network communication process of requesting the key and the buffer logic of decrypting the video are asynchronously carried out in the video playing process, and the playing of each video segment is smoothly linked, so that the problem of time delay increase of the first frame during the network playing of the encrypted video is solved, and the user experience is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Example seven:
referring to fig. 8, a seventh embodiment of the present invention provides a video playing system, including a server 100 and at least one player 50,
the server 100 includes:
the compression and encryption module 110 is configured to segment each video into a front-segment video and a rear-segment video according to a set sequence, and encrypt the rear-segment video; the front-segment video is a video clip; the back segment video is at least one video clip;
the server divides each video into a front-segment video and a rear-segment video according to a set sequence through the compression encryption module, and encrypts the rear-segment video; the front-segment video is a video clip; the back segment video is at least one video clip; the embodiment of the invention does not limit the segmentation quantity of the video segments and how to segment the video segments according to the set sequence; the video clips which are divided and encrypted respectively can be stored in the server or a memory in other network environments, but the server needs to store the relevant playing information of the video clips, which at least comprises information such as playing addresses, encryption states, corresponding keys and encryption algorithms, coding and decoding formats and the like;
a play request response module 120, configured to receive a play request for the target video initiated by the player, and return, to the play request, play information corresponding to the target video;
the server returns play information to the player according to the play request through the play request response module, where the play information may be returned by the server by searching, through an index service, for the tag information of the target video in the play request, the play information of the target video corresponding to the tag information of the target video;
the playing information may include the number, file size, duration, codec format, playing address, and encryption status of each video segment of the target video; the numbers of the video clips are used for distinguishing the video clips and distinguishing the playing sequence; the file size is used for respectively judging whether downloading of each video clip is completed or not, and can also be used for adjusting and configuring a buffer area; the coding and decoding formats are used for respectively initializing decoders and confirming decoding formats; the duration is used for respectively confirming whether the playing of each video clip is finished in the playing process; the playing address is used for the player to download each video clip; the decryption state is used for confirming the encryption state of each video clip and whether decryption is needed;
a key returning module 130, configured to receive a key request from the player for the subsequent video, and return a key of the subsequent video when a set condition is met;
the server receives the key request of the player to the back-end video through the key returning module, and returns the key of the back-end video when the set condition is met; the setting condition may be that the user information has a play permission, the server stores the user information having the play permission, and the server determines whether the user information has the permission, and may determine whether the user has the play permission, whether the account balance is insufficient, or the like; for example, if the user has the play permission and the account balance is sufficient, the server judges that the user information has the authority;
the player 50 includes:
a play request module 60, configured to initiate a play request for a target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module 70 is configured to receive playing information returned by the server for the playing request, and play the front-segment video of the target video according to the playing information;
an asynchronous decryption module 80, configured to asynchronously request the key of the back-end video and decrypt the back-end video;
and the playing control module 90 is configured to directly play the decrypted back-end video when the playing of the front-end video is finished.
The embodiment of the invention has the following advantages: because the mode of sectionally playing the video and asynchronously requesting the back-end video playing key is adopted, the network communication process of requesting the key and the buffering logic of decrypting the video are asynchronously carried out in the video playing process, thereby avoiding the problem of time delay increase of the first frame when the encrypted video is played in a network, and improving the user experience.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A method for encrypted video network playback, the method comprising:
the player initiates a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
receiving playing information returned by the server aiming at the playing request, and downloading and playing the front-segment video of the target video according to the playing information;
asynchronously requesting a key of the back-end video and decrypting the back-end video;
when the playing of the front-segment video is finished, directly playing the decrypted rear-segment video;
wherein said decrypting said back-end video comprises: in the process of playing the front-segment video, decoding a front set frame of the rear-segment video after decryption;
the directly playing the decrypted back-end video comprises: directly playing the front set frame of the back video and preparing for playing the rest part of the back video;
wherein, in the process of playing the front segment video, the decoding is performed after the decryption on the front set frame of the back segment video, and the method comprises the following steps: when the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, and decoding a front set frame of the rear-segment video;
the directly playing the front setting frame of the back segment video comprises: judging whether the playing of the front-segment video is finished or not according to the segment duration of the front-segment video, and directly playing a front set frame of the rear-segment video when the playing of the front-segment video is finished;
the playing information returned by the server for the playing request comprises: and the server returns the playing information of the target video corresponding to the label information searched by the index service aiming at the label information of the target video in the playing request.
2. The method according to claim 1, wherein the step of receiving playback information returned by the server for the playback request, and playing back the previous segment video of the target video according to the playback information comprises:
receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip;
if the encryption state of the front-segment video is not encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, configuring a buffer area, and decoding and playing the front-segment video.
3. The method of claim 2, wherein the step of asynchronously requesting the key of the back-end video and decrypting the back-end video comprises:
asynchronously requesting a key of the back video aiming at user information according to the encrypted state of the back video;
receiving a key of the back-end video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority;
accessing the playing address of the back video and downloading the back video;
and decrypting the front set frame of the rear section of video according to the key and the encryption algorithm corresponding to the key, and storing the front set frame in a temporary storage area.
4. The method according to claim 3, wherein the step of directly playing the decrypted back-end video when the playing of the front-end video is finished comprises:
when the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, and decoding a front set frame of the rear-segment video in the temporary storage area;
decrypting the remaining video segments of the back segment video except the front set frame;
restarting a decoder according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments and the sequence of the numbers of the remaining video segments when the decoding of the current video segment is finished, configuring a buffer area and decoding the next video segment aiming at the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
5. The method according to claim 3, wherein the step of directly playing the decrypted back-end video when the playing of the front-end video is finished comprises:
when the decoding of the front-segment video is finished, adding a front setting frame of the rear-segment video in the temporary storage area to a decoder corresponding to the front-segment video;
when the playing of the front section of video is finished, playing a front set frame of the rear section of video;
decrypting the remaining video segments of the back segment video except the front set frame;
according to the segment size, the segment duration and the coding and decoding formats of the remaining video segments, and according to the sequence of the numbers of the remaining video segments, when the decoding of the current video segment is finished, adding the next video segment aiming at the current video segment to a decoder corresponding to the current video segment; and directly playing the next video clip when the playing of the current video clip is finished.
6. The method according to claim 2, wherein the step of receiving playback information returned by the server for the playback request, and playing back the previous segment video of the target video according to the playback information further comprises:
if the encryption state of the front-segment video is encrypted, accessing the playing address of the front-segment video, downloading the front-segment video according to the segment size and the coding and decoding format of the front-segment video, decrypting the front-segment video according to a preset secret key and a preset encryption algorithm, configuring a buffer area, and decoding and playing the front-segment video.
7. A system for encrypted video network playback, the system comprising:
the playing request module is used for initiating a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module is used for receiving playing information returned by the server aiming at the playing request, and downloading and playing the front-segment video of the target video according to the playing information;
the asynchronous decryption module is used for asynchronously requesting the key of the back-end video and decrypting the back-end video;
the play control module is used for directly playing the decrypted back-end video when the playing of the front-end video is finished;
the asynchronous decryption module is further used for decrypting and then decoding a front set frame of the rear-segment video in the process of playing the front-segment video;
the playing control module is also used for directly playing the front set frame of the back video and preparing for playing the rest part of the back video;
the asynchronous decryption module is further used for restarting a decoder, configuring a buffer area and decoding a front set frame of the rear-segment video when the front-segment video is decoded;
the playing control module is further configured to directly play the front set frame of the rear video when the playing of the front video is finished according to the segment duration of the front video;
the playing information returned by the server for the playing request comprises: and the server returns the playing information of the target video corresponding to the label information searched by the index service aiming at the label information of the target video in the playing request.
8. The system of claim 7, wherein the playback module comprises:
the playing information module is used for receiving playing information returned by the server aiming at the playing request; the playing information comprises playing addresses and encryption states of all video clips of the target video and video clip information; the video clip information comprises the video clip number of the target video, the clip size, the clip duration and the coding and decoding formats of each video clip;
a first front-segment playing module, configured to access the front-segment video playing address if the front-segment video is not encrypted, download the front-segment video according to the segment size and the encoding and decoding format of the front-segment video, configure a buffer, and decode and play the front-segment video.
9. The system of claim 8, wherein the asynchronous decryption module comprises:
the key request module is used for asynchronously requesting the key of the back video aiming at the user information according to the encrypted state of the back video;
the key receiving module is used for receiving a key of the back-end video and an encryption algorithm corresponding to the key; the key and the encryption algorithm corresponding to the key are returned by the server when the user information has the authority;
the back-end downloading module is used for accessing the back-end video playing address and downloading the back-end video;
and the set frame decryption module is used for decrypting the front set frame of the rear section of video according to the secret key and the encryption algorithm corresponding to the secret key and storing the front set frame in the temporary storage area.
10. A video playback system, the system comprising a server and at least one player, the player comprising:
the playing request module is used for initiating a playing request for the target video; the target video is segmented into a front-segment video and a rear-segment video according to a set sequence; the front-segment video is a video clip; the back segment video is at least one video clip; the back segment video is encrypted;
the playing module is used for receiving playing information returned by the server aiming at the playing request, and downloading and playing the front-segment video of the target video according to the playing information;
the asynchronous decryption module is used for asynchronously requesting the key of the back-end video and decrypting the back-end video;
the play control module is used for directly playing the decrypted back-end video when the playing of the front-end video is finished; the device is also used for decoding the front setting frame of the back video after decryption in the process of playing the front video, directly playing the front setting frame of the back video when the playing of the front video is finished, and simultaneously preparing for playing the rest part of the back video;
the server includes:
the compression and encryption module is used for segmenting each video into a front-segment video and a rear-segment video according to a set sequence and encrypting the rear-segment video; the front-segment video is a video clip; the back segment video is at least one video clip;
a play request response module, configured to receive a play request for the target video initiated by the player, and return, to the play request, play information corresponding to the target video;
the key returning module is used for receiving a key request of the player for the back-end video and returning the key of the back-end video when a set condition is met;
in the process of playing the front-segment video, decoding the front-set frame of the back-segment video after decryption, including: when the decoding of the front-segment video is finished, restarting a decoder, configuring a buffer area, and decoding a front set frame of the rear-segment video;
the directly playing the front setting frame of the back segment video comprises: judging whether the playing of the front-segment video is finished or not according to the segment duration of the front-segment video, and directly playing a front set frame of the rear-segment video when the playing of the front-segment video is finished;
the playing information returned by the server for the playing request comprises: and the server returns the playing information of the target video corresponding to the label information searched by the index service aiming at the label information of the target video in the playing request.
CN201710098331.7A 2017-02-22 2017-02-22 Method and system for playing encrypted video through network Active CN106961614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710098331.7A CN106961614B (en) 2017-02-22 2017-02-22 Method and system for playing encrypted video through network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710098331.7A CN106961614B (en) 2017-02-22 2017-02-22 Method and system for playing encrypted video through network

Publications (2)

Publication Number Publication Date
CN106961614A CN106961614A (en) 2017-07-18
CN106961614B true CN106961614B (en) 2020-04-21

Family

ID=59481523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710098331.7A Active CN106961614B (en) 2017-02-22 2017-02-22 Method and system for playing encrypted video through network

Country Status (1)

Country Link
CN (1) CN106961614B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613317A (en) * 2017-09-08 2018-01-19 康佳集团股份有限公司 A kind of method, storage medium and intelligent television for playing local cipher media
CN107786877B (en) * 2017-10-20 2020-07-03 北京奇艺世纪科技有限公司 Method and device for previewing video
CN107995219A (en) * 2017-12-22 2018-05-04 掌阅科技股份有限公司 File accelerates to show method, computing device and computer-readable storage medium
CN108834083B (en) * 2018-05-22 2020-12-08 朱小军 Multifunctional telephone communication system
WO2019222915A1 (en) * 2018-05-22 2019-11-28 Zhu Xiaojun Multi-functional telephone communication system
CN113727184B (en) * 2020-05-25 2023-11-03 京东城市(北京)数字科技有限公司 Video playing method, device, system, storage medium and electronic equipment
CN111741268B (en) * 2020-06-30 2022-07-05 中国建设银行股份有限公司 Video transmission method, device, server, equipment and medium
CN114996747B (en) * 2022-08-03 2022-10-04 中科雨辰科技有限公司 Method and system for off-line playing of encrypted file
CN115334356B (en) * 2022-08-12 2024-02-23 中国电信股份有限公司 Video playing method and system, video security platform and communication equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2343890A2 (en) * 2002-01-02 2011-07-13 Sony Electronics Inc. Partial encryption and PID mapping
CN105208464A (en) * 2015-09-21 2015-12-30 网易(杭州)网络有限公司 Multimedia data stream playing method and terminal
CN105376596A (en) * 2015-06-18 2016-03-02 广东欧珀移动通信有限公司 Video encryption and decryption methods and mobile terminals
CN105704515A (en) * 2015-06-03 2016-06-22 深圳Tcl数字技术有限公司 Fast playback starting method and device of media file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2343890A2 (en) * 2002-01-02 2011-07-13 Sony Electronics Inc. Partial encryption and PID mapping
CN105704515A (en) * 2015-06-03 2016-06-22 深圳Tcl数字技术有限公司 Fast playback starting method and device of media file
CN105376596A (en) * 2015-06-18 2016-03-02 广东欧珀移动通信有限公司 Video encryption and decryption methods and mobile terminals
CN105208464A (en) * 2015-09-21 2015-12-30 网易(杭州)网络有限公司 Multimedia data stream playing method and terminal

Also Published As

Publication number Publication date
CN106961614A (en) 2017-07-18

Similar Documents

Publication Publication Date Title
CN106961614B (en) Method and system for playing encrypted video through network
EP2705457B1 (en) Method for playing digital contents protected with a drm (digital right management) scheme and corresponding system
US10229248B2 (en) Multiple content protection systems in a file
US9202024B2 (en) Method for playing digital contents projected with a DRM (digital rights management) scheme and corresponding system
US9213809B2 (en) System and method for protecting digital contents with digital rights management (DRM)
EP3557876A1 (en) Secret key providing method, video playback method, server and client
US8813246B2 (en) Method for playing digital contents protected with a DRM (digital right management) scheme and corresponding system
US20140068693A1 (en) Method, system, or user device for adaptive bandwidth control of proxy multimedia server
US10476928B2 (en) Network video playback method and apparatus
CN103650526A (en) Playlists for real-time or near real-time streaming
JP6470753B2 (en) Extendable media format system and method of use
CN110611830A (en) Video processing method, device, equipment and medium
WO2012126257A1 (en) Media data processing method and device thereof
US20180352287A1 (en) Persistent ID for Offline Access to Streamed Media
CN110401689B (en) File management method, device and storage medium
US11089379B2 (en) Preload hinting for low latency HTTP live streaming system
WO2019033751A1 (en) Method and system for performing security processing on data file
US10262310B1 (en) Generating a verifiable download code
CN114501069A (en) HLS-based multimedia playing method, system, device and storage medium
CN113839907A (en) Method and device for preventing hacker from embezzlement based on redirected encrypted address
KR100773031B1 (en) Copyright limttation apparatus for multimedia transmission system
CN118474407A (en) M3u8 format data sharing method
KR20170124839A (en) Method and system for dividing digital content for fixed-length block encryption

Legal Events

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