CN111935435B - Video file encryption method and device, digital television equipment and storage medium - Google Patents

Video file encryption method and device, digital television equipment and storage medium Download PDF

Info

Publication number
CN111935435B
CN111935435B CN202010737223.1A CN202010737223A CN111935435B CN 111935435 B CN111935435 B CN 111935435B CN 202010737223 A CN202010737223 A CN 202010737223A CN 111935435 B CN111935435 B CN 111935435B
Authority
CN
China
Prior art keywords
video file
file
original video
encrypted
recording
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
CN202010737223.1A
Other languages
Chinese (zh)
Other versions
CN111935435A (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.)
Shenzhen Dingsheng Photoelectric Co ltd
Original Assignee
Shenzhen Dingsheng Photoelectric 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 Shenzhen Dingsheng Photoelectric Co ltd filed Critical Shenzhen Dingsheng Photoelectric Co ltd
Priority to CN202010737223.1A priority Critical patent/CN111935435B/en
Publication of CN111935435A publication Critical patent/CN111935435A/en
Application granted granted Critical
Publication of CN111935435B publication Critical patent/CN111935435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/913Television signal processing therefor for scrambling ; for copy protection
    • 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/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/4408Processing 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 encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The application is applicable to the technical field of digital televisions and provides a video file encryption method and device, digital television equipment and a storage medium. The video file encryption method comprises the following steps: if the operation of starting to burn the original video file is detected, setting the attribute of the original video file in burning as hidden; after the original video file is completely recorded, encrypting the original video file to obtain an encrypted video file; and storing the encrypted video file to a specified recording file storage directory. According to the method and the device, the attribute of the original video file is set to be hidden when the recording is started, then the recorded original video file is encrypted and stored in the appointed directory, and a user can only copy the encrypted original video file, namely the encrypted video file, so that the copyright protection of the video content is enhanced.

Description

Video file encryption method and device, digital television equipment and storage medium
Technical Field
The present application belongs to the technical field of digital televisions, and in particular, to an encryption method and apparatus for a video file, a digital television device, and a storage medium.
Background
In copyright protection, since video content recorded from digital television equipment is easily copied and spread, it is difficult to realize comprehensive protection of video content copyright. Although copyright protection can be realized by encrypting the recorded video file at present, the problem that the video file is copied and spread by a user without being encrypted still exists.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for encrypting a video file, a digital television device, and a storage medium, which can prevent a problem that a recorded video file is copied and spread by a user when the recording video file is not encrypted, and enhance copyright protection of video content.
In a first aspect, an embodiment of the present application provides an encryption method for a video file, which is applied to a digital television device, and the encryption method includes:
if the operation of starting to burn the original video file is detected, setting the attribute of the original video file in burning as hidden;
after the original video file is completely recorded, encrypting the original video file to obtain an encrypted video file;
and storing the encrypted video file to a specified recording file storage directory.
According to the embodiment of the application, the attribute of the original video file in recording is set to be hidden, then the recorded original video file is encrypted and stored in the appointed storage directory, so that a user can only copy the encrypted original video file, namely the encrypted video file, and the copyright protection of video contents is enhanced.
Further, the encrypting the original video file to obtain an encrypted video file includes:
calling a flash memory read-write interface of the digital television equipment;
accessing a flash memory device of the digital television equipment through the flash memory read-write interface, and reading a unique serial number of the digital television equipment specified in a high-bandwidth digital content protection technology;
and encrypting the original video file by adopting the unique serial number to obtain the encrypted video file.
In order to protect the copyright of the video content, it is limited that an encrypted video file obtained from a certain digital television device can only be played on the digital television device. In the application, the purpose can be achieved by encrypting the recorded original video file by adopting the unique serial number which has the unique corresponding relation with the digital television equipment, so that the spread of the encrypted video file is avoided, and the rights and interests of video content copyright owners are protected. The unique serial number is stored in a flash memory device of the digital television equipment, so that the unique serial number can be obtained by calling a flash memory read-write interface of the digital television equipment.
Further, encrypting the original video file by using the unique serial number to obtain the encrypted video file includes:
reading a data block with a preset size from the initial address of the original video file for encryption each time by using a file pointer, writing the encrypted data block into a new video file, and moving the position of the file pointer backwards by the distance of the size of the data block, wherein the unique serial number is used as a secret key for encryption;
and after all data blocks of the original video file are written into the new video file, determining the new video file as the encrypted video file.
The encryption method is a block encryption, also called block encryption, among symmetric encryption. The encryption mode is that from the initial address of the original video file, the data blocks with the preset size are extracted and encrypted and written into a new video file until the data blocks of the whole original video file are written into the new video file, so that the encrypted video file is obtained. By the method, the original video file is encrypted, and the efficiency and the reliability of video file encryption can be improved.
Further, after writing all data blocks of the original video file into the new video file, determining the new video file as the encrypted video file includes:
after all data blocks of the original video file are written into the new video file, detecting whether the position of the file pointer is at the end address of the original video file;
and if the position of the file pointer is at the end address of the original video file, and the size of the new video file is the same as that of the original video file, determining the new video file as the encrypted video file.
The size of the file is the same before and after the file is encrypted by using the block encryption, so that the original video file encrypted by using the encryption mode can be used as a condition for judging whether the original video file is completely encrypted. Meanwhile, in order to improve the accuracy of the judgment, the position of the file pointer can be detected as a precondition for judging whether the original video file is completely encrypted, namely when the file pointer is positioned at the end address of the original video and the size of the new video file is the same as that of the original video file, the original video file is judged to be completely encrypted, and then the new video file is determined to be the encrypted video file.
Further, after the recording of the original video file is completed, the method further includes:
renaming the original video file by adopting a preset rule;
and/or
And transferring the original video file to a storage directory except the recording file storage directory.
When a television program is recorded, a recorded file is generally named by the name of the television program and stored in a designated storage directory. If the user knows the encryption rules of the present application, the hidden original video file may be found according to the name and the recording file storage directory. In order to avoid this situation, the original video file may be renamed according to a preset rule or a storage directory of the original video file may be changed, where the two ways may be combined to further improve the reliability of video file encryption.
Further, after obtaining the encrypted video file, the method further includes:
renaming the encrypted video file by adopting a preset rule, and deleting the original video file.
To avoid the name of the encrypted video file from getting the attention of the user, the encrypted video file may be renamed in a default manner, for example, by the name of the television program. Meanwhile, in order to fundamentally prevent the user from finding the original video file, the original video file can be deleted while the encrypted video file is renamed.
Further, whether the burning of the original video file is completed or not is determined by the following steps:
acquiring a current video recording mode of the digital television equipment, wherein the video recording mode comprises a reserved recording mode and an instant recording mode;
if the current video recording mode is the reserved recording mode, determining a recording time period corresponding to the reserved recording mode, and determining that the recording of the original video file is finished after the recording time period is finished;
if the current video recording mode is the instant recording mode, after receiving the input recording stopping instruction, determining that the recording of the original video file is finished.
The digital television equipment judges whether the recording of the video file is finished according to different criteria under different video recording modes. If the current video recording mode is recording reservation, the end of the recording time period can be used as the basis for completing the recording of the original video file; if the current video recording mode is real-time recording, the command of stopping recording can be received as the basis for completing recording of the original video file.
In a second aspect, an embodiment of the present application provides an encryption apparatus for a video file, which is applied to a digital television device, and the encryption apparatus includes:
the file attribute setting module is used for setting the attribute of the original video file to be hidden when the operation of recording the original video file is detected;
the video file encryption module is used for encrypting the original video file after the original video file is completely recorded to obtain an encrypted video file;
and the encrypted file storage module is used for storing the encrypted video file to a specified recording file storage directory.
In a third aspect, an embodiment of the present application provides a digital television apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the video file encryption method as set forth in the first aspect of the embodiment of the present application when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for encrypting a video file as set forth in the first aspect of the embodiment of the present application is implemented.
Compared with the prior art, the embodiment of the application has the advantages that: the problem that recorded video files are copied and spread by a user when the recorded video files are not encrypted can be prevented, the copyright protection strength on video contents is enhanced, and the method is simple and convenient to implement and high in practicability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of an encryption method for a video file according to an embodiment of the present application;
fig. 2 is a flowchart of an encryption method for a video file according to an embodiment of the present application in a practical application scenario;
fig. 3 is a structural diagram of an encryption apparatus for video files according to an embodiment of the present application;
fig. 4 is a schematic diagram of a digital television apparatus according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular device structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terminology used in the following examples is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of this application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the embodiments of the present application, "one or more" means one, two or more; "and/or" describes the association relationship of the associated object, and indicates that three relationships can exist; for example, a and/or B, may represent: a exists singly, A and B exist simultaneously, and B exists singly, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The encryption method for the video file provided in the embodiment of the present application may be applied to various types of digital television devices, or may be applied to other terminal devices or servers such as a mobile phone, a tablet computer, a medical device, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like.
The program recording is a basic function of the digital television, which not only can record favorite television programs for users at any moment, but also can be matched with an electronic program guide of the digital television to record the programs in a reservation way, so that the users can not miss any wonderful television programs. The function is convenient for users, and the recorded programs can be played on any digital television equipment supporting the multimedia function, so that the programs are frequently shared as resources, and even more importantly, the programs are used as a profit-making tool, and the rights and interests of operators and program copyright owners are seriously infringed.
At present, the copyright of video content is protected mainly by encrypting a recorded video file, but the video file still has the risk of being copied and spread by a user without being encrypted in the encryption process, so that the copyright protection of the video content is greatly reduced. In view of the above, the present application provides a new method for encrypting a video file to solve the above problems.
In an embodiment, please refer to fig. 1, which is a flowchart illustrating a method for encrypting a video file according to the present application, including:
101. if the operation of starting to burn the original video file is detected, the attribute of the original video file in burning is set to be hidden;
the encryption of the video file is performed after the recording of the video content is completed, so that the original video file can be hidden so as to prevent a user from copying the video file in the encryption process after the recording of the video file is completed, the user cannot find the existence of the original video file, and only the final encrypted video file is presented, so that the situation is avoided. Specifically, to hide an original video file, the attribute of the original video file may be set to be hidden after the recording of the file is completed; or when the operation of recording the video content is detected, the attribute of the original video file in recording is set to be hidden. The latter is preferred by the two setting modes, and the latter can not make users aware of the generation of the original video file, so that the encryption reliability of the video file can be further improved, and the protection strength of the video content can be enhanced.
A general digital television device has two video recording modes, namely a reserved recording mode and an instant recording mode, and the operation of starting recording an original video file is different in different modes. Therefore, in an embodiment, in the recording-at-moment mode, the recording start operation may be that the digital television device receives an input recording start instruction; in the reserved recording mode, the recording start operation may be that the digital television device detects that the start time of the recording time period corresponding to the mode matches the current time. Here, there may be two cases of matching the start time and the current time, for example, assuming that the reserved recording time is 10-11 of today, and one case is that the current time is just 10; another situation may be that a system delay or a detection error occurs, and the current time falls between 10. Different judgment standards are adopted under different conditions, so that the influence caused by system delay and detection errors can be reduced to a certain extent, and the reliability of encryption is improved.
102. After the original video file is completely recorded, encrypting the original video file to obtain an encrypted video file;
the encryption of the original video file is performed after the recording of the video file is completed. Therefore, first, to determine whether the current original video file is a recorded video file, in one embodiment, the determination can be made by the following steps:
201. acquiring a current video recording mode of the digital television equipment, wherein the video recording mode comprises a reserved recording mode and an instant recording mode;
202. if the current video recording mode is the reserved recording mode, determining a recording time period corresponding to the reserved recording mode, and determining that the recording of the original video file is finished after the recording time period is finished;
203. if the current video recording mode is the instant recording mode, after receiving the input recording stopping instruction, determining that the recording of the original video file is finished.
In this embodiment, detecting whether the original video file is a completely recorded video file, i.e., detecting the recording ending operation, the detecting method is the same as the detecting of the recording starting operation, but the detecting targets of the two are different. For the operation of detecting the completion of the recording, in the instant recording mode, the digital television equipment detects that the target is an input recording ending instruction, that is, as long as the recording ending instruction is detected, the recording of the original video file is determined to be completed; in the reserved recording mode, the digital television equipment detects that the target is the termination time of the recording time period corresponding to the mode, matches the termination time with the current time, and indicates that recording is finished if the termination time is matched with the current time and indicates that recording is not finished if the termination time is not matched with the current time. Here, there may be two cases of matching the termination time and the current time, for example, it is still assumed that the reserved recording time is 10-11 of today, and one case is that the current time is just 11; another situation may be that a system delay occurs or an error occurs during detection, and the current time falls after 11.
After the recording of the original video file is completed, in an embodiment, the following operations may be further performed:
renaming the original video file by adopting a preset rule;
and/or
And transferring the original video file to a storage directory except the recording file storage directory.
After the original video file is completely recorded, the original video file can be renamed without adopting a recording default file name, so that a user can be prevented from finding a hidden file according to the default file name. In addition, because the recorded files can be conveniently obtained by the user under a default storage directory, the original video files can be transferred to the non-default storage directory in order to avoid the user finding the hidden original video files under the directory. The two modes can avoid the situation that a user summarizes the rules to find the original video file, can be used independently or in combination, and preferably, the two modes are used in combination, so that the reliability of video file encryption can be further improved. The original video file may be renamed by "Temp + station number + program name + event name, suffix name", or by random naming, that is, the rules of naming each time are changed, so that the user is unable to find the file. Similarly, for the transfer of the original video file to a storage directory other than the recording file storage directory, the transfer storage directory can be designated or random, and the reliability of video encryption can be improved.
Secondly, in the application, the original video file can be encrypted by adopting a symmetric encryption algorithm, and the symmetric encryption algorithm is a bitwise encryption algorithm, so that the encryption speed can be improved. More specifically, the Block encryption method in symmetric encryption is adopted, and the Block encryption method has four modes, namely, an Electronic CodeBook (ECB) mode, a Cipher Block Chaining (CBC) mode also called a Cipher text Block Chaining mode, a Cipher text in Cipher text feed back mode also called a Cipher text FeedBack mode, and an Output-feed back (OFB) mode also called an Output FeedBack mode, and the four modes each have advantages and disadvantages and can be selected according to specific requirements when applied.
In addition, in the encryption process, in order to ensure that the encrypted video file can only be played on the digital television device that obtains the file, and to enhance the copyright protection of the video content, in one embodiment, the unique serial number (that is, HDCPKEY) of the digital television device specified in the high-bandwidth digital content protection technology may be used as a key to encrypt the original video. Since the unique serial number is burned in a second blank in a flash memory device of the digital television device before the digital television device leaves a factory, in another embodiment, the encrypting the original video file to obtain an encrypted video file may include:
calling a flash memory read-write interface of the digital television equipment; accessing a flash memory device of the digital television equipment through the flash memory read-write interface, and reading a unique serial number of the digital television equipment specified in a high-bandwidth digital content protection technology; and encrypting the original video file by adopting the unique serial number to obtain the encrypted video file.
The method comprises the steps of reading a unique serial number from a flash memory device of the digital television equipment by calling a flash memory read-write interface, and encrypting an original video file after the unique serial number is obtained.
The specific encryption step of the original video file may include, in one embodiment:
reading a data block with a preset size from the initial address of the original video file for encryption each time by using a file pointer, writing the encrypted data block into a new video file, and moving the position of the file pointer backwards by the distance of the size of the data block, wherein the unique serial number is used as a secret key for encryption;
and after all data blocks of the original video file are written into the new video file, determining the new video file as the encrypted video file.
The block encryption method, regardless of the mode, requires that the video file to be encrypted is first partitioned into blocks according to a preset size, where the preset size of the data block can be selected according to the computing capability of the device, such as 4kb, 1MB, and the like. The size of the data block is preferably 4kb, the original video file is read and encrypted by taking 4kb as a unit, the method can be suitable for most of equipment, and the problem that the encryption time is long due to poor computing capability of some equipment is avoided. After the size of the data block is set, a file pointer can be used for reading from the initial address of the original video file according to the set size of the data block, the data block is encrypted by using a unique serial number as a key every time one data block is read, the data block is written into a new video file after encryption is finished, the pointer is moved to read the next data block to execute the same operation, and the new video file can be determined as an encrypted video file after all data blocks in the original video file are read, encrypted and written one by one, so that the encryption operation on the original video file is finished. It is worth noting that the method can encrypt the full text of the original video file, improves the safety of the encrypted video file, enables the encrypted video file not to be easily cracked, and further enhances the copyright protection of the video content.
Specifically, in one embodiment, the new video file may be determined to be an encrypted video file by:
after all data blocks of the original video file are written into the new video file, detecting whether the position of the file pointer is at the end address of the original video file;
and if the position of the file pointer is at the end address of the original video file and the size of the new video file is the same as that of the original video file, determining the new video file as the encrypted video file.
The file pointer reads the data block from the start address of the original video file, so that when the data blocks of the original video are all written into the new video file, the file pointer should be moved to the end address of the original video file, and at this time, whether the position of the file pointer is at the end address can be used as a condition for judging whether the encryption of the original video file is completed. In addition, the file size of the file encrypted by the block encryption is the same before and after the encryption, and for the original video file encrypted by the encryption method, the same file size before and after the encryption can be used as another condition for judging whether the encryption of the original video file is finished. Through the double judgment of the two conditions, whether the original video file is completely encrypted can be accurately judged, so that the new video file is determined as the encrypted video file to carry out subsequent operation, and the reliability of video file encryption is improved.
103. And storing the encrypted video file to a specified recording file storage directory.
And finally, after the encryption operation is finished to obtain the encrypted video file, the encrypted video file is stored in a recording default storage directory, namely the appointed recording file storage directory. Therefore, the user can only see the encrypted video file and cannot touch the original video file, and the reliability of the video file encryption method can be improved.
Preferably, in one embodiment, the reliability of the video file encryption method can be further improved by:
after the encrypted video file is obtained, renaming the encrypted video file by adopting a preset rule, and deleting the original video file.
To avoid the name of the encrypted video file from getting the attention of the user, the encrypted video file may be renamed with a default name, for example, with the name of a television program. Meanwhile, in order to fundamentally prevent the user from finding the original video file, the original video file can be deleted while the encrypted video file is renamed, so that the reliability of the video file encryption method is further improved, and the video content copyright protection strength is enhanced.
After obtaining the encrypted video file, if the user clicks on the digital television apparatus a for playing, the user needs to decrypt the encrypted video. Decryption is a reverse process for encryption, in the process, the unique serial number of the digital television equipment A is obtained firstly, then the data block with the same size as the encrypted data block is read from the encrypted video file, the data block is decrypted by the unique serial number through block encryption, and then the data block can be directly played. However, a phenomenon of decryption failure may also occur, for example, the digital television apparatus a is not a digital television apparatus for obtaining an encrypted video file, in this case, the digital television apparatus may prompt the user that decryption fails and cannot be played, and a specific prompt form may be to pop up a box and then write a corresponding prompt. The method decrypts the encrypted video file by acquiring the unique serial number of the playing digital television equipment in the playing process, so as to ensure that the encrypted video file can only be played on the digital television equipment acquiring the file, the encrypted video file cannot be played even if a user copies and spreads the encrypted video file, and the copyright protection strength of the video content is improved.
In summary, according to the method and the device for recording the video content, the attribute of the original video file is set to be hidden when recording starts, then the recorded original video file is encrypted and stored in the appointed directory, so that a user can only copy the encrypted video file, the encryption reliability of the video file can be improved, and the copyright protection of the video content is enhanced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
For ease of understanding, the encryption method for video files proposed in the present application is described below in a practical application scenario.
A flow chart of the video file encryption method provided by the present application in an actual application scenario is shown in fig. 2, a specific execution main body is a digital television, and assuming that a current recording mode is an instant recording mode, specific steps are as follows:
first, the digital tv detects whether a command to start recording is currently received, for example, it detects that a user presses a button to start recording through a remote controller. When the instruction of starting recording is detected, the attribute of the original video file currently being recorded is set as hidden. The original video file is a plaintext which is not encrypted, and the plaintext is set to be hidden, so that the situation that a user copies and spreads the plaintext, and the rights and interests of video content copyright owners are damaged can be avoided. After the recording of the original video file is finished, the original video file with the hidden attribute can be encrypted to form an encrypted video file, so that the encryption reliability of the video file can be improved, and the copyright protection strength can be enhanced. Specifically, whether the recording of the original video file is completed or not can be determined by determining whether the digital television detects an input instruction to stop recording, for example, by detecting that a user presses a button to stop recording through a remote controller.
Then, after the recorded original video file is obtained, the original video file is renamed and is transferred to any storage directory except the recorded file storage directory. For example, the file name of the recorded digital tv is the default tv program name, and is stored in a default storage directory. Assuming that the name of the currently recorded television program is 'happy book management', and the default storage directory in which the digital television recording is completed is 'E: \ important file \ recorded file', the recorded original video file is named as 'happy book management' and stored in 'E: \ important file \ recorded file'. At this time, since there may be a case where the user finds the hidden original video file by using the television program name and the default storage directory, in order to avoid this, the original video file may be renamed and transferred to another storage directory, for example, the original video file may be named as a "random character string" and transferred to a certain file of the D-disc. By adopting the method, the reliability of video file encryption can be improved, and a user can hardly find a plaintext video file so as to enhance the copyright protection of video contents.
Then, in order to ensure that the encrypted original video file can only be played on the digital television, the digital television first obtains a key used in the encryption process. Specifically, the unique serial number of the digital television equipment is used for encryption. The unique serial number is stored in a penultimate blank of a flash memory device of the digital television equipment, and a flash memory read-write interface can be called to read from the flash memory device.
The original video file may then be encrypted using block encryption. Reading a 4kb data block from the initial address of an original video file by using a pointer file, encrypting the data block by using a unique serial number, writing the encrypted data block into a new video file, judging whether two conditions that the position of the pointer file is at the end address of the original video file and the sizes of the original video file and the new video file are the same are met or not, and determining the new video file as an encrypted video file if the two conditions are met; if the two conditions are not completely met, the pointer file is moved circularly to read the data block for encryption until the two conditions are met, and the new video file is confirmed as an encrypted video file.
Finally, in order to make the user unable to find the original video file and not doubtful about the name of the encrypted video file, the encrypted video file can be renamed and the original video file can be deleted. Renaming takes the example given above as an example, for example, an encrypted video file may be renamed to "happy book camp".
By the method, under the condition that the encrypted video file can only be played on the equipment for obtaining the file, a user can only contact the encrypted video file, the original video file is difficult to find and copy and spread, the reliability of video encryption can be improved, and the copyright protection of video contents can be enhanced.
Fig. 3 shows a block diagram of an encryption apparatus for a video file according to an embodiment of the present application, and for convenience of description, only the portions related to the embodiment of the present application are shown.
Referring to fig. 3, the apparatus includes:
a file attribute setting module 301, configured to set an attribute of an original video file to be hidden when an operation of starting recording the original video file is detected;
a video file encryption module 302, configured to encrypt the original video file after the recording of the original video file is completed, so as to obtain an encrypted video file;
and the encrypted file storage module 303 is configured to store the encrypted video file into an appointed recording file storage directory.
Further, the video file encryption module 302 may include:
the interface calling submodule is used for calling a flash memory read-write interface of the digital television equipment;
the serial number reading sub-module is used for accessing a flash memory device of the digital television equipment through the flash memory read-write interface and reading a unique serial number of the digital television equipment specified in the high-bandwidth digital content protection technology;
and the video file encryption submodule is used for encrypting the original video file by adopting the unique serial number to obtain the encrypted video file.
Further, the video file encryption sub-module may include:
a grouping encryption unit, configured to use a file pointer to read a data block of a preset size from an initial address of the original video file each time for encryption, write the encrypted data block into a new video file, and move the position of the file pointer backward by a distance corresponding to the size of the data block, where the encryption uses the unique serial number as a key;
and the encrypted video determining unit is used for determining the new video file as the encrypted video file after all data blocks of the original video file are written into the new video file.
Further, the encrypted video determining unit may further include:
a file pointer detecting subunit, configured to detect whether a position of the file pointer is at an end address of the original video file after all data blocks of the original video file are written in the new video file;
and the encrypted video determining subunit is configured to determine the new video file as the encrypted video file if the position of the file pointer is at the end address of the original video file, and the size of the new video file is the same as that of the original video file.
Further, the apparatus may further include:
the renaming submodule is used for renaming the original video file by adopting a preset rule after the recording of the original video file is finished;
and/or
And the file transferring and storing submodule is used for transferring the original video file to a storage directory except the recorded file storage directory.
Further, the renaming sub-module may be configured to, after obtaining the encrypted video file, rename the encrypted video file by using a preset rule, and delete the original video file.
Further, the video file encryption module 302 may include:
the video recording mode detection submodule is used for acquiring the current video recording mode of the digital television equipment, and the video recording mode comprises a reserved recording mode and an instant recording mode;
a recording completion judgment sub-module, configured to determine a recording time period corresponding to the recording reservation mode if the current video recording mode is the recording reservation mode, and determine that recording of the original video file is completed after the recording time period ends; if the current video recording mode is the instant recording mode, after receiving the input recording stopping instruction, determining that the recording of the original video file is finished.
The embodiment of the present application further provides a digital television device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the encryption method for each video file as proposed in the present application when executing the computer program.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the encryption method for each video file as proposed in the present application.
The embodiment of the present application further provides a computer program product, which, when running on a digital television device, causes the digital television device to execute the steps of the encryption method for each video file provided in the present application.
Fig. 4 is a schematic structural diagram of a digital television apparatus according to an embodiment of the present application. As shown in fig. 4, the digital television apparatus 4 of this embodiment includes: at least one processor 40 (only one shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the processor 40 implementing the steps in any of the above-described embodiments of the method for encrypting a video file when executing the computer program 42.
The digital television apparatus 4 may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the digital television apparatus 4 and does not constitute a limitation of the digital television apparatus 4 and may include more or less components than those shown, or some components may be combined, or different components may be included, such as input output devices, network access devices, etc.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may be other 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 components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the digital television apparatus 4, such as a hard disk or a memory of the digital television apparatus 4. The memory 41 may also be an external storage device of the Digital television apparatus 4 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the Digital television apparatus 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the digital television apparatus 4. The memory 41 is used for storing operating means, applications, bootloaders (bootloaders), data and other programs, such as program code of the computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned apparatus, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above may be implemented by instructing relevant hardware by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the embodiments of the methods described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include at least: any entity or apparatus capable of carrying computer program code to a terminal device, including recording media, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a usb-drive, a removable hard drive, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. A video file encryption method is applied to digital television equipment, and is characterized by comprising the following steps:
aiming at a video with copyright protection, if the operation of recording an original video file of the video is detected, setting the attribute of the original video file in recording as hidden;
after the original video file is completely recorded, encrypting the original video file to obtain an encrypted video file;
storing the encrypted video file to a specified recording file storage directory;
the encrypting the original video file to obtain an encrypted video file includes:
calling a flash memory read-write interface of the digital television equipment;
accessing a flash memory device of the digital television equipment through the flash memory read-write interface, and reading a unique serial number of the digital television equipment specified in a high-bandwidth digital content protection technology;
and encrypting the original video file by adopting the unique serial number to obtain the encrypted video file.
2. The encryption method of claim 1, wherein encrypting the original video file using the unique serial number to obtain the encrypted video file comprises:
reading a data block with a preset size from the initial address of the original video file for encryption each time by using a file pointer, writing the encrypted data block into a new video file, and moving the position of the file pointer backwards by the distance of the size of the data block, wherein the unique serial number is used as a secret key for encryption;
and after all data blocks of the original video file are written into the new video file, determining the new video file as the encrypted video file.
3. The encryption method of claim 2, wherein determining the new video file as the encrypted video file after writing all data blocks of the original video file into the new video file comprises:
after all data blocks of the original video file are written into the new video file, detecting whether the position of the file pointer is at the end address of the original video file;
and if the position of the file pointer is at the end address of the original video file, and the size of the new video file is the same as that of the original video file, determining the new video file as the encrypted video file.
4. The encryption method of claim 1, after said burning of said original video file is completed, further comprising:
renaming the original video file by adopting a preset rule;
and/or
And transferring the original video file to a storage directory except the recording file storage directory.
5. The encryption method of claim 1, after obtaining the encrypted video file, further comprising:
renaming the encrypted video file by adopting a preset rule, and deleting the original video file.
6. The encryption method according to any of claims 1 to 5, wherein whether the burning of the original video file is completed is determined by:
acquiring a current video recording mode of the digital television equipment, wherein the video recording mode comprises a reserved recording mode and an instant recording mode;
if the current video recording mode is the reserved recording mode, determining a recording time period corresponding to the reserved recording mode, and determining that the recording of the original video file is finished after the recording time period is finished;
if the current video recording mode is the instant recording mode, after receiving an input recording stopping command, determining that the recording of the original video file is finished.
7. An encryption device for video files, applied to digital television equipment, characterized in that the device comprises:
the file attribute setting module is used for setting the attribute of an original video file in recording as hidden if the operation of starting recording the original video file of the video is detected aiming at the video with copyright protection;
the video file encryption module is used for encrypting the original video file after the original video file is completely recorded to obtain an encrypted video file;
the encrypted file storage module is used for storing the encrypted video file to a specified recording file storage directory;
wherein, the video file encryption module comprises:
the interface calling submodule is used for calling a flash memory read-write interface of the digital television equipment;
the serial number reading sub-module is used for accessing a flash memory device of the digital television equipment through the flash memory read-write interface and reading a unique serial number of the digital television equipment specified in the high-bandwidth digital content protection technology;
and the video file encryption submodule is used for encrypting the original video file by adopting the unique serial number to obtain the encrypted video file.
8. A digital television apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of encrypting a video file according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method for encrypting a video file according to any one of claims 1 to 6.
CN202010737223.1A 2020-07-28 2020-07-28 Video file encryption method and device, digital television equipment and storage medium Active CN111935435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010737223.1A CN111935435B (en) 2020-07-28 2020-07-28 Video file encryption method and device, digital television equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010737223.1A CN111935435B (en) 2020-07-28 2020-07-28 Video file encryption method and device, digital television equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111935435A CN111935435A (en) 2020-11-13
CN111935435B true CN111935435B (en) 2022-12-20

Family

ID=73314465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010737223.1A Active CN111935435B (en) 2020-07-28 2020-07-28 Video file encryption method and device, digital television equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111935435B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114842319A (en) * 2022-03-01 2022-08-02 杭州未名信科科技有限公司 Method and device for detecting home scene, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065068A (en) * 2012-12-19 2013-04-24 深圳创维-Rgb电子有限公司 Method and device for encrypting recorded documents
CN105574423A (en) * 2014-10-09 2016-05-11 中兴通讯股份有限公司 Terminal device and file management method thereof
CN106453056A (en) * 2016-10-28 2017-02-22 努比亚技术有限公司 Mobile terminal and method for safely sharing picture
CN107229875A (en) * 2017-06-01 2017-10-03 深圳市伊特利网络科技有限公司 Terminal method for secret protection and system
CN109657488A (en) * 2019-02-26 2019-04-19 北京智游网安科技有限公司 A kind of resource file cipher processing method, intelligent terminal and storage medium
CN111191277A (en) * 2019-12-10 2020-05-22 北京中宏立达科技发展有限公司 Hidden encryption and confidentiality method for optical disk file and optical disk medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191938A1 (en) * 2002-04-09 2003-10-09 Solarsoft Ltd. Computer security system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065068A (en) * 2012-12-19 2013-04-24 深圳创维-Rgb电子有限公司 Method and device for encrypting recorded documents
CN105574423A (en) * 2014-10-09 2016-05-11 中兴通讯股份有限公司 Terminal device and file management method thereof
CN106453056A (en) * 2016-10-28 2017-02-22 努比亚技术有限公司 Mobile terminal and method for safely sharing picture
CN107229875A (en) * 2017-06-01 2017-10-03 深圳市伊特利网络科技有限公司 Terminal method for secret protection and system
CN109657488A (en) * 2019-02-26 2019-04-19 北京智游网安科技有限公司 A kind of resource file cipher processing method, intelligent terminal and storage medium
CN111191277A (en) * 2019-12-10 2020-05-22 北京中宏立达科技发展有限公司 Hidden encryption and confidentiality method for optical disk file and optical disk medium

Also Published As

Publication number Publication date
CN111935435A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
US10148625B2 (en) Secure transfer and tracking of data using removable nonvolatile memory devices
KR100608585B1 (en) Method and apparatus for searching rights objects stored in portable storage device using object location data
KR101352513B1 (en) Method and apparatus for providing efficiently the location of contents encryption key
US8032941B2 (en) Method and apparatus for searching for rights objects stored in portable storage device object identifier
CN109660352B (en) Block chain-based distribution relation recording method and device and terminal equipment
CN109145617B (en) Block chain-based digital copyright protection method and system
US20080005590A1 (en) Memory system
US8065743B2 (en) Content use management system, content-providing system, content-using device and computer readable medium
CN115277143B (en) Data security transmission method, device, equipment and storage medium
CN104937904A (en) Copy offload for disparate offload providers
US20060059194A1 (en) Method and apparatus for retrieving rights object from portable storage device using object identifier
US20080270792A1 (en) System and method of encrypting and decrypting digital files produced by digital still devices
CN101578608A (en) Methods and apparatuses for accessing content based on a session ticket
CN111935435B (en) Video file encryption method and device, digital television equipment and storage medium
US20050071662A1 (en) Method of managing file structure in memory card and its related technology
JP2007188445A (en) Information leakage prevention system and information leakage prevention method
JP4659032B2 (en) Method and apparatus for retrieving rights object using position information of object in mobile storage device
KR20050116846A (en) A method of providing a personal informaion processor with caption information corresponding to multimedia contents and a system thereof
CN101617318A (en) Be used for method and apparatus that content and licence are linked
JP5175494B2 (en) Encrypted content editing method and content management apparatus
CN113672876B (en) OTG-based method and device for quickly obtaining evidence of mobile phone
KR100550073B1 (en) Method for transferring contents between mobile phones and Apparatus thereof
KR100695442B1 (en) Method of operating local contents providing system for providing encrypted contents to local system and local contents providing system of enabling the method
CN113946843A (en) Information display method and device, electronic equipment and readable medium
JP2005109869A (en) Method for managing encryption key

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