CN109886047B - File encryption processing method and device - Google Patents

File encryption processing method and device Download PDF

Info

Publication number
CN109886047B
CN109886047B CN201910218307.1A CN201910218307A CN109886047B CN 109886047 B CN109886047 B CN 109886047B CN 201910218307 A CN201910218307 A CN 201910218307A CN 109886047 B CN109886047 B CN 109886047B
Authority
CN
China
Prior art keywords
file
encrypted
target
container
cover
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
CN201910218307.1A
Other languages
Chinese (zh)
Other versions
CN109886047A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910218307.1A priority Critical patent/CN109886047B/en
Publication of CN109886047A publication Critical patent/CN109886047A/en
Application granted granted Critical
Publication of CN109886047B publication Critical patent/CN109886047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The application relates to a file encryption processing method and device, wherein the method comprises the following steps: acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file; acquiring attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information; and storing the initial encrypted file into a user-defined space in the container to generate a target encrypted file, wherein the target encrypted file is used for classifying the initial encrypted file. According to the scheme provided by the application, the files can be encrypted, so that the encrypted files can be classified.

Description

File encryption processing method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a file encryption processing method and apparatus, a computer-readable storage medium, and a computer device.
Background
With the development of internet technology, online storage technology has emerged. The user can access and manage the network hard disk by registering the user account. For example, a user may backup a file to a network hard disk. If the user account is stolen, the file in the network hard disk can be stolen. Therefore, the files need to be encrypted and then backed up to the network hard disk.
In a conventional manner, after encrypting a file, the original file is encrypted into a binary file. However, binary files have no format, the file type cannot be identified in the backup process, and the network hard disk cannot classify the encrypted files. Therefore, how to encrypt the file so that the encrypted file can be classified becomes a technical problem to be solved at present.
Disclosure of Invention
Based on this, it is necessary to provide a file encryption processing method, an apparatus, a computer readable storage medium, and a computer device, which can classify an encrypted file according to a conventional encryption method, for solving the technical problem that the encrypted file cannot be classified.
A file encryption processing method comprises the following steps:
acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file;
acquiring attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information;
and storing the initial encrypted file into a user-defined space in the container to generate a target encrypted file, wherein the target encrypted file is used for classifying the initial encrypted file.
A file encryption processing apparatus, the apparatus comprising:
the initial encryption module is used for acquiring a file to be encrypted and encrypting the file to be encrypted to obtain an initial encrypted file;
the container generating module is used for acquiring the attribute information of the file to be encrypted and generating a container corresponding to the file to be encrypted by using the attribute information;
and the target encryption module is used for storing the initial encryption file into a user-defined space in the container to generate a target encryption file, and the target encryption file is used for classifying the initial encryption file.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file;
acquiring attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information;
and storing the initial encrypted file into a user-defined space in the container to generate a target encrypted file, wherein the target encrypted file is used for classifying the initial encrypted file.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file;
acquiring attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information;
and storing the initial encrypted file into a user-defined space in the container to generate a target encrypted file, wherein the target encrypted file is used for classifying the initial encrypted file.
According to the file encryption processing method, the file encryption processing device, the computer readable storage medium and the computer equipment, the initial encrypted file is obtained by encrypting the file to be encrypted, and the security of the file to be encrypted can be ensured. Generating a container corresponding to the file to be encrypted by utilizing the attribute information of the file to be encrypted, wherein the attribute information of the container corresponds to the attribute information of the file to be encrypted, storing the initial encrypted file into a custom space of the container, and after generating the target encrypted file, the attribute information of the target encrypted file corresponds to the attribute information of the file to be encrypted. Therefore, the target encrypted file can be classified according to the attribute information, so that the classification of the encrypted file, namely the initial encrypted file, is realized.
A file display method comprises the following steps:
acquiring a target encrypted file, and analyzing the target encrypted file to obtain a container;
extracting an initial encrypted file from the custom space of the container;
decrypting the initial encrypted file to obtain an original file;
and loading the original file, and displaying through the candidate display page.
A document presentation apparatus, the apparatus comprising:
the file analysis module is used for acquiring a target encrypted file and analyzing the target encrypted file to obtain a container;
the file extraction module is used for extracting an initial encrypted file from the custom space of the container;
the file decryption module is used for decrypting the initial encrypted file to obtain an original file;
and the file display module is used for loading the original file and displaying the original file through the candidate display page.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a target encrypted file, and analyzing the target encrypted file to obtain a container;
extracting an initial encrypted file from the custom space of the container;
decrypting the initial encrypted file to obtain an original file;
and loading the original file, and displaying through the candidate display page.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a target encrypted file, and analyzing the target encrypted file to obtain a container;
extracting an initial encrypted file from the custom space of the container;
decrypting the initial encrypted file to obtain an original file;
and loading the original file, and displaying through the candidate display page.
According to the file display method, the file display device, the computer readable storage medium and the computer equipment, the container is obtained by analyzing the obtained target encrypted file. An initial encrypted file is extracted from the custom space of the container. The original file can be obtained and displayed only by decrypting the initial encrypted file, so that the safety of the original file is ensured.
A method of file backup comprising:
acquiring a file to be backed up, and encrypting the file to be backed up according to the file encryption processing method in the embodiment to obtain a target encrypted file;
and uploading the target encrypted file through a queue to perform classified backup.
A file backup apparatus, the apparatus comprising:
the file encryption module is used for acquiring a file to be backed up, and encrypting the file to be backed up according to the file encryption processing method in the embodiment to obtain a target encrypted file;
and the file backup module is used for uploading the target encrypted file through a queue so as to perform classified backup.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a file to be backed up, and encrypting the file to be backed up according to the file encryption processing method in the embodiment to obtain a target encrypted file;
and uploading the target encrypted file through a queue to perform classified backup.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a file to be backed up, and encrypting the file to be backed up according to the file encryption processing method in the embodiment to obtain a target encrypted file;
and uploading the target encrypted file through a queue to perform classified backup.
In the file backup method, the file backup device, the computer-readable storage medium and the computer device, in the embodiment, the terminal encrypts the file to be backed up by using the file encryption processing method, the whole encryption process does not need the participation of a user, and the encryption of the file to be backed up can be completed under the condition that the user does not sense the file to be backed up. The method effectively ensures the safety of the file to be backed up, reduces user operation and makes the file backup process more convenient. The attribute information of the target encrypted file obtained by encrypting the file by adopting the file encryption processing method corresponds to the attribute information of the file to be backed up, the terminal uploads the target encrypted file to the server, and the server can read the file type and the file format which are the same as those of the file to be backed up, so that the server can classify the target encrypted file during backup.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a file encryption process;
FIG. 2 is a flowchart illustrating a file encryption processing method according to an embodiment;
FIG. 3 is an interface diagram of a settings page that triggers the cover controls in one embodiment;
FIG. 4 is a diagram illustrating a cover displaying manner in which an original drawing is shown as (a), a hidden drawing is shown as (b), and a cover displaying manner in which an original drawing is shown as (c) in a blurred manner in one embodiment;
FIG. 5 is a diagram of a hidden display with added identification in one embodiment;
FIG. 6 is a flowchart illustrating steps of encrypting a file to be encrypted according to an embodiment;
FIG. 7 is a diagram illustrating a structure of a video file according to an embodiment;
FIG. 8 is a flowchart illustrating a file presentation method according to an embodiment;
FIG. 9 is a flowchart illustrating the steps for decrypting an initial encrypted file in one embodiment;
FIG. 10 is a schematic diagram of an interface for a decryption page in one embodiment;
FIG. 11 is a flowchart illustrating a file backup method according to an embodiment;
FIG. 12 is a block diagram showing the construction of a file encryption processing apparatus according to an embodiment;
FIG. 13 is a block diagram of the structure of a file presentation device in one embodiment;
FIG. 14 is a block diagram showing the construction of a file backup apparatus according to an embodiment;
FIG. 15 is a block diagram showing a configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a diagram of an application environment of a file encryption processing method in one embodiment. Referring to fig. 1, the file encryption processing method is applied to a file encryption processing system. The file encryption processing system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
As shown in fig. 2, in one embodiment, a file encryption processing method is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 2, the file encryption processing method specifically includes the following steps:
s202, acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file.
The file to be encrypted may be one of a plurality of types of files. For example, files to be encrypted may include, but are not limited to, audio files, video files, document files, and image files. In this embodiment and the following embodiments, the plural means two or more.
The terminal can obtain the file encryption instruction and obtain the file to be encrypted according to the file encryption instruction. The file to be encrypted is stored in a local database of the terminal, and the terminal can acquire the file to be encrypted from the local database and encrypt the file to be encrypted. Specifically, the terminal may obtain the file encryption instruction when the encryption control in the display page is triggered. The file encryption command carries an identifier of a file to be encrypted, and the terminal acquires the file to be encrypted from the local database according to the identifier of the file to be encrypted. The encryption control can be an entity control or a virtual control. The entity control can be an entity button arranged on the terminal, the virtual control is a control generated through the terminal and displayed on the display page, and the virtual control can be displayed in any position of the display page in various forms. For example, the virtual control can be a planar graphic or a stereoscopic graphic. The virtual control may be at the top of the displayed page or at the bottom of the displayed page.
After the terminal acquires the file to be encrypted, the file to be encrypted is encrypted, and an initial encrypted file is obtained. Specifically, the terminal may encrypt the file to be encrypted in one of multiple encryption manners. For example, the terminal may perform asymmetric encryption on the file to be encrypted, or may perform symmetric encryption on the file to be encrypted. The asymmetric encryption is that a terminal generates a pair of keys, namely a public key and a private key, the public key is corresponding to and different from the private key, and when one key (for example, the public key) is used for encrypting a file, the corresponding other key (the private key corresponding to the public key) can only be used for decrypting the file. Symmetric encryption refers to a terminal generating a key that can encrypt and decrypt a file at the same time. The terminal can also encrypt the file by adopting at least one encryption algorithm in an encryption mode. For example, when the terminal symmetrically encrypts the file to be encrypted, the file may be symmetrically encrypted by using an AES (Advanced Encryption Standard) algorithm to obtain an initial encrypted file.
And S204, acquiring the attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information.
The terminal reads the attribute information of the file to be encrypted, and the terminal can generate a container corresponding to the file to be encrypted by using the attribute information of the file to be encrypted. The container is a file which corresponds to the attribute information of the file to be encrypted and comprises a custom space. The custom space in the container can be used for storing the initial encrypted file, so that the attribute information of the target encrypted file corresponds to the attribute information of the file to be encrypted, and the target encrypted file is convenient to classify. The resulting container complies with the ISO 14496 standard. The ISO 14496 standard corresponds to the MPEG-4 standard, and is a unified data format standard for multimedia. For example, the format of the container may be one of the formats of MP4, M4V, MOV or 3GP, etc., which comply with the MPEG-4 standard.
Specifically, different types of files to be encrypted have different attribute information. The file to be encrypted may be one of a plurality of types of files, and the plurality of types of files may include a video file, an audio file, an image file, and a document file. Correspondingly, when the file to be encrypted is a video file, the corresponding attribute information includes, but is not limited to, information such as a file title, a file format, a file flag, a video length, a frame width, a frame height, a frame rate, a data rate, an audio bit rate, and an audio channel. When the file to be encrypted is an audio file, the corresponding attribute information includes, but is not limited to, file title, file format, file tag, audio length, channel number, bit rate, baud rate, and other information. When the file to be encrypted is an image file, the corresponding attribute information includes, but is not limited to, file title, file format, file mark, pixel, resolution, bit depth, saturation, and the like. When the file to be encrypted is a document file, the corresponding attribute information includes, but is not limited to, information such as a file title, a file format, a file flag, a page number, a paragraph number, a character number, and a line number. For example, when the file to be encrypted is a video file, the terminal acquires the attribute information of the video file, and may generate a corresponding container according to the file format and the video length in the attribute information, where the file format and the video length of the container are the same as those of the file to be encrypted.
And S206, storing the initial encrypted file into the custom space in the container to generate a target encrypted file, wherein the target encrypted file is used for classifying the initial encrypted file.
And the terminal creates a corresponding container by using the attribute information, wherein the container comprises the custom space. And the terminal stores the encrypted initial encrypted file into a custom space of the container. And the container storing the initial encrypted file in the user-defined space is the target encrypted file. Since the attribute information includes the file format, the attribute information of the container corresponds to the attribute information of the file to be encrypted. Therefore, the file format of the container is the same as that of the file to be encrypted, and the generated target encrypted file format is also the same as that of the file to be encrypted. The file format and corresponding file type of the target encrypted file can be identified, which facilitates classification of the initial encrypted file.
In the embodiment, the initial encrypted file is obtained by encrypting the file to be encrypted, so that the security of the file to be encrypted can be ensured. Generating a container corresponding to the file to be encrypted by utilizing the attribute information of the file to be encrypted, wherein the attribute information of the container corresponds to the attribute information of the file to be encrypted, storing the initial encrypted file into a custom space of the container, and after generating the target encrypted file, the attribute information of the target encrypted file corresponds to the attribute information of the file to be encrypted. Therefore, the target encrypted file can be classified according to the attribute information, so that the classification of the encrypted file, namely the initial encrypted file, is realized.
In one embodiment, the terminal may also perform encryption processing on the file to be encrypted automatically. The terminal can search the file to be encrypted from the local database and encrypt the searched file to be encrypted. Specifically, the terminal can store the file in a preset folder according to the received user instruction. The preset folder may be used to store files to be encrypted. The terminal can search the unencrypted file from the preset folder, and encrypt the unencrypted file as the file to be encrypted.
The terminal can also mark the file with the identifier to be encrypted according to the received user instruction. And the terminal identifies the file corresponding to the identifier to be encrypted and encrypts the file corresponding to the identifier to be encrypted as the file to be encrypted.
In this embodiment, the terminal stores or marks the file to be encrypted according to the user instruction, the terminal can automatically encrypt the file to be encrypted, and the user does not need to trigger the operation of encrypting the file in the whole encryption process, so that the file encryption is more convenient and faster.
In one embodiment, the terminal encrypts the file to be encrypted, and after obtaining the initial encrypted file, the terminal may further compress the initial encrypted file to obtain a compressed file. The terminal may compress the initial encrypted file in one of a plurality of compression manners. Specifically, the terminal may perform compression processing on the initial encrypted file by using one of lossy compression and lossless compression to obtain a compressed file. The compression format of the compressed file may be one of a plurality of compression formats such as ". zip" or ". rar". The terminal can store the compressed file into the user-defined space in the container to generate the target encrypted file. The terminal compresses the initial encrypted file to obtain a compressed file, and stores the compressed file in the user-defined space of the container, so that the storage space corresponding to the initial encrypted file is reduced, and the storage resources are effectively saved.
In one embodiment, the file encryption processing method further includes: triggering a cover control through a set page to acquire a cover display mode corresponding to the container; acquiring a cover corresponding to a file to be encrypted; and displaying the cover through the candidate display pages according to a cover display mode.
As shown in fig. 3, the terminal may set a plurality of cover page display modes corresponding to the page display container, so that the user can select the cover page display modes according to the requirement. The cover display mode includes but is not limited to fuzzy display, original picture display and hidden display. And a cover control is arranged in a setting page of the terminal, and the terminal can acquire a cover display mode corresponding to the container through the cover control.
And the terminal acquires a cover corresponding to the file to be encrypted and takes the cover corresponding to the file to be encrypted as a cover of the container. In one embodiment, when the file to be encrypted is a video file, the terminal may further select a frame of the video content as a cover of the container. The terminal can display the corresponding cover through the candidate display page according to the cover display mode corresponding to the container. The candidate display page is a display page when the terminal displays the container or the target encrypted file, so that a user can browse the container or the target encrypted file. The candidate display page may be a display page corresponding to a terminal that performs encryption processing on the file to be encrypted, or may be a display page corresponding to a terminal that browses other containers or the target encrypted file.
The terminal can carry out corresponding preprocessing on the cover according to the cover display mode corresponding to the container. Specifically, as shown in fig. 4, the cover display manner may include original picture display, hidden display, and blurred display. When the cover display mode that the terminal obtained is the original picture display, the terminal can not carry out the preliminary treatment to the cover, is about to treat that the cover that the encryption file corresponds directly demonstrates through the candidate show page as the container cover. The cover displayed when the original picture is displayed is shown in fig. 4 (a). When the cover display mode acquired by the terminal is hidden display, the terminal hides the cover, namely, the blank cover is used as a container cover, and the blank cover is displayed through the candidate display page. The cover shown when hidden from display is shown in fig. 4 (b). And when the cover display mode acquired by the terminal is fuzzy display, the terminal performs fuzzy processing on the cover. Specifically, the terminal may perform the blurring processing on the cover by using one of a plurality of blurring processing manners. For example, the terminal may perform the blurring processing on the cover by using a gaussian filtering method, and may also perform the blurring processing on the cover by using a mean filtering method. And the terminal takes the cover subjected to the fuzzy processing as a container cover and displays the container cover through the candidate display page. The cover shown when shown obscured is shown in figure 4 (c).
In this embodiment, the terminal displays the cover corresponding to the file to be encrypted in the cover display mode on the candidate display page by acquiring the cover display mode corresponding to the container, so that the user can clearly and quickly identify the container or the target encrypted file corresponding to the encrypted file. The terminal can modify the file cover according to different degrees, and the file cover is kept secret, so that the safety of the target encrypted file is effectively improved.
In an embodiment, when the cover display mode acquired by the terminal is hidden display, the terminal can add a visual identifier to the blank cover after hiding the cover. The visible identifier may be a character identifier corresponding to attribute information such as a file format or a file type of the file to be encrypted. For example, as shown in fig. 5, when the file to be encrypted is a video file, a visual identifier corresponding to the video file, such as "encrypted video", may be added to the blank cover.
In this embodiment, when the cover display mode is the hidden display, the visible identifier corresponding to the file to be encrypted is added to the blank cover, so that the file type can be clearly and definitely displayed in the blank cover, and the file type corresponding to the file with the cover as the blank cover can be conveniently identified.
As shown in fig. 6, in one embodiment, the step of encrypting the file to be encrypted includes:
s602, acquiring a user identifier, and performing at least one first transformation operation on the user identifier to obtain a corresponding first value.
S604, at least one second transformation operation is carried out on the user identification to obtain a corresponding second value.
And S606, splicing the first value and the second value to obtain a secret key.
S608, encrypting the file to be encrypted by using the key.
The terminal can obtain the user identification corresponding to the user who encrypts the file. The user identifier may include a user ID (Identification, Identification number), such as a user account. The terminal encrypts the file to be encrypted by using the user identifier, so that the security of the target encrypted file is effectively improved.
And after the terminal acquires the user identifier, performing first transformation operation on the user identifier. The terminal may perform at least one first transformation operation on the user identifier to obtain a corresponding first value. The first transformation operation may employ a variety of encryption algorithms to encrypt the subscriber identity. For example, the terminal may encrypt the user identifier by using a hash Algorithm, and the terminal may transform the user identifier by using MD5(Message-Digest Algorithm) in the hash Algorithm to obtain a corresponding first value.
The terminal may also perform a second transformation operation on the user identity. The terminal may perform at least one second transformation operation on the user identifier to obtain a corresponding second value. The second transformation operation may also employ a plurality of encryption algorithms to encrypt the subscriber identity. For example, the terminal may encrypt the user identifier by using a hash function to obtain a corresponding hash value as the second value. The first transformation operation and the second transformation operation are two different transformation operations of encryption processing.
And the terminal splices the first value and the second value obtained by the transformation operation, and the spliced value is used as a secret key. The terminal can encrypt the file to be encrypted by using the key. The terminal can splice the first value and the second value by adopting a plurality of splicing modes. For example, the terminal may concatenate the first value before and the second value after the first value is obtained as the key. The terminal can also splice the second value before and the first value after to obtain the key. The terminal can also mix and splice the first value and the second value to obtain the key.
The terminal may encrypt the file to be encrypted by using the key, for example, the terminal may symmetrically encrypt the file to be encrypted by using AES (Advanced Encryption Standard).
In this embodiment, after the terminal acquires the user identifier, at least one first transformation operation and at least one second transformation operation are performed on the user identifier to obtain a first value and a second value respectively, and a splicing result of the first value and the second value is used as a secret key, so that the complexity of the secret key is greatly improved, and the secret key is not easy to crack. The key is used for encrypting the file to be encrypted, so that the security of file encryption is effectively improved.
In one embodiment, the terminal may further receive a custom key through the setup page, and encrypt the file to be encrypted using the custom key. Specifically, the terminal may display a custom key receiving entry through a setting page. The custom key receiving entry may be a floating page for receiving the custom key input by the user through the input device. The custom key receiving entry can be an independent page in the setting page or a sub-page in the setting page. The user may enter the custom key through various forms of input devices. The input device may be a physical input device, such as a physical keyboard. It may also be a virtual input device, such as a virtual keyboard. The terminal can obtain a user-defined key input by a user through input equipment by setting an input control of a page, wherein the user-defined key can be a character string consisting of at least one of the groups of numbers, letters, symbols and the like. The terminal can encrypt the file to be encrypted by using the user-defined key.
In this embodiment, the terminal obtains the user-defined key through the setting page, the user-defined key has privacy, and the file to be encrypted is encrypted by using the user-defined key, so that the security of file encryption can be effectively improved.
In one embodiment, the terminal may generate the key using one or more values. For example, the terminal may use the customized key alone as the key, use the first value alone as the key, use the second value alone as the key, splice the first value and the second value together as the key, splice the first value and the customized key together as the key, splice the second value and the customized key together as the key, and splice the first value, the second value and the customized key together as the key. The user-defined key, the first value, the second value, and the splicing manner may refer to the description in the above embodiment of the file encryption processing method, and therefore, the description thereof is omitted here.
In this embodiment, the key may be composed of different values in a splicing manner, so that the complexity of the key composition is improved, and the security of file encryption is effectively improved by encrypting the file to be encrypted through the complex key.
In one embodiment, the step of storing the initial encrypted file into the custom space in the container and generating the target encrypted file comprises: acquiring a storage position of a custom space in a container; and storing the initial encrypted file into the user-defined space according to the storage position to generate a target encrypted file.
The container generated by the terminal comprises a custom space which can be used for freely storing files. The terminal can obtain the storage position of the custom space in the container. And the terminal stores the initial encrypted file obtained by encryption into a user-defined space according to the storage position to generate a target encrypted file. For example, when the file to be encrypted is a video file, the terminal may generate a container corresponding to the video file. The format of the container may be one of a plurality of video formats. The container includes a plurality of spaces (boxes) that can be used to store information of files. Each space stores information including Header information (Header) and data (Date), and the data includes a plurality of fields. The data may be pure data or may be composed of at least one subspace. The terminal can store the initial encrypted file in the user-defined space, and can also select a field in the space, and mark the field as an identifier for identifying the target encrypted file. For example, the terminal may mark the wyfs field as an identifier. As shown in fig. 7, a file in the ". MOV" format is taken as an example here. The udta subspace in the Moov space is the user-defined space of the container, the terminal can obtain the storage position of the udta subspace, and the initial encryption file obtained after encryption is stored into the udta subspace.
In this embodiment, the terminal acquires a storage location of a custom space, stores an initial encrypted file into the custom space according to the storage location, and generates a target encrypted file, where attribute information of the initial encrypted file obtained through encryption may not correspond to attribute information of a file to be encrypted, and stores the initial encrypted file into the custom space of the container, so that the generated target encrypted file includes data content of the initial encrypted file, and the attribute information corresponds to the file to be encrypted, so as to classify the target encrypted file.
Meanwhile, the identifier is added in the target encrypted file, so that the terminal can determine whether the file is the target encrypted file through the identifier, and can judge whether the file is the target encrypted file without downloading and analyzing the file, thereby effectively saving resources.
As shown in FIG. 8, in one embodiment, a file presentation method is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 8, the file display method specifically includes the following steps:
s802, acquiring a target encrypted file, and analyzing the target encrypted file to obtain a container.
S804, extracting the initial encrypted file from the custom space of the container.
And S806, decrypting the initial encrypted file to obtain an original file.
And S808, loading the original file, and displaying through the candidate display page.
The terminal may obtain the target encrypted file in various ways, for example, the target encrypted file may be stored locally in the terminal, and the terminal obtains the target encrypted file from a local database. The target encrypted file may also be stored in a database of a server from which the terminal obtains the target encrypted file. Specifically, the terminal may download the target encrypted file from the database of the server, and the terminal may further receive the target encrypted file delivered by the server.
The target encrypted file is a file obtained by encrypting an original file through a file encryption processing method, and the original file corresponds to a file to be encrypted in the file encryption processing method. The terminal can analyze the target encrypted file to obtain the container. The container comprises a custom space, and the attribute information of the container corresponds to the attribute information of the original file. The container complies with the ISO 14496 standard. The ISO 14496 standard corresponds to the MPEG-4 standard, and is a unified data format standard for multimedia. For example, the format of the container may be one of the formats of MP4, M4V, MOV or 3GP, etc., which comply with the MPEG-4 standard. And the terminal extracts an initial encrypted file from the custom space of the container, wherein the initial encrypted file is obtained by encrypting the original file. The file encryption processing method may refer to the description in the embodiment corresponding to the file encryption processing method.
The terminal decrypts the initial encrypted file, specifically, the terminal obtains a key corresponding to the initial encrypted file, and decrypts the initial encrypted file by using the key to obtain the original file. The original file may be one of a variety of types of files, for example, the original file may include, but is not limited to, an audio file, a video file, a document file, and an image file.
And loading the original file by the terminal, and displaying the original file through the candidate display page. The candidate display page is a display page when the terminal displays the original document, so that a user can browse the original document. The candidate display page can be a display page corresponding to the terminal which performs the encryption processing on the original document, and can also be a display page corresponding to other terminals which browse the original document.
In this embodiment, a container is obtained by analyzing the acquired target encrypted file. An initial encrypted file is extracted from the custom space of the container. The original file can be obtained and displayed only by decrypting the initial encrypted file, so that the safety of the original file is ensured.
In the display process of the original file, the terminal can find the initial encrypted file from the user-defined space of the container and directly decrypt the initial encrypted file by using the corresponding secret key, the whole file display process does not need participation of a user, the decrypted original file can be displayed under the condition that the user does not sense, user operation is reduced, and the file display process is more convenient and faster.
In one embodiment, the file display method further includes: acquiring operation acting on the candidate display page, and selecting a target display object according to the operation; pulling backup information corresponding to the target display object, wherein the score information comprises a backup address; identifying whether the file corresponding to the target display object is an encrypted file or not by using the backup information; and when the file corresponding to the target display object is the encrypted file, downloading the target encrypted file corresponding to the target display object according to the backup address.
The terminal can display the display object on the candidate display page. The terminal can display the display object in various forms. For example, the terminal may display the display object by using the character identifier corresponding to the display object, the terminal may also display the display object by using the image identifier corresponding to the display object, and the terminal may also display the display object by using a combination of the character identifier and the image identifier. The terminal obtains an operation acted on the candidate display page by a user, the operation is used for indicating the terminal to select a display object, and the selected display object is used as a target display object, namely the target display object is at least one of the display objects displayed by the candidate display page.
The terminal pulls backup information corresponding to the target display object from the server, the backup information is generated and stored in the server when the terminal uploads the target display object to the server for backup, and the backup information comprises a backup address corresponding to the target display object.
And the terminal identifies whether the file corresponding to the target display object is an encrypted file or not by using the backup information. Specifically, the file is provided with an identifier after encryption, and the identifier is used for identifying the file as an encrypted file. The terminal can identify whether the backup information corresponding to the target display object has the identifier, and when the backup information corresponding to the target display object has the identifier, the file corresponding to the target display object is the target encrypted file. And when the identifier does not exist in the backup information corresponding to the target display object, the file corresponding to the target display object is not the target encrypted file.
When the file corresponding to the target display object is the target encrypted file, the terminal may download the target encrypted file corresponding to the target display object from the database of the server according to the backup address, that is, the storage address corresponding to the file backup. The terminal may decrypt and display the target encrypted file by using the file display method described in the above embodiment.
In this embodiment, the terminal selects the target display object through an operation performed by the user on the candidate display page, and may determine whether the file corresponding to the target display object is the target encrypted file by using the backup information corresponding to the target display object, and if the file is the target encrypted file, download the target encrypted file corresponding to the target display object according to the backup address in the backup information. And when the target display object is not the target encrypted file, the file corresponding to the target display object does not need to be downloaded. The terminal can directly judge whether the file corresponding to the target display object is the target encryption file or not through the backup information, and whether the file corresponding to the target display object is the target encryption file or not is judged without downloading the data corresponding to the target display object, so that the data transmission resources of the terminal are effectively saved, and the cost is reduced.
As shown in fig. 9, in one embodiment, the step of decrypting the initial encrypted file comprises:
s902, obtaining the user identifier, and performing at least one first transformation operation on the user identifier to obtain a corresponding first value.
And S904, performing at least one second transformation operation on the user identifier to obtain a corresponding second value.
And S906, splicing the first value and the second value to obtain a secret key.
S908, the initial encrypted file is decrypted using the key.
The terminal can obtain the user identification corresponding to the user who performs the file display. The user identifier may include a user ID (Identification, Identification number), such as a user account. The terminal decrypts the file to be encrypted by using the user identifier, so that the security of the target encrypted file is effectively improved.
And after the terminal acquires the user identifier, performing first transformation operation on the user identifier. The terminal may perform at least one first transformation operation on the user identifier to obtain a corresponding first value. The first transformation operation may employ a variety of encryption algorithms to encrypt the subscriber identity. For example, the terminal may encrypt the user identifier by using a hash Algorithm, and the terminal may transform the user identifier by using MD5(Message-Digest Algorithm) in the hash Algorithm to obtain a corresponding first value.
The terminal may also perform a second transformation operation on the user identity. The terminal may perform at least one second transformation operation on the user identifier to obtain a corresponding second value. The second transformation operation may also employ a plurality of encryption algorithms to encrypt the subscriber identity. For example, the terminal may encrypt the user identifier by using a hash function to obtain a corresponding hash value as the second value. The first transformation operation and the second transformation operation are two different transformation operations of encryption processing.
And the terminal splices the first value and the second value obtained by the transformation operation, and the spliced value is used as a secret key. The terminal decrypts the initial encrypted file using the key. The terminal can splice the first value and the second value by adopting a plurality of splicing modes. For example, the terminal may concatenate the first value before and the second value after the first value is obtained as the key. The terminal can also splice the second value before and the first value after to obtain the key. The terminal can also mix and splice the first value and the second value to obtain the key.
In this embodiment, after the terminal obtains the user identifier, at least one first transformation operation and at least one second transformation operation are performed on the user identifier to obtain a first value and a second value, respectively, and the first value and the second value are spliced to obtain the key, so that the complexity of the key is greatly improved, and the security of the target encrypted file is effectively improved by decrypting the initial encrypted file with the key. Meanwhile, the key is converted from the user identifier, and the terminal can obtain the key through conversion operation. The whole decryption process does not need user participation, the decryption of the initial encrypted file can be realized as long as the user identification corresponds to the target encrypted file, the decrypted original file can be displayed under the condition that the user does not sense, the user operation is reduced, and therefore the user experience is effectively improved.
In one embodiment, the terminal may further encrypt the original file by using the custom key in the encryption process, and correspondingly, the terminal may receive the custom key input by the user through the decryption page and decrypt the original file by using the custom key. Specifically, as shown in fig. 10, the terminal may display the custom key receiving entry through the decryption page. The custom key receiving entry may be a floating page for receiving the custom key input by the user through the input device. The custom key receiving entry can be an independent page in the decrypted page or a sub-page in the decrypted page. The terminal can obtain a user-defined key input by the user through the input equipment through the input control of the decryption page, wherein the user-defined key can be a character string consisting of at least one of the groups of numbers, letters, symbols and the like. The terminal may decrypt the initial encrypted file using the custom key.
In this embodiment, the terminal obtains the user-defined key input by the user through the decryption page, the user-defined key has privacy, and the initial encrypted file can be decrypted by using the user-defined key, so that the security of the target encrypted file can be effectively improved.
In one embodiment, the terminal may obtain a key generation manner corresponding to the target encrypted file, and generate a key according to the key generation manner. And the terminal generates a key according to the key generation mode and decrypts the initial encrypted file by using the key. Specifically, the terminal may obtain a key generation manner corresponding to the target encrypted file, where the key generation manner is a generation manner in which the terminal generates a key when encrypting the original file. For example, the terminal may use the customized key alone as the key, use the first value alone as the key, use the second value alone as the key, splice the first value and the second value together as the key, splice the first value and the customized key together as the key, splice the second value and the customized key together as the key, and splice the first value, the second value and the customized key together as the key. The user-defined key, the first value, the second value, and the splicing manner may refer to the description in the above embodiment of the file encryption processing method, and therefore, the description thereof is omitted here.
In this embodiment, the terminal may generate the key according to a key generation manner, and the key may be composed of one or more values, so that the complexity of the key is improved, and the security of the target encrypted file is effectively improved.
In one embodiment, the step of extracting the initial encrypted file in the custom space of the container comprises: acquiring a storage position of a custom space in a container; and extracting the initial encrypted file from the custom space of the container according to the storage position.
The container comprises a custom space which can be used for freely storing files. The terminal can obtain the storage position of the custom space in the container. And finding the initial encrypted file in the user-defined space according to the storage position, and extracting the initial encrypted file from the user-defined space.
In this embodiment, the storage location of the custom space in the container is obtained, and the initial encrypted file is extracted from the custom space of the container according to the storage location, so that the initial encrypted file is decrypted, and the obtained original file is displayed. The initial encrypted file is stored in the user-defined space, and the terminal can classify the initial encrypted file by using the target encrypted file, so that the classification of the initial encrypted file is realized.
As shown in FIG. 11, in one embodiment, a file backup method is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 11, the file backup method specifically includes the following steps:
s1102, acquiring the file to be backed up, and encrypting the file to be backed up according to the file encryption processing method to obtain the target encrypted file.
And S1104, uploading the target encrypted file through the queue for classified backup.
When receiving the file backup instruction, the terminal may perform encryption processing on the file to be backed up by referring to the file encryption processing method provided in the above embodiment, to obtain the target encrypted file. The terminal can generate a key by using the user identifier, and encrypt the file to be backed up by using the key, so as to obtain a target encrypted file, wherein the whole encryption process does not need user participation. And the terminal uploads the target encrypted file to the server through the queue so that the server performs classified backup on the target encrypted file.
In this embodiment, the terminal encrypts the file to be backed up by using a file encryption method, and the whole encryption process does not require the participation of a user, so that the encryption of the file to be backed up can be completed without the perception of the user. The method effectively ensures the safety of the file to be backed up, reduces user operation and makes the file backup process more convenient.
The attribute information of the target encrypted file obtained by encrypting the file by adopting the file encryption processing method corresponds to the attribute information of the file to be backed up, the terminal uploads the target encrypted file to the server, and the server can read the file type and the file format which are the same as those of the file to be backed up, so that the server can classify the target encrypted file during backup.
In one embodiment, the file backup method further includes: acquiring a cover corresponding to a file to be backed up; and triggering a cover control by setting a page, and acquiring a cover display mode corresponding to the container so as to back up the cover according to the cover display mode.
And the terminal acquires a cover corresponding to the file to be encrypted and takes the cover corresponding to the file to be encrypted as a cover of the container. In one embodiment, when the file to be encrypted is a video file, the terminal may further select a frame of the video content as a cover of the container.
The terminal can set various cover display modes corresponding to the page display container. The cover display mode includes but is not limited to fuzzy display, original picture display and hidden display. And a cover control is arranged in a setting page of the terminal and can be used for selecting a cover display mode corresponding to the container. The terminal can acquire the cover display mode corresponding to the container through the cover control triggered by the set page.
The terminal can carry out corresponding preprocessing on the cover according to the cover display mode corresponding to the container. Specifically, when the cover display mode that the terminal obtained is the original picture display, the terminal can not carry out the preliminary treatment to the cover, is about to treat that the cover that the encryption file corresponds directly regards as the container cover. When the cover display mode acquired by the terminal is hidden display, the terminal hides the cover, namely, the blank cover is used as a container cover. And when the cover display mode acquired by the terminal is fuzzy display, the terminal performs fuzzy processing on the cover. Specifically, the terminal may perform the blurring processing on the cover by using one of a plurality of blurring processing manners. For example, the terminal may perform the blurring processing on the cover by using a gaussian filtering method, and may also perform the blurring processing on the cover by using a mean filtering method. The terminal takes the cover after the fuzzy processing as a container cover.
The terminal preprocesses the cover to obtain a processed cover, uploads the processed cover and the target encrypted file to the server together, so that the server backups according to the processed cover, and displays the target encrypted file by the processed cover.
In this embodiment, the terminal preprocesses the cover according to the cover display mode by acquiring the cover display mode corresponding to the container. The server backups the target encrypted file together with the processed cover page when backups the target encrypted file, and displays the target encrypted file by the processed cover page so as to clearly and quickly identify the target encrypted file. The terminal can also modify the file cover according to different degrees, and the file cover is kept secret, so that the safety of the target encrypted file is effectively improved.
In an embodiment, when the cover display mode acquired by the terminal is hidden display, after the terminal hides the cover, a preset identifier may be added to the blank cover. The preset identifier may be a character identifier corresponding to attribute information such as a file format or a file type of the file to be encrypted. For example, as shown in fig. 5, when the file to be encrypted is a video file, a character identifier corresponding to the video file, such as "encrypted video", may be added to the blank cover.
In this embodiment, when the cover display mode is the hidden display, the preset identifier corresponding to the file to be encrypted is added to the blank cover, so that the file type can be clearly and definitely displayed in the blank cover, and the file type corresponding to the file with the cover as the blank cover can be conveniently identified.
Fig. 2, 6, 8, 9 and 11 are schematic flowcharts in the embodiment. It should be understood that, although the steps in the flowcharts of fig. 2, 6, 8, 9, 11 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 6, 8, 9, and 11 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be alternated or performed with other steps or at least some of the sub-steps or stages of other steps.
As shown in fig. 12, in one embodiment, there is provided a file encryption processing apparatus including an initial encryption module 1202, a container generation module 1204, and a target encryption module 1206, wherein:
the initial encryption module 1202 is configured to obtain a file to be encrypted, and encrypt the file to be encrypted to obtain an initial encrypted file.
The container generating module 1204 is configured to obtain attribute information of the file to be encrypted, and generate a container corresponding to the file to be encrypted by using the attribute information.
And the target encryption module 1206 is used for storing the initial encrypted file into the custom space in the container to generate a target encrypted file, and the target encrypted file is used for classifying the initial encrypted file.
According to the file encryption processing device, the initial encrypted file is obtained by encrypting the file to be encrypted, and the security of the file to be encrypted can be ensured. Generating a container corresponding to the file to be encrypted by utilizing the attribute information of the file to be encrypted, wherein the attribute information of the container corresponds to the attribute information of the file to be encrypted, storing the initial encrypted file into a custom space of the container, and after generating the target encrypted file, the attribute information of the target encrypted file corresponds to the attribute information of the file to be encrypted. Therefore, the target encrypted file can be classified according to the attribute information, and the effect of classifying the encrypted file is achieved.
In one embodiment, the file encryption processing apparatus further includes a cover display module, configured to trigger a cover control by setting a page, and obtain a cover display mode corresponding to the container; acquiring a cover corresponding to a file to be encrypted; and displaying the cover through the candidate display pages according to a cover display mode.
In one embodiment, the initial encryption module 1202 is further configured to obtain a user identifier, and perform at least one first transformation operation on the user identifier to obtain a corresponding first value; carrying out at least one second transformation operation on the user identification to obtain a corresponding second value; splicing the first value and the second value to obtain a secret key; and encrypting the file to be encrypted by using the key.
In one embodiment, the target encryption module 1206 is further configured to obtain a storage location of the custom space in the container; and storing the initial encrypted file into the user-defined space according to the storage position to generate a target encrypted file.
As shown in fig. 13, in one embodiment, a file presentation apparatus is provided, which includes a file parsing module 1302, a file extraction module 1304, a file decryption module 1306, and a file presentation module 1308, where:
the file parsing module 1302 is configured to obtain a target encrypted file, parse the target encrypted file, and obtain a container.
A file extraction module 1304 for extracting the initial encrypted file in the custom space of the container.
And the file decryption module 1306 is configured to decrypt the initial encrypted file to obtain an original file.
The file displaying module 1308 is configured to load an original file and display the original file through a candidate display page.
The file display device obtains the container by analyzing the obtained target encrypted file. An initial encrypted file is extracted from the custom space of the container. The original file can be obtained and displayed only by decrypting the initial encrypted file, so that the safety of the original file is ensured.
In the display process of the original file, the terminal can find the initial encrypted file from the user-defined space of the container and directly decrypt the initial encrypted file by using the corresponding secret key, the whole file display process does not need participation of a user, the decrypted original file can be displayed under the condition that the user does not sense, user operation is reduced, and the file display process is more convenient and faster.
In one embodiment, the file display apparatus further includes a file download module, configured to obtain an operation acting on the candidate display page, and select a target display object according to the operation; pulling backup information corresponding to the target display object, wherein the backup information comprises a backup address; identifying whether the file corresponding to the target display object is an encrypted file or not by using the backup information; and when the file corresponding to the target display object is the encrypted file, downloading the target encrypted file corresponding to the target display object according to the backup address.
In one embodiment, the file decryption module 1306 is further configured to obtain a user identifier, and perform at least one first transformation operation on the user identifier to obtain a corresponding first value; carrying out at least one second transformation operation on the user identification to obtain a corresponding second value; splicing the first value and the second value to obtain a secret key; the initial encrypted file is decrypted using the key.
In one embodiment, the file extraction module 1304 is further configured to obtain a storage location of the custom space in the container; and extracting the initial encrypted file from the custom space of the container according to the storage position.
As shown in fig. 14, in one embodiment, there is provided a file backup apparatus comprising a file encryption module 1402 and a file backup module 1404, wherein:
the file encryption module 1402 is configured to obtain a file to be backed up, and encrypt the file to be backed up according to the file encryption processing method described in the foregoing embodiment to obtain a target encrypted file.
And a file backup module 1404, configured to upload the target encrypted file through the queue for classified backup.
In the file backup device, in this embodiment, the terminal encrypts the file to be backed up by using the file encryption method, and the whole encryption process does not need the participation of a user, so that the encryption of the file to be backed up can be completed without the perception of the user. The method and the device effectively ensure the safety of the file to be backed up, reduce user operation and enable the file to be backed up more conveniently. The attribute information of the target encrypted file obtained by encrypting the file by adopting the file encryption processing method corresponds to the attribute information of the file to be backed up, the terminal uploads the target encrypted file to the server, and the server can read the file type and the file format which are the same as those of the file to be backed up, so that the server can classify the target encrypted file during backup.
In one embodiment, the file backup apparatus further includes a cover backup module, configured to obtain a cover corresponding to a file to be backed up; and triggering a cover control by setting a page, and acquiring a cover display mode corresponding to the container so as to back up the cover according to the cover display mode.
FIG. 15 is a diagram showing an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 in fig. 1. As shown in fig. 15, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a file encryption processing method, a file presentation method, or a file backup method. The internal memory may also store a computer program, and when the computer program is executed by the processor, the computer program may cause the processor to execute a file encryption processing method, a file display method, or a file backup method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 15 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the file encryption processing apparatus, the file presentation apparatus, or the file backup apparatus provided in the present application may be implemented in the form of a computer program, and the computer program may be executed on a computer device as shown in fig. 15. The memory of the computer device may store various program modules constituting the file encryption processing apparatus, the file presentation apparatus, or the file backup apparatus, such as an initial encryption module 1202, a container generation module 1204, and a target encryption module 1206 shown in fig. 12, a file parsing module 1302, a file extraction module 1304, a file decryption module 1306, and a file presentation module 1308 shown in fig. 13, and a file encryption module 1402 and a file backup module 1404 shown in fig. 14. The computer program constituted by the respective program modules causes the processor to execute the steps in the file encryption processing method, the file presentation method, or the file backup method of the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 15 may perform, by using the initial encryption module 1202 in the file encryption processing apparatus shown in fig. 12, obtaining a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file. The computer device may perform the steps of obtaining attribute information of a file to be encrypted through the container generating module 1204, and generating a container corresponding to the file to be encrypted by using the attribute information. The computer device may perform storing the initial encrypted file into the custom space in the container via the target encryption module 1206 to generate a target encrypted file, the target encrypted file being used to classify the initial encrypted file.
For example, the computer device shown in fig. 15 may execute, by the file parsing module 1302 in the file presentation apparatus shown in fig. 13, obtaining the target encrypted file, and parse the target encrypted file to obtain the container. The computer device may perform the extraction of the initial encrypted file in the custom space of the container via file extraction module 1304. The computer device may perform decryption on the initial encrypted file through the file decryption module 1306 to obtain the original file. The computer device may load the original file through the file presentation module 1308 and present the file through the candidate presentation pages.
For example, the computer device shown in fig. 15 may perform, by using the file encryption module 1402 in the file backup apparatus shown in fig. 14, acquiring a file to be backed up, and performing encryption processing on the file to be backed up according to a file encryption processing method to obtain a target encrypted file. Uploading of the target encrypted file through the queue may be performed by the computer device via the file backup module 1404 for categorized backup.
In one embodiment, a computer device is provided, which includes a memory and a processor, the memory storing a computer program, the computer program, when executed by the processor, causing the processor to perform the steps of the file encryption processing method, the file presentation method, or the file backup method described above. Here, the steps of the file encryption processing method, the file presentation method, or the file backup method may be steps in the file encryption processing method, the file presentation method, or the file backup method of each of the above embodiments.
In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the file encryption processing method, the file presentation method, or the file backup method. Here, the steps of the file encryption processing method, the file presentation method, or the file backup method may be steps in the file encryption processing method, the file presentation method, or the file backup method of each of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (22)

1. A file encryption processing method comprises the following steps:
acquiring a file to be encrypted, and encrypting the file to be encrypted to obtain an initial encrypted file;
acquiring attribute information of the file to be encrypted, and generating a container corresponding to the file to be encrypted by using the attribute information, wherein the container is a file comprising a user-defined space, and the attribute information of the container corresponds to the attribute information of the file to be encrypted;
and storing the initial encrypted file into the custom space in the container to generate a target encrypted file, so that the attribute information of the target encrypted file corresponds to the attribute information of the file to be encrypted, and the target encrypted file is used for classifying the initial encrypted file according to the attribute information of the target encrypted file.
2. The method of claim 1, further comprising:
triggering a cover control through a set page to acquire a cover display mode corresponding to the container;
acquiring a cover corresponding to the file to be encrypted;
and displaying the cover through the candidate display pages according to the cover display mode.
3. The method according to claim 1, wherein the encrypting the file to be encrypted comprises:
acquiring a user identifier, and performing at least one first transformation operation on the user identifier to obtain a corresponding first value;
performing at least one second transformation operation on the user identifier to obtain a corresponding second value;
splicing the first value and the second value to obtain a secret key;
and encrypting the file to be encrypted by utilizing the key.
4. The method of any of claims 1 to 3, wherein storing the initial encrypted file into the custom space in the container, and generating a target encrypted file comprises:
acquiring a storage position of the custom space in the container;
and storing the initial encrypted file into the user-defined space according to the storage position to generate a target encrypted file.
5. A file display method comprises the following steps:
acquiring a target encrypted file, and analyzing the target encrypted file to obtain a container, wherein the container is a file comprising a user-defined space;
extracting an initial encrypted file in the custom space of the container;
decrypting the initial encrypted file to obtain an original file, wherein the attribute information of the target encrypted file corresponds to the attribute information of the original file;
and loading the original file, and displaying through the candidate display page.
6. The method of claim 5, further comprising:
obtaining an operation acting on the candidate display page, and selecting a target display object according to the operation;
pulling backup information corresponding to the target display object, wherein the backup information comprises a backup address;
identifying whether the file corresponding to the target display object is an encrypted file or not by using the backup information;
and when the file corresponding to the target display object is an encrypted file, downloading the target encrypted file corresponding to the target display object according to the backup address.
7. The method of claim 5, wherein decrypting the initial encrypted file comprises:
acquiring a user identifier, and performing at least one first transformation operation on the user identifier to obtain a corresponding first value;
performing at least one second transformation operation on the user identifier to obtain a corresponding second value;
splicing the first value and the second value to obtain a secret key;
and decrypting the initial encrypted file by using the key.
8. The method of any of claims 5 to 7, wherein said extracting an initial encrypted file in the custom space of the container comprises:
acquiring a storage position of the custom space in the container;
and extracting the initial encrypted file from the custom space of the container according to the storage position.
9. A method of file backup comprising:
acquiring a file to be backed up, and encrypting the file to be backed up according to the file encryption processing method of any one of claims 1 to 4 to obtain a target encrypted file, so that the attribute information of the target encrypted file corresponds to the attribute information of the file to be backed up;
and uploading the target encrypted file through a queue, and performing classified backup according to the attribute information of the target encrypted file.
10. The method of claim 9, further comprising:
acquiring a cover corresponding to the file to be backed up;
and triggering a cover control through a set page to acquire a cover display mode corresponding to the container, so that the cover is backed up according to the cover display mode.
11. A file encryption processing apparatus, characterized in that the apparatus comprises:
the initial encryption module is used for acquiring a file to be encrypted and encrypting the file to be encrypted to obtain an initial encrypted file;
the container generation module is used for acquiring the attribute information of the file to be encrypted and generating a container corresponding to the file to be encrypted by using the attribute information, wherein the container is a file comprising a user-defined space, and the attribute information of the container corresponds to the attribute information of the file to be encrypted;
and the target encryption module is used for storing the initial encryption file into the custom space in the container to generate a target encryption file, so that the attribute information of the target encryption file corresponds to the attribute information of the file to be encrypted, and the target encryption file is used for classifying the initial encryption file according to the attribute information of the target encryption file.
12. The device of claim 11, further comprising a cover display module, configured to trigger a cover control through a setting page, and obtain a cover display mode corresponding to the container; acquiring a cover corresponding to the file to be encrypted; and displaying the cover through the candidate display pages according to the cover display mode.
13. The apparatus according to claim 11, wherein the initial encryption module is further configured to obtain a user identifier, and perform at least one first transformation operation on the user identifier to obtain a corresponding first value; performing at least one second transformation operation on the user identifier to obtain a corresponding second value; splicing the first value and the second value to obtain a secret key; and encrypting the file to be encrypted by utilizing the key.
14. The apparatus according to any one of claims 11 to 13, wherein the target encryption module is further configured to obtain a storage location of the custom space in the container; and storing the initial encrypted file into the user-defined space according to the storage position to generate a target encrypted file.
15. A document presentation device, the device comprising:
the file analysis module is used for acquiring a target encrypted file and analyzing the target encrypted file to obtain a container, wherein the container is a file comprising a user-defined space;
the file extraction module is used for extracting an initial encrypted file from the custom space of the container;
the file decryption module is used for decrypting the initial encrypted file to obtain an original file, and the attribute information of the target encrypted file corresponds to the attribute information of the original file;
and the file display module is used for loading the original file and displaying the original file through the candidate display page.
16. The apparatus according to claim 15, further comprising a file download module, configured to obtain an operation applied to the candidate display page, and select a target display object according to the operation; pulling backup information corresponding to the target display object, wherein the backup information comprises a backup address; identifying whether the file corresponding to the target display object is an encrypted file or not by using the backup information; and when the file corresponding to the target display object is an encrypted file, downloading the target encrypted file corresponding to the target display object according to the backup address.
17. The apparatus according to claim 15, wherein the file decryption module is further configured to obtain a user identifier, and perform at least one first transformation operation on the user identifier to obtain a corresponding first value; performing at least one second transformation operation on the user identifier to obtain a corresponding second value; splicing the first value and the second value to obtain a secret key; and decrypting the initial encrypted file by using the key.
18. The apparatus according to any one of claims 15 to 17, wherein the file extraction module is further configured to obtain a storage location of the custom space in the container; and extracting the initial encrypted file from the custom space of the container according to the storage position.
19. A file backup apparatus, characterized in that the apparatus comprises:
the file encryption module is used for acquiring a file to be backed up, encrypting the file to be backed up according to the file encryption processing method of any one of claims 1 to 4 to obtain a target encrypted file, and enabling attribute information of the target encrypted file to correspond to attribute information of the file to be backed up;
and the file backup module is used for uploading the target encrypted file through a queue and carrying out classified backup according to the attribute information of the target encrypted file.
20. The apparatus according to claim 19, further comprising a cover backup module for obtaining a cover corresponding to the file to be backed up; and triggering a cover control through a set page to acquire a cover display mode corresponding to the container, so that the cover is backed up according to the cover display mode.
21. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 10 when executing the computer program.
22. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 10.
CN201910218307.1A 2019-03-21 2019-03-21 File encryption processing method and device Active CN109886047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910218307.1A CN109886047B (en) 2019-03-21 2019-03-21 File encryption processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910218307.1A CN109886047B (en) 2019-03-21 2019-03-21 File encryption processing method and device

Publications (2)

Publication Number Publication Date
CN109886047A CN109886047A (en) 2019-06-14
CN109886047B true CN109886047B (en) 2021-01-15

Family

ID=66933535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910218307.1A Active CN109886047B (en) 2019-03-21 2019-03-21 File encryption processing method and device

Country Status (1)

Country Link
CN (1) CN109886047B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641497A (en) * 2020-06-17 2020-09-08 深圳市钱海网络技术有限公司 Method and device for automatically decrypting sensitive parameters
CN112948843B (en) * 2021-01-27 2022-07-15 维沃移动通信有限公司 Encryption method, encryption device, electronic equipment and medium
CN113268761B (en) * 2021-07-20 2021-09-24 北京国电通网络技术有限公司 Information encryption method and device, electronic equipment and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132272A (en) * 2006-08-23 2008-02-27 中国科学院计算技术研究所 System supporting downloading and using of distributed encrypted document
CN105872745A (en) * 2015-12-21 2016-08-17 乐视致新电子科技(天津)有限公司 Extension method and device of input data sources
CN108806773A (en) * 2018-05-21 2018-11-13 上海熙业信息科技有限公司 Medical image cloud storage platform designing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015608A1 (en) * 2003-07-16 2005-01-20 Pkware, Inc. Method for strongly encrypting .ZIP files
SE0302778D0 (en) * 2003-10-17 2003-10-17 Ericsson Telefon Ab L M Container format for multimedia presentations
US8769306B1 (en) * 2012-09-05 2014-07-01 Amazon Technologies, Inc. Protecting content with initialization vector manipulation
US9342699B2 (en) * 2013-11-06 2016-05-17 Blackberry Limited Method and apparatus for controlling access to encrypted data
CN103825953B (en) * 2014-03-04 2017-01-04 武汉理工大学 A kind of user model encrypted file system
CN107122449A (en) * 2017-04-25 2017-09-01 安徽大学 File classifying method and system based on public key encryption under a kind of multi-user environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132272A (en) * 2006-08-23 2008-02-27 中国科学院计算技术研究所 System supporting downloading and using of distributed encrypted document
CN105872745A (en) * 2015-12-21 2016-08-17 乐视致新电子科技(天津)有限公司 Extension method and device of input data sources
CN108806773A (en) * 2018-05-21 2018-11-13 上海熙业信息科技有限公司 Medical image cloud storage platform designing method

Also Published As

Publication number Publication date
CN109886047A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
US10713391B2 (en) Tamper protection and video source identification for video processing pipeline
Umar et al. Mobile forensic tools evaluation for digital crime investigation
CN109886047B (en) File encryption processing method and device
US10467427B2 (en) Method and apparatus for providing secure image encryption and decryption
US20160117518A1 (en) File Encryption/Decryption Device And File Encryption/Decryption Method
CN104680077B (en) Method for encrypting picture, method for viewing picture, system and terminal
CN105577684A (en) Anti-crawling methods, server, client and system
CN113806806B (en) Desensitization and restoration method and system for webpage screenshot
US8738928B2 (en) Apparatus and method for processing extension information in image files
CN112949545B (en) Method, apparatus, computing device and medium for recognizing face image
CN105809042A (en) Information protection method and device, information display method and device, and terminal
US20130262864A1 (en) Method and system for supporting secure documents
EP3537319A1 (en) Tamper protection and video source identification for video processing pipeline
CN116662941B (en) Information encryption method, device, computer equipment and storage medium
CN110647641A (en) Identity authentication method, identity authentication device, computer equipment and storage medium
CN113656713B (en) Network resource processing method, device and system
US11276138B2 (en) Image data encryption and rendering system
CN107729345B (en) Website data processing method and device, website data processing platform and storage medium
CN114398647A (en) Data encryption storage method, encryption terminal and decryption terminal
CN115688059A (en) Image data processing method and device, electronic equipment and storage medium
CN113434827A (en) Information tracing method, device and system, electronic equipment and storage medium
WO2015154398A1 (en) Data processing method and device
CN113794738B (en) Data processing method and device, electronic equipment and storage medium
CN114546959A (en) File processing method and device
CN109614788B (en) Audit information processing method and audit system

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