CN112188308B - Method and device for generating encrypted video file library - Google Patents

Method and device for generating encrypted video file library Download PDF

Info

Publication number
CN112188308B
CN112188308B CN202010897643.6A CN202010897643A CN112188308B CN 112188308 B CN112188308 B CN 112188308B CN 202010897643 A CN202010897643 A CN 202010897643A CN 112188308 B CN112188308 B CN 112188308B
Authority
CN
China
Prior art keywords
file
decryption
video
key
video fragment
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
CN202010897643.6A
Other languages
Chinese (zh)
Other versions
CN112188308A (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 Fire Vision Technology Co ltd
Original Assignee
Beijing Fire Vision 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 Fire Vision Technology Co ltd filed Critical Beijing Fire Vision Technology Co ltd
Priority to CN202010897643.6A priority Critical patent/CN112188308B/en
Publication of CN112188308A publication Critical patent/CN112188308A/en
Application granted granted Critical
Publication of CN112188308B publication Critical patent/CN112188308B/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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • 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/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/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
    • 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 Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a method and a device for generating an encrypted video file library and a method and a device for distributing and decrypting video, wherein the method for generating the encrypted video file library comprises the following steps: splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol; copying the video fragment file to obtain at least two identical target video fragment files; and distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library. By adopting the method, the compatibility is better; the terminal does not need to embed a security code or a secret key in advance, and the method is more universal and easy to use; the dynamic random key sequence is used, so that the anti-piracy security is high, the anti-attack performance is high, and the security level is high.

Description

Method and device for generating encrypted video file library
Technical Field
The embodiment of the invention relates to the field of data encryption protection, in particular to a method and a device for generating an encrypted video file library, a method and a device for distributing and decrypting videos, and further relates to electronic equipment and a computer readable storage medium.
Background
Currently, the content protection technology commonly used when playing video based on H5(html5) is: anti-hotlinking, HLS or DASH based content encryption. The former transmitted content is plaintext, which is just transformed or authenticated on the URL of the streaming media, the latter transmitted content is ciphertext, and the transmitted content key is plaintext. With the rapid development of internet technology, in the application scenario of mobile internet, there are many non-APP video playing scenarios based on H5, and effective content protection cannot be well performed by using the above method, and how to design a content protection technology for simultaneously encrypting content and a key becomes the key point of research of those skilled in the art.
Disclosure of Invention
Therefore, the embodiment of the invention provides a method for generating an encrypted video file library, so as to solve the problems that the security of a decrypted code cannot be ensured and illegal broadcasting cannot be effectively prevented in the prior art.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for generating an encrypted video file library, including: splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol; copying the video fragment file to obtain at least two identical target video fragment files; and distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library.
Further, the video M3U8 file contains a URL list of the target video clip files and a key file corresponding to each target video clip file.
Further, the method for generating the encrypted video file library further includes: and when an M3U8 index file request sent by a terminal is received, randomly selecting an encrypted target video fragment file from the encrypted video fragment file library, and generating a corresponding video M3U8 file in real time to return to the terminal.
In a second aspect, an embodiment of the present invention further provides a device for generating an encrypted video file library, where the device includes: the splitting unit is used for splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol; the copying unit is used for copying the video fragment files to obtain at least two identical target video fragment files; and the encryption unit is used for distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library.
In a third aspect, an embodiment of the present invention further provides a method for distributing and decrypting a video, including: sending a video M3U8 file request to an M3U8 generator, randomly selecting a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receiving the video M3U8 file sent by the M3U8 generator; sending a JavaScript decryption request to a preset decryption JavaScript server, generating a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmitting the encryption key to a preset key management server, automatically generating decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receiving the decryption JavaScript sent by the decryption JavaScript server; sending a key request to the key management server, and receiving a corresponding encryption key returned by the key management server; executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key; and downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key, and playing the target video fragment file.
Further, the video M3U8 file contains a URL list of the target video clip files and a key file corresponding to each target video clip file.
Further, the video slicing files are a plurality of video files obtained after video slicing in the HLS protocol.
In a fourth aspect, an embodiment of the present invention further provides a video distribution and decryption apparatus, including: the device comprises a first request and receiving unit, a second request and receiving unit, a third request and receiving unit and a fourth request and receiving unit, wherein the first request and receiving unit is used for sending a video M3U8 file request to an M3U8 generator, randomly selecting a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receiving the video M3U8 file sent by the M3U8 generator; the second request and receiving unit is used for sending a JavaScript decryption request to a preset decryption JavaScript server, generating a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmitting the encryption key to a preset key management server, automatically generating decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receiving the decryption JavaScript sent by the decryption JavaScript server; the third request and receiving unit is used for sending a key request to the key management server and receiving a corresponding encryption key returned by the key management server; the decryption execution unit is used for executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key; and the decryption and playing unit is used for downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key and playing the decrypted target video fragment file.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including: a processor; and a memory for storing a program of a method for generating an encrypted video library or a method for distributing and decrypting video, wherein the electronic device executes the method for generating an encrypted video library or the method for distributing and decrypting video after being powered on and running the program of the method for generating an encrypted video library or the method for distributing and decrypting video through the processor, and executes the method for generating an encrypted video library or the method for distributing and decrypting video according to any one of claims 1 to 3 or 5 to 6.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium contains one or more program instructions, where the one or more program instructions are used by a processor to execute the method for generating the encrypted video file library described in any one of the above or execute the method for distributing and decrypting the video described in any one of the above.
The method of the invention can support the browsers of the standard multimedia specification of H5 to be compatible and have better compatibility. The method has the advantages that the one-time dynamic code and the decryption algorithm are used, the terminal does not need to embed a security code or a secret key in advance, the universality and the usability are better, and compared with a content protection technology needing to install a plug-in advance, the method is easier to use and popularize. The scheme adopts the encryption key and uses the dynamic random key sequence, thereby having higher security against the illegal broadcasting, stronger anti-attack performance and higher security level.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
Fig. 1 is a flowchart of a method for generating an encrypted video file library according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a device for generating an encrypted video file library according to an embodiment of the present invention;
fig. 3 is a flowchart of a video distribution and decryption method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a video distribution and decryption apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a complete flowchart of a method for generating an encrypted video file library according to an embodiment of the present invention;
fig. 7 is a complete flowchart of a video distribution and decryption method according to an embodiment of the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention relates to a content protection technology for simultaneously encrypting content and a secret key, which specifically comprises two core processes: the method comprises a generation method process of an encrypted video file library and a distribution and decryption method process of videos.
The following describes an embodiment of the method for generating an encrypted video file library according to the present invention in detail. As shown in fig. 1 and 6, which are a flowchart and a complete flowchart of a method for generating an encrypted video file library according to an embodiment of the present invention, a specific implementation process includes the following steps:
step S101: and splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol. Hls (HTTP Live streaming), is a streaming media network transmission protocol based on HTTP.
Step S102: and copying the video fragment file to obtain at least two identical target video fragment files.
Step S103: and distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library. The video M3U8 file contains a URL list of the target video clip files and a key file corresponding to each target video clip file.
In a specific implementation process, when an M3U8 index file request sent by a terminal is received, an encrypted target video fragment file is randomly selected from the encrypted video fragment file library, and a corresponding video M3U8 file is generated in real time and returned to the terminal.
By adopting the method for generating the encrypted video file library, data preparation can be performed for the subsequent video distribution and decryption method, and subsequent video data distribution and decryption processing is facilitated.
Corresponding to the method for generating the encrypted video file library, the invention also provides a device for generating the encrypted video file library. Since the embodiment of the device is similar to the embodiment of the method described above, the description is relatively simple, and for the relevant points, reference may be made to the description of the embodiment of the method described above, and the embodiment of the device for generating an encrypted video file library described below is only illustrative. Fig. 2 is a schematic diagram of a device for generating an encrypted video file library according to an embodiment of the present invention.
The invention relates to a generating device of an encrypted video file library, which comprises the following parts:
a splitting unit 201, configured to split a video file into at least one video fragment file with a fixed duration based on a preset HLS protocol;
a copying unit 202, configured to copy the video slicing file to obtain at least two identical target video slicing files;
an encrypting unit 203, configured to allocate a unique key to the target video fragment file, and encrypt the corresponding target video fragment file using the key to obtain an encrypted video fragment file library.
By adopting the generation device of the encrypted video file library, data preparation work can be made for a subsequent video distribution and decryption method, and subsequent video data distribution and decryption processing is facilitated.
The following describes an embodiment of a video distribution and decryption method according to the present invention in detail. As shown in fig. 3 and 7, which are a flowchart and a complete flowchart of a video distribution and decryption method according to an embodiment of the present invention, a specific implementation process includes the following steps:
step S301: sending a video M3U8 file request to an M3U8 generator, randomly selecting a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receiving the video M3U8 file sent by the M3U8 generator. The video M3U8 file contains a URL list of the target video clip files and a key file corresponding to each target video clip file. The M3U8 index file refers to a media index file in the HLS protocol, and indicates a video fragment file and a key file thereof.
Step S302: sending a JavaScript decryption request to a preset decryption JavaScript server, generating a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmitting the encryption key to a preset key management server, automatically generating decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receiving the decryption JavaScript sent by the decryption JavaScript server.
Step S303: and sending a key request to the key management server, and receiving a corresponding encryption key returned by the key management server.
Step S304: and executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key.
Step S305: and downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key, and playing the target video fragment file. The video slicing files are a plurality of video files obtained after video slicing in an HLS protocol.
In a specific implementation process, a player sends a video M3U8 file request to an M3U8 generator, and a target video fragment file is randomly selected from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file. The player receives the video M3U8 file sent by the M3U8 generator. The video M3U8 file contains a URL list of the target video clip files and a key file corresponding to each target video clip file. After the operation is completed, the player sends a JavaScript decryption request to a preset decryption JavaScript server, encrypts a key by generating a random encryption algorithm through the decryption JavaScript server, transmits the encryption key to a preset key management server, automatically generates decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receives the decryption JavaScript sent by the decryption JavaScript server. After the above operations are completed, the player further sends a key request to the key management server, and receives a corresponding encryption key returned by the key management server. And executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key. And downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key, and playing the target video fragment file.
The video distribution and decryption method of the invention uses the one-time dynamic code and decryption algorithm, does not need the terminal to pre-embed the security code or key, has more universality and usability, and is easier to use and popularize compared with the content protection technology which needs to pre-install the plug-in. The scheme adopts the encryption key and uses the dynamic random key sequence, thereby having higher security against the illegal broadcasting, stronger anti-attack performance and higher security level.
Corresponding to the video distribution and decryption method, the invention also provides a video distribution and decryption device. Since the embodiment of the apparatus is similar to the above method embodiment, the description is simple, and please refer to the description of the above method embodiment, and the embodiments of the video distribution and decryption apparatus described below are only schematic. Please refer to fig. 4, which is a schematic diagram of a video distribution and decryption apparatus according to an embodiment of the present invention.
The invention relates to a video distribution and decryption device, which comprises the following parts:
a first requesting and receiving unit 401, configured to send a video M3U8 file request to an M3U8 generator, randomly select a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receive the video M3U8 file sent by the M3U8 generator;
the second requesting and receiving unit 402 is configured to send a JavaScript decryption request to a preset decryption JavaScript server, generate a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmit the encrypted key to a preset key management server, automatically generate decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receive the decryption JavaScript sent by the decryption JavaScript server;
a third request and receiving unit 403, configured to send a key request to the key management server, and receive a corresponding encryption key returned by the key management server;
a decryption execution unit 404, configured to execute the decryption JavaScript to obtain a decryption key to decrypt the encryption key;
a decryption and playing unit 405, configured to download the target video fragment file, decrypt the target video fragment file using the decrypted key, and play the decrypted target video fragment file.
The generation device of the encrypted video file library uses the disposable dynamic code and the decryption algorithm, does not need to pre-embed a security code or a secret key in a terminal, has more universality and usability, and is easier to use and popularize compared with a content protection technology needing a pre-installed plug-in. The scheme adopts the encryption key and uses the dynamic random key sequence, thereby having higher security against the illegal broadcasting, stronger anti-attack performance and higher security level.
Corresponding to the method for generating the encrypted video file library, the invention also provides electronic equipment. Since the embodiment of the electronic device is similar to the above method embodiment, the description is relatively simple, and please refer to the description of the above method embodiment, and the electronic device described below is only schematic. Fig. 5 is a schematic view of an electronic device according to an embodiment of the present invention. The electronic device specifically includes: a processor 301 and a memory 302; the memory 302 is configured to store a program of a method for generating an encrypted video library or a method for distributing and decrypting a video, and after the electronic device is powered on and runs the program of the method for generating an encrypted video library or the method for distributing and decrypting a video through the processor 301, the electronic device executes the method for generating an encrypted video library or the method for distributing and decrypting a video.
Corresponding to the method for generating the encrypted video file library, the invention further provides a computer-readable storage medium, wherein the computer-readable storage medium contains one or more program instructions, and the one or more program instructions are used for a processor to execute any one of the methods for generating the encrypted video file library or any one of the methods for distributing and decrypting the video.
In summary, it should be noted that, in the embodiment of the present invention, the processor or the processor module may be an integrated circuit chip having signal processing capability. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The processor reads the information in the storage medium and completes the steps of the method in combination with the hardware.
The storage medium may be a memory, for example, which may be volatile memory or nonvolatile memory, or which may include both volatile and nonvolatile memory.
The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory.
The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (ddr Data Rate SDRAM), Enhanced SDRAM (ESDRAM), synclink DRAM (SLDRAM), and Direct memory bus RAM (DRRAM).
The storage media described in connection with the embodiments of the invention are intended to comprise, without being limited to, these and any other suitable types of memory.
Those skilled in the art will appreciate that the functionality described in the present invention may be implemented in a combination of hardware and software in one or more of the examples described above. When software is applied, the corresponding functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (4)

1. A method for generating an encrypted video file library, comprising:
splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol;
copying the video fragment file to obtain at least two identical target video fragment files;
distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library;
when an M3U8 index file request sent by a terminal is received, randomly selecting an encrypted target video fragment file from the encrypted video fragment file library, and generating a corresponding video M3U8 file in real time to return to the terminal; the video M3U8 file contains a URL list of the target video fragment files and a key file corresponding to each target video fragment file;
sending a video M3U8 file request to an M3U8 generator, randomly selecting a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receiving the video M3U8 file sent by the M3U8 generator;
sending a JavaScript decryption request to a preset decryption JavaScript server, generating a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmitting the encryption key to a preset key management server, automatically generating decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receiving the decryption JavaScript sent by the decryption JavaScript server;
sending a key request to the key management server, and receiving a corresponding encryption key returned by the key management server;
executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key; and downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key, and playing the target video fragment file.
2. An apparatus for generating a library of encrypted video files, comprising:
the splitting unit is used for splitting the video file into at least one video fragment file with fixed time length based on a preset HLS protocol;
the copying unit is used for copying the video fragment files to obtain at least two identical target video fragment files;
the encryption unit is used for distributing a unique key for the target video fragment file, and encrypting the corresponding target video fragment file by using the key to obtain an encrypted video fragment file library;
the device comprises a first request and receiving unit, a second request and receiving unit and a third request and receiving unit, wherein the first request and receiving unit is used for sending a video M3U8 file request to an M3U8 generator, randomly selecting a target video fragment file from a preset encrypted video fragment file library through the M3U8 generator to generate a video M3U8 file, and receiving the video M3U8 file sent by the M3U8 generator;
the second request and receiving unit is used for sending a JavaScript decryption request to a preset decryption JavaScript server, generating a random encryption algorithm through the decryption JavaScript server to encrypt a key, transmitting the encryption key to a preset key management server, automatically generating decryption JavaScript according to the generated random encryption algorithm through the decryption JavaScript server, and receiving the decryption JavaScript sent by the decryption JavaScript server;
the third request and receiving unit is used for sending a key request to the key management server and receiving a corresponding encryption key returned by the key management server;
the decryption execution unit is used for executing the decryption JavaScript to acquire a decryption key to decrypt the encryption key; and the decryption and playing unit is used for downloading the target video fragment file, decrypting the target video fragment file by using the decrypted key and playing the decrypted target video fragment file.
3. An electronic device, comprising:
a processor; and
a memory for storing a program of a method for generating an encrypted video library or a method for distributing and decrypting video, wherein the electronic device executes the method for generating an encrypted video library according to claim 1 after being powered on and running the program of the method for generating an encrypted video library through the processor.
4. A computer-readable storage medium containing one or more program instructions for execution by a processor to perform the method of generating a library of encrypted video files of claim 1.
CN202010897643.6A 2020-08-31 2020-08-31 Method and device for generating encrypted video file library Active CN112188308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010897643.6A CN112188308B (en) 2020-08-31 2020-08-31 Method and device for generating encrypted video file library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010897643.6A CN112188308B (en) 2020-08-31 2020-08-31 Method and device for generating encrypted video file library

Publications (2)

Publication Number Publication Date
CN112188308A CN112188308A (en) 2021-01-05
CN112188308B true CN112188308B (en) 2022-08-12

Family

ID=73925587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010897643.6A Active CN112188308B (en) 2020-08-31 2020-08-31 Method and device for generating encrypted video file library

Country Status (1)

Country Link
CN (1) CN112188308B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331379A (en) * 2016-10-27 2017-01-11 北京奇虎科技有限公司 Communication security method and device and portable mobile terminal
CN108881205A (en) * 2018-06-08 2018-11-23 西安理工大学 A kind of safety broadcasting system and playback method of HLS Streaming Media
CN109996095A (en) * 2019-03-28 2019-07-09 湖南快乐阳光互动娱乐传媒有限公司 A kind of network video-on-demand prevents from stealing method, system and the medium of chain broadcasting
CN111556340A (en) * 2020-05-21 2020-08-18 西安工业大学 Safe cross-platform video stream playing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8959366B2 (en) * 2010-01-28 2015-02-17 Cleversafe, Inc. De-sequencing encoded data slices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331379A (en) * 2016-10-27 2017-01-11 北京奇虎科技有限公司 Communication security method and device and portable mobile terminal
CN108881205A (en) * 2018-06-08 2018-11-23 西安理工大学 A kind of safety broadcasting system and playback method of HLS Streaming Media
CN109996095A (en) * 2019-03-28 2019-07-09 湖南快乐阳光互动娱乐传媒有限公司 A kind of network video-on-demand prevents from stealing method, system and the medium of chain broadcasting
CN111556340A (en) * 2020-05-21 2020-08-18 西安工业大学 Safe cross-platform video stream playing method

Also Published As

Publication number Publication date
CN112188308A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
KR100957121B1 (en) Key distribution method and authentication server
TWI510066B (en) Systems and methods for securely streaming media content
CN101517975B (en) By IPTV and home network being connected to each other the method and apparatus that send/receive content
JP5861220B2 (en) System and method for effective support for short term crypto periods in template mode
EP2835933B1 (en) Method, device and system for implementing media data processing
EP2605168B1 (en) System and method for preventing the unauthorized playback of content
US9769654B2 (en) Method of implementing a right over a content
US8788849B2 (en) Method and apparatus for protecting cached streams
MX2011002586A (en) Simulcrypt key sharing with hashed keys.
US9369288B1 (en) Video data delivery protection
CN104540016A (en) Video playing method and device
CN103888475A (en) Method and device for protecting multimedia data
CN111049832B (en) Reverse proxy method and related device
EP3317798B1 (en) Decrypting and decoding media assets through a secure data path
JP2007156523A (en) Information terminal device
CN108055356B (en) Information processing method, server, client and readable storage medium
CN112565656B (en) Video call method, device, system, electronic equipment and storage medium
CN113312655A (en) File transmission method based on redirection, electronic equipment and readable storage medium
CN107919958B (en) Data encryption processing method, device and equipment
CN112188308B (en) Method and device for generating encrypted video file library
CN110008654B (en) Electronic file processing method and device
CN110912941A (en) Transmission processing method and device for multicast data
TW201640392A (en) Computerized system and method for implementing digital rights management
KR101662489B1 (en) Cloud based protection proxy server supporting common encryption and its operation method
CN114501069A (en) HLS-based multimedia playing method, system, device and storage medium

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