CN110881033A - Data encryption method, device, equipment and readable storage medium - Google Patents

Data encryption method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110881033A
CN110881033A CN201911083010.5A CN201911083010A CN110881033A CN 110881033 A CN110881033 A CN 110881033A CN 201911083010 A CN201911083010 A CN 201911083010A CN 110881033 A CN110881033 A CN 110881033A
Authority
CN
China
Prior art keywords
content
encrypted
target area
multimedia data
original content
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.)
Granted
Application number
CN201911083010.5A
Other languages
Chinese (zh)
Other versions
CN110881033B (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 CN201911083010.5A priority Critical patent/CN110881033B/en
Publication of CN110881033A publication Critical patent/CN110881033A/en
Priority to PCT/CN2020/118800 priority patent/WO2021088571A1/en
Application granted granted Critical
Publication of CN110881033B publication Critical patent/CN110881033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Abstract

The application discloses a data encryption method, a device, equipment and a readable storage medium, belonging to the field of information security, and the method comprises the following steps: responding to the selection operation of a browsing interface aiming at the multimedia data, and selecting a target area in the browsing interface; acquiring original content in the target area, and acquiring content position information of the original content in the multimedia data; generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content. By the adoption of the method and the device, the encryption mode of the data can be enriched, and the data checking efficiency can be improved.

Description

Data encryption method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of information security, and in particular, to a data encryption method, apparatus, device, and readable storage medium.
Background
With the continuous progress of science and technology, the use of intelligent terminals and networks almost fills the aspects of people's life, and people's life is closely related to various terminals, for example, a user can record the point drops of life through a terminal connected with a network, use a terminal to store various files, and the like.
In the prior art, the file can be encrypted by setting the password, but the encryption mode also encrypts the public content in the file, and the encryption mode is single, so that the password needs to be input again when the public content in the encrypted file is checked each time, and the efficiency of checking the encrypted file by a user is not high.
Content of application
The embodiment of the application provides a data encryption method, a data encryption device, data encryption equipment and a readable storage medium, which can enrich the encryption mode of data and improve the data viewing efficiency.
An embodiment of the present application provides a data encryption method, including:
responding to the selection operation of a browsing interface aiming at the multimedia data, and selecting a target area in the browsing interface;
acquiring original content in the target area, and acquiring content position information of the original content in the multimedia data;
generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content.
Wherein the obtaining of the content location information of the original content in the multimedia data includes:
acquiring typesetting information corresponding to the multimedia data;
searching the initial position information and the end position information of the original content in the multimedia data in the typesetting information;
determining the start position information and the end position information as the content position information;
wherein the generating of the encrypted content associated with the content location information, the displaying of the encrypted content in the target area, comprises:
encrypting the original content based on a secret key, generating a ciphertext consistent with the data length of the original content, and determining the ciphertext as the encrypted content;
and replacing the original content with the encrypted content according to the content position information, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
Wherein the generating of the encrypted content associated with the content location information comprises:
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and determining the masking layer as the encrypted content;
and shielding and covering the original content based on the encrypted content, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
Wherein, still include:
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and covering the encrypted content in an occlusion mode based on the masking layer.
Wherein, still include:
determining the encrypted multimedia data as encrypted multimedia data;
and storing the position path information of the encrypted multimedia data and the content position information into a private storage space.
Wherein the storing the location path information of the encrypted multimedia data and the content location information to a private storage space comprises:
responding to the storage operation of the browsing interface aiming at the encrypted multimedia data, and acquiring the position path information of the encrypted multimedia data;
storing the location path information and the content location information of the encrypted multimedia data to the private storage space;
generating prompt information, and displaying the prompt information in the target area in the browsing interface; the prompt information is used for representing that the original content corresponding to the content position information is stored in the privacy storage space; and the display layer of the prompt message is positioned above the display layer of the encrypted content.
Wherein, still include:
displaying a privacy browsing interface corresponding to the privacy storage space;
responding to the browsing operation aiming at the encrypted multimedia data in the privacy browsing interface, acquiring the position path information and the content position information, and acquiring the encrypted multimedia data according to the position path information;
searching the encrypted content in the target area in the encrypted multimedia data according to the content position information;
and restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data.
Wherein, the encrypted content is a ciphertext corresponding to the original content;
the restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data includes:
decrypting the ciphertext based on a secret key to obtain the original content;
and replacing the ciphertext with the original content according to the content position information, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
Wherein the encrypted content is a cover layer for covering the original content;
the restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data includes:
deleting the cover layer in the target area in the privacy browsing interface, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
An embodiment of the present application provides an apparatus for encrypting data, including:
the selection module is used for responding to the selection operation of a browsing interface aiming at the multimedia data and selecting a target area in the browsing interface;
an obtaining module, configured to obtain an original content in the target area, and obtain content location information of the original content in the multimedia data;
a generation module: for generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content.
Wherein, the obtaining module includes:
the obtaining unit is used for obtaining the typesetting information corresponding to the multimedia data;
a searching unit, configured to search, in the composition information, starting position information and ending position information of the original content in the multimedia data;
a determining unit configured to determine the start position information and the end position information as the content position information;
wherein the generating module comprises:
an encryption unit, configured to encrypt the original content based on a key, generate a ciphertext consistent with a data length of the original content, and determine the ciphertext as the encrypted content;
a first replacing unit, configured to replace the original content with the encrypted content according to the content location information, refresh the browsing interface, and display the encrypted content in the target area in the refreshed browsing interface.
Wherein the generating module comprises:
a first generating unit configured to determine a size and a shape of the target area based on the content position information, generate a mask layer having the size and the shape, and determine the mask layer as the encrypted content;
and the first covering unit is used for shielding and covering the original content based on the encrypted content, refreshing the browsing interface and displaying the encrypted content in the target area in the refreshed browsing interface.
Wherein the generating module further comprises:
and the second generating unit is used for determining the size and the shape of the target area based on the content position information, generating a mask layer with the size and the shape, and covering the encrypted content in a shielding manner based on the mask layer.
Wherein, still include:
the determining module is used for determining the encrypted multimedia data as encrypted multimedia data;
and the storage module is used for storing the position path information of the encrypted multimedia data and the content position information into a private storage space.
Wherein the storage module comprises:
the response unit is used for responding to the storage operation of the browsing interface aiming at the encrypted multimedia data and acquiring the position path information of the encrypted multimedia data;
a storage unit, configured to store the location path information and the content location information of the encrypted multimedia data in the private storage space;
a third generating unit, configured to generate a prompt message, and display the prompt message in the target area in the browsing interface; the prompt information is used for representing that the original content corresponding to the content position information is stored in the privacy storage space; and the display layer of the prompt message is positioned above the display layer of the encrypted content.
Wherein, still include:
the display module is used for displaying a privacy browsing interface corresponding to the privacy storage space;
the response module is used for responding to the browsing operation aiming at the encrypted multimedia data in the privacy browsing interface, acquiring the position path information and the content position information, and acquiring the encrypted multimedia data according to the position path information;
the searching module is used for searching the encrypted content in the target area in the encrypted multimedia data according to the content position information;
and the restoring module is used for restoring the encrypted content to obtain the original content and displaying the original content in the target area in the encrypted multimedia data.
Wherein, the encrypted content is a ciphertext corresponding to the original content;
the reduction module comprises:
the decryption unit is used for decrypting the ciphertext based on a secret key to obtain the original content;
and the second replacing unit is used for replacing the ciphertext with the original content according to the content position information, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
Wherein the encrypted content is a cover layer for covering the original content;
the reduction module comprises:
and the deleting unit is used for deleting the masking layer in the target area in the privacy browsing interface, refreshing the privacy browsing interface and displaying the original content in the target area in the refreshed privacy browsing interface.
An aspect of an embodiment of the present application provides a computer device, including: a processor and a memory;
the memory stores a computer program which, when executed by the processor, causes the processor to perform a method as in the embodiments of the present application.
An aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, perform a method as in the embodiments of the present application.
According to the method and the device, the target area is selected by responding to the selection operation of the browsing interface aiming at the multimedia data, the target area can be the whole file or the local content in the file, the original content can be encrypted more conveniently and freely, and the data encryption mode is enriched; by acquiring the content position information of the original content in the multimedia data, encrypting the original content in the target area based on the content position information to generate encrypted content, and displaying the encrypted content in the target area without displaying the original content, when a user wants to view the encrypted file, the user can view the content which can be disclosed in the file (namely the content of the non-target area) by opening the file without inputting a password, thereby improving the viewing efficiency of the data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a diagram of a network architecture provided by an embodiment of the present application;
FIG. 2 is a schematic view of a scenario provided by an embodiment of the present application;
fig. 3 is a schematic flowchart of a data encryption method according to an embodiment of the present application;
fig. 4a is a schematic diagram of content location information of original content provided in an embodiment of the present application;
fig. 4b is a schematic diagram of content location information of another original content provided in the embodiment of the present application;
FIG. 5 is a schematic diagram of another scenario provided by an embodiment of the present application;
FIG. 6 is a schematic flow chart of viewing original content according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another scenario provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data encryption apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a network architecture diagram provided in an embodiment of the present application. As shown in fig. 1, the network architecture may include a service server 2000 and a user terminal cluster, where the user terminal cluster may include a plurality of user terminals, as shown in fig. 1, and specifically may include a user terminal 100a, a user terminal 100b, user terminals 100c, …, and a user terminal 100 n.
As shown in fig. 1, the user terminal 100a, the user terminal 100b, the user terminals 100c, …, and the user terminal 100n may respectively have a network connection with the service server 2000, so that each user terminal may perform data interaction with the service server 2000 through the network connection.
As shown in fig. 1, each ue in the ue cluster may be integrally installed with a target application, and when the target application runs in each ue, the target application may perform data interaction with the service server 2000 shown in fig. 1. The target application may include an application having a function of displaying data information such as text, images, audio, and video.
In the embodiment of the present application, one user terminal may be selected from the multiple user terminals shown in fig. 1 as a target user terminal, where the target user terminal may include: and intelligent terminals with data information display and playing functions are carried by smart phones, tablet computers, desktop computers and the like. For example, in the embodiment of the present application, the user terminal 100a shown in fig. 1 may be used as the target user terminal, and the target application may be integrated in the target user terminal, and at this time, the target user terminal may implement data interaction with the service server 2000 through a service data platform corresponding to the target application.
Please refer to fig. 2, which is a schematic view of a scene provided in the embodiment of the present application. After the target user accesses the target application, the target user may select any file in the browsing interface 5000 for viewing, for example, the target user selects the file abc.doc in the browsing interface 5000 for viewing, and the user terminal 100a may respond to the selection operation of the target user and display all contents of the file abc.doc in the browsing interface 1000, so that the target user may view the file abc.doc. The user terminal 100a may be displayed in the browsing interface 1000Data information such as text, pictures, etc., the target user can view the file abc.doc selected by the target user in the browsing interface 1000, for example, the content displayed by the browsing interface 1000 may be the content of a certain page in the file abc.doc selected by the target user. As shown in fig. 2, the target user is viewing the content of page 2 of multimedia data (which may be file abc. doc), which has a total of 22 pages of content. The browsing interface 1000 has an encryption button M, and after the target user clicks the encryption button M, the original content to be encrypted can be selected, as shown in fig. 2, { x }1,…,x4,a1,…,a4,b1,…,b4The original content selected by the user is defined as region P, and the original content is defined as region x1,…,x4,a1,…,a4,b1,…,b4The target area occupied by the original content { x }1,…,x4,a1,…,a4,b1,…,b4The user terminal 100a may obtain the original content { x }1,…,x4,a1,…,a4,b1,…,b4Content location information in the multimedia data, where the content location information may refer to location information of the original content in the multimedia data, e.g., a start location and an end location of the original content in the multimedia data; based on the content location information, the user terminal 100a may generate encrypted content associated with the content location information and display the encrypted content in the area P, and the area P may not display the original content { x }1,…,x4,a1,…,a4,b1,…,b4}。
The user terminal 100a may generate the encrypted content associated with the content location information by encrypting the original content to generate a ciphertext consistent with the data length of the original content, and then replace the original content with the ciphertext, as shown in fig. 2, the user terminal 100a may generate the original content by replacing the original content with { x } as shown in fig. 21,…,x4,a1,…,a4,b1,…,b4The encryption is carried out, and the encryption is carried out,ciphertext { u, …, u } having a length identical to that of the original content data is generated, and user terminal 100a may convert original content { x }1,…,x4,a1,…,a4,b1,…,b4Replaces it with the ciphertext { u, …, u }, and displays the ciphertext { u, …, u } in region P in browsing interface 1000.
The user terminal 100a may generate the encrypted content associated with the content location information by generating a cover layer having a size and a shape consistent with a size and a shape of a target area, where the cover layer may also be automatically generated by a function module of the target application, and the user terminal 100a performs the encryption by covering the cover layer with the original content in an occlusion manner, as shown in fig. 2, the user terminal determines the size and the shape of the area P, generates a cover layer z having the size and the shape, and the user terminal 100a performs the encryption by covering the original content { x } with the cover layer z1,…,x4,a1,…,a4,b1,…,b4And (5) carrying out shielding covering, and displaying the covering layer z in the area P of the browsing interface 1000.
The user terminal may further generate a ciphertext of the original content, and then generate a masking layer having a size and a shape consistent with the size and the shape of the target region, and perform blocking coverage on the ciphertext by using the masking layer, as shown in fig. 2, the user terminal may perform blocking coverage on the ciphertext { u, …, u } by using the masking layer z, and display the masking layer z in the region P of the browsing interface 1000.
The mode that the target user selects the original content to be encrypted may be a smearing mode, and the mode that the target user specifically selects the original content, which is not limited in the present application.
Please refer to fig. 3, which is a flowchart illustrating a data encryption method according to an embodiment of the present application. As shown in fig. 3, the data encryption method may include:
step S101, responding to the selection operation of the browsing interface aiming at the multimedia data, and selecting a target area in the browsing interface.
In this embodiment, the multimedia data may be a file, a document, or a picture, and the selecting operation may be performed by encrypting data to be encrypted in a browsing interface for a userThe original content being the content in the multimedia data. As shown in the embodiment corresponding to FIG. 2, the user can select the original content { x } in the browsing interface 10001,…,x4,a1,…,a4,b1,…,b4The original content { x }1,…,x4,a1,…,a4,b1,…,b4The original content { x } is a partial content of the multimedia data, and the user terminal can respond to a selection operation of a user to determine a target area on the browsing interface, where the target area is an area occupied by the original content, as shown in the embodiment corresponding to fig. 21,…,x4,a1,…,a4,b1,…,b4The occupied area is the area P, and the user terminal takes the area P as the target area.
Step S102, obtaining the original content in the target area, and obtaining the content position information of the original content in the multimedia data.
In this application, the content location information may include start location information and end location information of the original content in the multimedia data, and the user terminal may obtain the layout information corresponding to the multimedia data, and search the start location information and the end location information of the original content in the multimedia data in the layout information.
For example, the content location information may be as shown in fig. 4a, and fig. 4a is a schematic diagram of content location information of an original content provided by the present application.
In the content location information shown in fig. 4a, { C1, C2, …, C9} is the entire content of the multimedia data, wherein each content of { C1, C2, …, C9} is determined to have its corresponding location coordinate, wherein the location coordinate may be a coordinate pair consisting of an abscissa and an ordinate, e.g., the location coordinate of content C1 is (2,8), wherein 2 may be the abscissa and 8 may be the ordinate. After the content C1, the content C2, …, and the content C9 all have their coordinates, the position coordinates of the content C1, the content C2, …, and the content C9 are determined as the layout information.
In the content location information as shown in fig. 4a, the area B is an occupied area of the original content selected by the user, the area B can be determined as a target area, the { C4, C5, C6, C7, C8, C9} in the area B is the original content, wherein the content { C4, C5, C6} and the content { C7, C8, C9} are all full-line contents, the content C4 can be a start position of the original content, the location coordinate of the content C4 is found to be (2,5), the content C9 can be an end position of the original content, the location coordinate of the content C9 is found to be (13,2), the location coordinate (2,5) is determined as the start location information, the location coordinate (13,2) is determined as the end location information, all contents of the original content can be found according to the location coordinate (2,5) and the location coordinate (13,2), that is according to the location coordinate (2,5) original content { C4, C5, C6, C7, C8, C9} can be found by the position coordinates (13,2), the starting position information (2,5) and the ending position information (13,2) are determined as content position information, and the original content corresponding to the starting position information (2,5) and the ending position information (13,2) is { C4, C5, C6, C7, C8, C9 }.
Alternatively, the content location information may be as shown in fig. 4b, where fig. 4b is a schematic diagram of content location information of another original content provided by the present application.
In the content location information as shown in fig. 4b, { C1, C2, …, C9} is the entire content of the multimedia data, wherein each content of { C1, C2, …, C9} is determined to have its corresponding location coordinate, wherein the location coordinate may be a coordinate pair consisting of an abscissa and an ordinate, e.g., the location coordinate of content C1 is (2,8), wherein 2 may be the abscissa and 8 may be the ordinate. After the content C1, the content C2, …, and the content C9 all have their coordinates, the position coordinates of the content C1, the content C2, …, and the content C9 are determined as the layout information.
In the content location information shown in fig. 4b, the area D is an occupied area of the original content selected by the user, the area D may be determined as a target area, and { C4, C5, C7, C8, C9} in the area D is the original content, where { C7, C8, C9} is an entire row of content, and { C4, C5} does not include an entire row of content, then the location coordinates corresponding to the original content { C4, C5, C7, C8, C9} in the area D may be found, the location coordinates of the content C4 are found to be (2,5), the location coordinates of C5 are (8,5), the location coordinates of C7 are (2,2), the location coordinates of C8 are (8,2), and the location coordinates of C9 are (13,2), the location coordinates of the content C2 (2,5), the location coordinates of C5 are (8,2), the location coordinates of C8 are (8,2), the location coordinates of C8653 are (868, 2), 2) and the position coordinates (13,2) of C9 are determined as the content position information, and the entire content of the original content can be found according to the position coordinates (2,5), the position coordinates (8,5), the position coordinates (2,2), the position coordinates (8,2) and the position coordinates (13,2), that is, the original content { C4, C5, C7, C8, C9} can be found. The typesetting information of the multimedia data is not limited to the above form, and the typesetting information form of the multimedia data is not limited in the application; the content position information of the original content is not limited to the above form, and the determination method of the content position information of the original content is not limited in the present application.
Step S103, generating encrypted content associated with the content position information, and displaying the encrypted content in the target area; the target area containing the encrypted content does not display the original content.
In the application, the encrypted content is related to content position information, a user terminal can encrypt original content, generate a ciphertext with the same length as the original content data based on a secret key, the ciphertext can be characters or pictures different from the original content, the ciphertext can also be randomly generated messy codes, the ciphertext is determined as the encrypted content, the user terminal replaces the original content with the encrypted content according to the content position information, a browsing interface is refreshed, and the encrypted content can be displayed in a target area in the refreshed browsing interface.
It is understood that, referring to the embodiment corresponding to fig. 2, in the browsing interface 1000, the original content is { x }1,…,x4,a1,…,a4,b1,…,b4Region P is the original content { x }1,…,x4,a1,…,a4,b1,…,b4Area occupied byThe region P is determined as a target region. The user terminal encrypts the original content x by an encryption algorithm (e.g., a symmetric encryption algorithm)1,…,x4,a1,…,a4,b1,…,b4Encryption, generating ciphertext { u, …, u } based on the key, as shown in FIG. 2, content { x }1,…,x4}, content { a1,…,a4And content b1,…,b4All the original content { x } is the whole line of content, the original content { x } can be obtained1,…,x4,a1,…,a4,b1,…,b4Start position information and end position information in multimedia data, original content { x ] corresponding to the start position information and the end position information1,…,x4,a1,…,a4,b1,…,b4Replacing the ciphertext { u, …, u } with the ciphertext { u, …, u }, and after the user refreshes the browsing interface 1000, the user can browse the ciphertext in the region P in the refreshed browsing interface 1000, but cannot browse the original content { x }1,…,x4,a1,…,a4,b1,…,b4}。
Optionally, the user terminal may determine the size and the shape of the target area through the content location information of the original content, and generate a cover layer having the size and the shape, where the cover layer may include a solid color, a pattern, and the like, and determine the cover layer as the encrypted content, and the user terminal covers the original content with the cover layer in an obstructing manner, so that after the user refreshes a browsing interface, the user can browse the cover layer in the target area, and cannot browse the original content.
It is understood that, referring to the embodiment corresponding to fig. 2, in the browsing interface 1000, the original content is { x }1,…,x4,a1,…,a4,b1,…,b4Region P is the original content { x }1,…,x4,a1,…,a4,b1,…,b4And determining the area P as a target area. The user terminal obtains the original content{x1,…,x4,a1,…,a4,b1,…,b4Determining the original content { x } according to the start position information and the end position information of the start position information and the end position information in the multimedia data1,…,x4,a1,…,a4,b1,…,b4The shape and size of the region P occupied by the user terminal generate a cover layer z with the shape and size, and the user terminal couples the cover layer z to the original content { x }1,…,x4,a1,…,a4,b1,…,b4Shielding and covering, after the browsing interface 1000 is refreshed, the user can browse the masking layer z in the region P in the refreshed browsing interface 1000, but cannot browse the original content { x }1,…,x4,a1,…,a4,b1,…,b4}。
Optionally, the user terminal may encrypt the original content to generate a ciphertext having a length consistent with that of the original content, replace the original content with the encrypted content according to the content location information, determine the size and the shape of the target area through the content location information of the original content, and generate a mask layer having the size and the shape, where the user terminal may cover the ciphertext by the mask layer, so that the user may browse the mask layer in the target area without browsing the original content after refreshing the browsing interface.
Optionally, the user terminal may also send the original content to a service server, where the service server encrypts the original content to generate a ciphertext and replaces the original content, or the service server generates a mask layer based on content location information of the original content, and after the mask layer masks the original content, the service server returns the original content to the user terminal to display a final encryption effect.
According to the method, the target area is selected by responding to the selection operation of the browsing interface aiming at the multimedia data, the target area can be the whole file or the local content in the file, the original content can be encrypted more conveniently and freely, and the data encryption mode is enriched; by acquiring the content position information of the original content in the multimedia data, encrypting the original content in the target area based on the content position information to generate encrypted content, and displaying the encrypted content in the target area without displaying the original content, when a user wants to view the encrypted file, the user can view the content which can be disclosed in the file (namely the content of the non-target area) by opening the file without inputting a password, thereby improving the viewing efficiency of the data.
Please refer to fig. 5, which is a schematic view of another scenario provided in the embodiment of the present application. As shown in fig. 5, the user terminal may determine encrypted multimedia data as encrypted multimedia data, and store the path location information of the encrypted multimedia and the content location information corresponding to the original content into the private storage space for storage, that is, the user terminal sends the location path information and the content location information to the service server, and the service server may store the location path information and the content location information into a database. If a user wants to view the original content of the encrypted multimedia data, the user needs to enter a privacy storage space and view the original content in a privacy browsing interface corresponding to the privacy storage space. As shown in fig. 5, a user enters a private storage space, and in a private browsing interface 3000 corresponding to the private storage space, the user can view all encrypted files including pictures, documents, and the like that have been encrypted, and as shown in fig. 5, the user can view a plurality of encrypted pictures, encrypted files "value encrypted file" and encrypted files "my decoration budget" in the private browsing interface 3000.
Illustratively, the file "my decoration budget" may correspond to the encrypted multimedia data in the embodiment corresponding to fig. 2, the user terminal may determine the file "my decoration budget" as the encrypted multimedia data, and the original content of the encrypted multimedia data may correspond to the original content of the multimedia data in the embodiment corresponding to fig. 2, i.e., { x }1,…,x4,a1,…,a4,b1,…,b4After the user selects to open the encrypted multimedia data, the user terminal sends a viewing request of the user for viewing the encrypted multimedia data to the service server, the service server obtains the position path information and the content position information of the encrypted multimedia from the database, and the service server returns the position path information and the content position information to the user terminal, so that the user terminal can obtain the position path information of the encrypted multimedia data stored in the database, can query the content position information of the encrypted content corresponding to the original content according to the position path information, can obtain the encrypted content according to the content position information, and can restore the encrypted content to obtain the original content and display the original content in the privacy browsing interface 3000. As shown in FIG. 5, if the user terminal generates the ciphertext based on the key, the original content { x }is encrypted1,…,x4,a1,…,a4,b1,…,b4Encrypting, the user terminal may obtain a ciphertext { u, …, u }, and decrypt the ciphertext { u, …, u } based on the key to obtain the original content { x }1,…,x4,a1,…,a4,b1,…,b4According to the content position information, the user terminal can replace the ciphertext { u, …, u } with the original content { x }1,…,x4,a1,…,a4,b1,…,b4Refreshing the privacy browsing interface 3000, and the user can view the original content { x } in the refreshed privacy browsing interface 30001,…,x4,a1,…,a4,b1,…,b4}; if the user terminal adopts the generation mask layer to the original content { x1,…,x4,a1,…,a4,b1,…,b4The method of covering is blocked, the user terminal can obtain the cover layer z through the content position information, delete the cover layer z, refresh the privacy browsing interface 3000, and the user can view the original content in the refreshed privacy browsing interface 3000{x1,…,x4,a1,…,a4,b1,…,b4}。
Optionally, if the user terminal is in a manner of generating a ciphertext first, then generating a masking layer, and covering the ciphertext with the masking layer, the user terminal may obtain the masking layer and the ciphertext through content location information, and the user terminal may delete the masking layer z first, then decrypt the ciphertext based on a secret key to obtain original content, replace the ciphertext with the original content, and refresh the privacy browsing interface, so that the user may view the original content in the refreshed privacy browsing interface.
Please refer to fig. 6, which is a schematic flowchart illustrating a process of viewing original content according to an embodiment of the present application. As shown, the process of viewing the original content may include:
in step S201, the encrypted multimedia data is determined as encrypted multimedia data.
In the application, a user can select the original content to be encrypted from the multimedia data in the browsing interface, and after the selection is completed, the original content can be selected for storage, so that the user terminal receives the original content selected by the user and the multimedia data and encrypts the original content, and the user terminal can determine the encrypted multimedia data as the encrypted multimedia data.
Step S202, storing the position path information of the encrypted multimedia data and the content position information to a privacy storage space.
In the application, the user terminal can respond to the saving operation of a user in a browsing interface to acquire the position path information of the encrypted multimedia, the user terminal can send the position path information and the content position information to the service server, the service server stores the position path information and the content position information into the database, the position path information and the content position information are stored into the privacy storage space, when the user terminal subsequently responds to the operation of checking original content and the like by the user, the encrypted multimedia data corresponding to the position path information can be determined through the position path information, and the encrypted content can also be acquired from the encrypted multimedia data through the content position information. Subsequently, the user terminal may generate a prompt message, and display the prompt message in the browsing interface, so that the user may know that the original content in the target area is encrypted and moved into the private storage space, and the user may view the original content in the private storage space. The prompt message is displayed on the encrypted content, that is, the user terminal encrypts the original content to generate the encrypted content and displays the encrypted content in the target area of the original content, so that the user cannot view the original content in the target area of the browsing interface, and subsequently, the user terminal can display the prompt message on the encrypted content.
And step S203, displaying a privacy browsing interface corresponding to the privacy storage space.
In the application, a user can view the original content before encryption in a specific scene, and the specific scene may be a private storage space. If the user selects to enter the privacy storage space, the user terminal displays a privacy browsing interface corresponding to the privacy storage space, and the user can view the original content before encryption in the privacy browsing interface of the privacy storage space.
Step S204, responding to the browsing operation aiming at the encrypted multimedia data in the privacy browsing interface, acquiring the position path information and the content position information, and acquiring the encrypted multimedia data according to the position path information.
In the application, a user can view all encrypted multimedia data which are encrypted in the privacy browsing interface, the user can select any encrypted multimedia data in the privacy browsing interface to view, the user terminal obtains the browsing operation of the user, obtains the position path information and the content position information of the encrypted multimedia data, determines the encrypted multimedia data according to the position path information and the content position information, and obtains the encrypted multimedia data.
Step S205, searching for the encrypted content located in the target area in the encrypted multimedia data according to the content location information.
In the application, the user terminal may search the encrypted content located in the target area in the encrypted multimedia data according to the content location information stored in the private storage space.
Step S206, restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data.
In the application, if the encrypted content is a ciphertext corresponding to the original content, the user terminal may decrypt the ciphertext based on a secret key to obtain the original content, replace the ciphertext with the original content according to the content location information, refresh the privacy browsing interface, and display the original content in the target area in the refreshed privacy browsing interface; if the encrypted content is a cover layer for covering the original content, the user terminal may delete the cover layer in the target area so that the original content may be displayed, refresh the privacy browsing interface, and display the original content in the target area in the refreshed privacy browsing interface.
Optionally, if the encrypted content includes both a ciphertext and a mask layer (the user terminal encrypts the original content to generate the ciphertext, generates the mask layer, and masks the ciphertext with the mask layer), the user terminal may delete the mask layer in the target area, decrypt the ciphertext based on a key to obtain the original content, replace the ciphertext with the original content according to the content location information, refresh the privacy browsing interface, and display the original content in the target area in the refreshed privacy browsing interface.
According to the method, the target area is selected by responding to the selection operation of the browsing interface aiming at the multimedia data, the target area can be the whole file or the local content in the file, the original content can be encrypted more conveniently and freely, and the data encryption mode is enriched; by acquiring the content position information of the original content in the multimedia data, encrypting the original content in the target area based on the content position information to generate encrypted content, and displaying the encrypted content in the target area without displaying the original content, when a user wants to view the encrypted file, the user can view the content which can be disclosed in the file (namely the content of the non-target area) by opening the file without inputting a password, thereby improving the viewing efficiency of the data.
Further, please refer to fig. 7, which is a schematic view of another scenario provided in the embodiment of the present application. As shown in fig. 7, a user a may open a target application a, click on multimedia data may enter a browsing interface 1000, where the multimedia data may be a file "my decoration budget", and in the browsing interface 1000, the user a may browse the content of the file "my decoration budget", where the file "my decoration budget" has 22 pages of content, the content currently browsed by the user a is the content of page 2, the user a may click on an encryption button M in the browsing interface 1000, and the click on the encryption button M is used to support the file to enter an editing state, so that the user a may select the content to be encrypted in the file in the editable state. As shown in fig. 7, a user a clicks an encryption button M to enter a browsing interface 1000 in an editable state, and the user a may select a content to be encrypted in the browsing interface 1000 in the editable state by way of smearing, where the user a may smear all the content in the browsing interface 1000 or may smear part of the content in the browsing interface 1000, and if the user a does not have a content to be encrypted, the user a may select an exit editing option to return to the browsing interface 1000 in an uneditable state, and continue browsing files. As shown in fig. 7, the user a may paint part of the content in the file "my decoration budget", i.e., the content in the area E, and after the painting is completed, the user a may click on the save option to exit the editing mode. The user terminal may receive the content selected by the user a, and determine a target area in the browsing interface 1000, that is, determine the area E as the target area, where the content in the area E is the original content, the user terminal may obtain the original content in the area E, obtain content location information of the original content in the "my decoration budget" of the file, generate encrypted content associated with the content location information based on the original content, and display the encrypted content in the area E, so that the original content cannot be displayed in the browsing interface 1000, thereby better protecting the original content selected by the user a. The specific implementation manner of generating the encrypted content may refer to steps S101 to S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Further, after receiving the saving operation of the user a, the user terminal may send the location path information of the encrypted file "my decoration budget" to the service server, and the service server may store the location path information in the database, so that the user terminal may search and obtain the corresponding file according to the location path information in the database, where the location path information is used to represent the location of the file, for example, the location path information of the file "my decoration budget" may be an a folder in a file disk C. The user terminal can send the content position information of the original content to the service server, and the service server stores the content position information into the database, so that the user terminal can search in a file through the content position information and obtain the original content. Subsequently, the user terminal may generate a prompt message and return the prompt message to the browsing interface 1000, and display the prompt message in the browsing interface 1000 for prompting the user a that the original content selected by the user a has been encrypted and moved into the private storage space, as shown in fig. 7, after the user terminal generates encrypted content for the original content in the area E, the prompt message "the selected content has been moved into the private storage space" may be displayed on the encrypted content display layer. The encrypted content and the prompt message can be on the same display layer, and the prompt message is overlapped on the encrypted content; or, the encrypted content and the prompting message can be respectively arranged on different display layers, and the display layer of the prompting message is arranged above the display layer of the encrypted content.
Further, after the user terminal completes generating the encrypted content and storing the position path information and the content position information in the database, that is, after the user terminal has moved the original content into the privacy storage space, the user can view all the encrypted files in the privacy storage space, and the user can select any file to view the original content before encryption. As shown in fig. 7, the browsing interface 4000 includes a privacy space option, where the privacy space option is an entry of the user a into the privacy storage space, and the user a clicks the privacy space option to enter the privacy browsing interface 3000, where the privacy browsing interface 3000 corresponds to the privacy storage space. The user a can view all encrypted files in the privacy browsing interface 3000, and the user a can select any file to view the original content. The specific implementation of viewing the original content may refer to steps S201 to S206 in the embodiment corresponding to fig. 6, which is not described herein again.
Further, please refer to fig. 8, which is a schematic structural diagram of a data encryption device according to an embodiment of the present application. As shown in fig. 8, the data encryption apparatus 1 may include: a selection module 11, an acquisition module 12 and a generation module 13.
The selection module 11 is configured to respond to a selection operation of a browsing interface for multimedia data, and select a target area in the browsing interface;
an obtaining module 12, configured to obtain an original content in the target area, and obtain content location information of the original content in the multimedia data;
a generating module 13, configured to generate encrypted content associated with the content location information, and display the encrypted content in the target area; the target area containing the encrypted content does not display the original content.
For specific functional implementation manners of the selection module 11, the obtaining module 12, and the generation module 13, reference may be made to steps S101 to S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 8, the obtaining module 12 may include: an acquisition unit 121, a search unit 122, and a determination unit 123.
An obtaining unit 121, configured to obtain typesetting information corresponding to the multimedia data;
a searching unit 122, configured to search, in the composition information, start position information and end position information of the original content in the multimedia data;
a determining unit 123, configured to determine the start position information and the end position information as the content position information;
the specific functional implementation manners of the obtaining unit 121, the searching unit 122, and the determining unit 123 may refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 8, the generating module 13 may include: an encryption unit 131 and a first replacement unit 132.
An encrypting unit 131, configured to encrypt the original content based on a key, generate a ciphertext consistent with a data length of the original content, and determine the ciphertext as the encrypted content;
a first replacing unit 132, configured to replace the original content with the encrypted content according to the content location information, refresh the browsing interface, and display the encrypted content in the target area in the refreshed browsing interface.
The specific functional implementation manners of the encryption unit 131 and the first replacing unit 132 can refer to step S103 in the embodiment corresponding to fig. 3, and are not described herein again.
Referring to fig. 8, the generating module 13 may include an encrypting unit 131 and a first replacing unit 132, and may further include: a first generating unit 133 and a first covering unit 134.
A first generating unit 133, configured to determine a size and a shape of the target area based on the content location information, generate a mask layer having the size and the shape, and determine the mask layer as the encrypted content;
a first covering unit 134, configured to perform shielding covering on the original content based on the encrypted content, refresh the browsing interface, and display the encrypted content in the target area in the refreshed browsing interface.
For specific functional implementation of the first generating unit 133 and the first covering unit 134, refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 8, the generating module 13 may include an encrypting unit 131, a first replacing unit 132, a first generating unit 133, and a first covering unit 134, and may further include: a second generation unit 135.
A second generating unit 135, configured to determine a size and a shape of the target area based on the content location information, generate a mask layer having the size and the shape, and perform occlusion coverage on the encrypted content based on the mask layer.
The specific functional implementation manner of the second generating unit 135 may refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 8, the data encryption apparatus 1 may include a selection module 11, an acquisition module 12, and a generation module 13, and may further include: a determination module 14 and a storage module 15.
A determining module 14, configured to determine the encrypted multimedia data as encrypted multimedia data;
a storage module 15, configured to store the location path information of the encrypted multimedia data and the content location information in a private storage space.
The specific functional implementation manners of the determining module 14 and the storing module 15 may refer to steps S201 to S202 in the embodiment corresponding to fig. 6, which is not described herein again.
Referring to fig. 8, the storage module 15 may include: a response unit 151, a storage unit 152, and a third generation unit 153.
A response unit 151, configured to obtain location path information of the encrypted multimedia data in response to a save operation of a browsing interface for the encrypted multimedia data;
a storage unit 152, configured to store the location path information and the content location information of the encrypted multimedia data in the private storage space;
a third generating unit 153, configured to generate a prompt message, and display the prompt message in the target area in the browsing interface; the prompt information is used for representing that the original content corresponding to the content position information is stored in the privacy storage space; and the display layer of the prompt message is positioned above the display layer of the encrypted content.
Referring to fig. 8, the data encryption apparatus 1 may include a selection module 11, an obtaining module 12, a generation module 13, a determination module 14, and a storage module 15, and may further include: a display module 16, a response module 17, a search module 18, and a restore module 19.
The display module 16 is configured to display a privacy browsing interface corresponding to the privacy storage space;
a response module 17, configured to respond to a browsing operation for the encrypted multimedia data in the private browsing interface, obtain the location path information and the content location information, and obtain the encrypted multimedia data according to the location path information;
a searching module 18, configured to search the encrypted content located in the target area in the encrypted multimedia data according to the content location information;
a restoring module 19, configured to restore the encrypted content to obtain the original content, and display the original content in the target area in the encrypted multimedia data.
The specific functional implementation manners of the display module 16, the response module 17, the search module 18, and the restoration module 19 may refer to steps S203 to S206 in the embodiment corresponding to fig. 6, which is not described herein again.
If the encrypted content is the ciphertext corresponding to the original content;
referring to fig. 8, the restoring module 19 may include: a decryption unit 191 and a second replacement unit 192.
A decryption unit 191, configured to decrypt the ciphertext based on a key to obtain the original content;
a second replacing unit 192, configured to replace the ciphertext with the original content according to the content location information, refresh the privacy browsing interface, and display the original content in the target area in the refreshed privacy browsing interface.
The specific functional implementation manners of the decryption unit 191 and the second replacement unit 192 may refer to step S206 in the embodiment corresponding to fig. 6, which is not described herein again.
If the encrypted content is a covering layer for covering the original content;
referring to fig. 8, the restoring module may include: and a deletion unit 193.
A deleting unit 193, configured to delete the cover layer in the target area in the privacy browsing interface, refresh the privacy browsing interface, and display the original content in the target area in the refreshed privacy browsing interface.
The specific function implementation manner of the deleting unit 193 may refer to step S206 in the embodiment corresponding to fig. 6, which is not described herein again.
According to the method and the device, the target area is selected by responding to the selection operation of the browsing interface aiming at the multimedia data, the target area can be the whole file or the local content in the file, the original content can be encrypted more conveniently and freely, and the data encryption mode is enriched; by acquiring the content position information of the original content in the multimedia data, encrypting the original content in the target area based on the content position information to generate encrypted content, and displaying the encrypted content in the target area without displaying the original content, when a user wants to view the encrypted file, the user can view the content which can be disclosed in the file (namely the content of the non-target area) by opening the file without inputting a password, thereby improving the viewing efficiency of the data.
Further, please refer to fig. 9, which is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 9, the apparatus 1 in the embodiment corresponding to fig. 8 may be applied to the computer device 1000, and the computer device 1000 may include: a processor 1001, a network interface 1004, and a memory 1005, and the computer apparatus 1000 further includes: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 9, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 1000 shown in fig. 9, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
responding to the selection operation of a browsing interface aiming at the multimedia data, and selecting a target area in the browsing interface;
acquiring original content in the target area, and acquiring content position information of the original content in the multimedia data;
generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content.
In an embodiment, when the processor 1001 performs the acquiring of the content location information of the original content in the multimedia data, the following steps are specifically performed:
acquiring typesetting information corresponding to the multimedia data;
searching the initial position information and the end position information of the original content in the multimedia data in the typesetting information;
determining the start position information and the end position information as the content position information;
in one embodiment, when the processor 1001 performs generation of encrypted content associated with the content location information and displays the encrypted content in the target area, specifically performs the following steps:
encrypting the original content based on a secret key, generating a ciphertext consistent with the data length of the original content, and determining the ciphertext as the encrypted content;
and replacing the original content with the encrypted content according to the content position information, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
In one embodiment, when performing the generating of the encrypted content associated with the content location information, the processor 1001 specifically performs the following steps:
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and determining the masking layer as the encrypted content;
and shielding and covering the original content based on the encrypted content, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
In one embodiment, the processor 1001 further performs the steps of:
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and covering the encrypted content in an occlusion mode based on the masking layer.
In one embodiment, the processor 1001 further performs the steps of:
determining the encrypted multimedia data as encrypted multimedia data;
and storing the position path information of the encrypted multimedia data and the content position information into a private storage space.
In an embodiment, when the processor 1001 stores the location path information of the encrypted multimedia data and the content location information into a private storage space, it specifically performs the following steps:
responding to the storage operation of the browsing interface aiming at the encrypted multimedia data, and acquiring the position path information of the encrypted multimedia data;
storing the location path information and the content location information of the encrypted multimedia data to the private storage space;
generating prompt information, and displaying the prompt information in the target area in the browsing interface; the prompt information is used for representing that the original content corresponding to the content position information is stored in the privacy storage space; and the display layer of the prompt message is positioned above the display layer of the encrypted content.
In one embodiment, the processor 1001 further performs the steps of:
displaying a privacy browsing interface corresponding to the privacy storage space;
responding to the browsing operation aiming at the encrypted multimedia data in the privacy browsing interface, acquiring the position path information and the content position information, and acquiring the encrypted multimedia data according to the position path information;
searching the encrypted content in the target area in the encrypted multimedia data according to the content position information;
and restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data.
In an embodiment, when the processor 1001 performs restoring on the encrypted content to obtain the original content, and displays the original content in the target area in the encrypted multimedia data, the following steps are specifically performed:
decrypting the ciphertext based on a secret key to obtain the original content;
and replacing the ciphertext with the original content according to the content position information, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
In an embodiment, when the processor 1001 performs the restoring of the encrypted content to obtain the original content, and displays the original content in the target area in the encrypted multimedia data, the following steps are specifically performed:
deleting the cover layer in the target area in the privacy browsing interface, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
According to the method, the target area is selected by responding to the selection operation of the browsing interface aiming at the multimedia data, the target area can be the whole file or the local content in the file, the original content can be encrypted more conveniently and freely, and the data encryption mode is enriched; by acquiring the content position information of the original content in the multimedia data, encrypting the original content in the target area based on the content position information to generate encrypted content, and displaying the encrypted content in the target area without displaying the original content, when a user wants to view the encrypted file, the user can view the content which can be disclosed in the file (namely the content of the non-target area) by opening the file without inputting a password, thereby improving the viewing efficiency of the data.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer-readable storage medium, where a computer program executed by the aforementioned data processing computer device 1000 is stored in the computer-readable storage medium, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the data processing method in the embodiments corresponding to fig. 3 to fig. 7 can be executed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application.
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 computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (13)

1. A method for data encryption, comprising:
responding to the selection operation of a browsing interface aiming at the multimedia data, and selecting a target area in the browsing interface;
acquiring original content in the target area, and acquiring content position information of the original content in the multimedia data;
generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content.
2. The method of claim 1, wherein the obtaining content location information of the original content in the multimedia data comprises:
acquiring typesetting information corresponding to the multimedia data;
searching the initial position information and the end position information of the original content in the multimedia data in the typesetting information;
and determining the starting position information and the ending position information as the content position information.
3. The method of claim 1, wherein the generating of the encrypted content associated with the content location information, the displaying of the encrypted content in the target area, comprises:
encrypting the original content based on a secret key, generating a ciphertext consistent with the data length of the original content, and determining the ciphertext as the encrypted content;
and replacing the original content with the encrypted content according to the content position information, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
4. The method of claim 1, wherein the generating the encrypted content associated with the content location information comprises:
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and determining the masking layer as the encrypted content;
and shielding and covering the original content based on the encrypted content, refreshing the browsing interface, and displaying the encrypted content in the target area in the refreshed browsing interface.
5. The method of claim 4, further comprising;
determining the size and the shape of the target area based on the content position information, generating a masking layer with the size and the shape, and covering the encrypted content in an occlusion mode based on the masking layer.
6. The method of claim 1, further comprising:
determining the encrypted multimedia data as encrypted multimedia data;
and storing the position path information of the encrypted multimedia data and the content position information into a private storage space.
7. The method of claim 6, wherein the storing the location path information of the encrypted multimedia data and the content location information to a private storage space comprises:
responding to the storage operation of the browsing interface aiming at the encrypted multimedia data, and acquiring the position path information of the encrypted multimedia data;
storing the location path information and the content location information of the encrypted multimedia data to the private storage space;
generating prompt information, and displaying the prompt information in the target area in the browsing interface; the prompt information is used for representing that the original content corresponding to the content position information is stored in the privacy storage space; and the display layer of the prompt message is positioned above the display layer of the encrypted content.
8. The method of claim 6, further comprising:
displaying a privacy browsing interface corresponding to the privacy storage space;
responding to the browsing operation aiming at the encrypted multimedia data in the privacy browsing interface, acquiring the position path information and the content position information, and acquiring the encrypted multimedia data according to the position path information;
searching the encrypted content in the target area in the encrypted multimedia data according to the content position information;
and restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data.
9. The method according to claim 8, wherein the encrypted content is a ciphertext corresponding to the original content;
the restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data includes:
decrypting the ciphertext based on a secret key to obtain the original content;
and replacing the ciphertext with the original content according to the content position information, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
10. The method of claim 8, wherein the encrypted content is a mask used to mask the original content;
the restoring the encrypted content to obtain the original content, and displaying the original content in the target area in the encrypted multimedia data includes:
deleting the cover layer in the target area in the privacy browsing interface, refreshing the privacy browsing interface, and displaying the original content in the target area in the refreshed privacy browsing interface.
11. A data encryption apparatus, comprising:
a selection module: the multimedia data browsing device is used for responding to the selection operation of a browsing interface aiming at the multimedia data and selecting a target area in the browsing interface;
an acquisition module: the system is used for acquiring original content in the target area and acquiring content position information of the original content in the multimedia data;
a generation module: for generating encrypted content associated with the content location information, the encrypted content being displayed in the target area; the target area containing the encrypted content does not display the original content.
12. A computer device, comprising: a processor and a memory;
the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any of claims 1 to 10.
CN201911083010.5A 2019-11-07 2019-11-07 Data encryption method, device, equipment and readable storage medium Active CN110881033B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911083010.5A CN110881033B (en) 2019-11-07 2019-11-07 Data encryption method, device, equipment and readable storage medium
PCT/CN2020/118800 WO2021088571A1 (en) 2019-11-07 2020-09-29 Data encryption method and apparatus, and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911083010.5A CN110881033B (en) 2019-11-07 2019-11-07 Data encryption method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110881033A true CN110881033A (en) 2020-03-13
CN110881033B CN110881033B (en) 2022-06-21

Family

ID=69729133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911083010.5A Active CN110881033B (en) 2019-11-07 2019-11-07 Data encryption method, device, equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN110881033B (en)
WO (1) WO2021088571A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021088571A1 (en) * 2019-11-07 2021-05-14 腾讯科技(深圳)有限公司 Data encryption method and apparatus, and device and readable storage medium
CN115134635A (en) * 2022-06-07 2022-09-30 腾讯科技(深圳)有限公司 Method, device and equipment for processing media information and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070133792A1 (en) * 2005-09-28 2007-06-14 Keiko Utsumi Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
CN106570408A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Sensitive information display method and apparatus
CN107133993A (en) * 2017-04-19 2017-09-05 珠海市魅族科技有限公司 A kind of image processing method and device
CN107516051A (en) * 2017-09-05 2017-12-26 深圳市影踪科技有限公司 A kind of data encryption storage method, device and computer-readable recording medium
CN108777685A (en) * 2018-06-05 2018-11-09 北京京东金融科技控股有限公司 Method and apparatus for handling information
CN108989604A (en) * 2018-07-20 2018-12-11 京东方科技集团股份有限公司 Image encryption method, image transfer method, electronic equipment, readable storage medium storing program for executing
CN109145552A (en) * 2018-07-09 2019-01-04 维沃移动通信有限公司 Information ciphering method and terminal device
CN109543390A (en) * 2018-12-25 2019-03-29 广州知弘科技有限公司 A kind of information security management method and system
CN109886000A (en) * 2019-02-01 2019-06-14 维沃移动通信有限公司 A kind of image encryption method and mobile terminal
US20190318106A1 (en) * 2016-12-16 2019-10-17 Hangzhou Hikvision Digital Technology Co., Ltd. Method and apparatus for image display using privacy masking

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180084304A (en) * 2017-01-16 2018-07-25 삼성전자주식회사 Electronic device and method for creating shortcut of web page thereof
CN108093031A (en) * 2017-12-01 2018-05-29 北京海泰方圆科技股份有限公司 A kind of page data processing method and device
CN109598138B (en) * 2018-11-15 2023-07-11 创新先进技术有限公司 Method and device for identifying, covering and sensing whether sensitive information in picture is checked or not
CN110881033B (en) * 2019-11-07 2022-06-21 腾讯科技(深圳)有限公司 Data encryption method, device, equipment and readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070133792A1 (en) * 2005-09-28 2007-06-14 Keiko Utsumi Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
CN106570408A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Sensitive information display method and apparatus
US20190318106A1 (en) * 2016-12-16 2019-10-17 Hangzhou Hikvision Digital Technology Co., Ltd. Method and apparatus for image display using privacy masking
CN107133993A (en) * 2017-04-19 2017-09-05 珠海市魅族科技有限公司 A kind of image processing method and device
CN107516051A (en) * 2017-09-05 2017-12-26 深圳市影踪科技有限公司 A kind of data encryption storage method, device and computer-readable recording medium
CN108777685A (en) * 2018-06-05 2018-11-09 北京京东金融科技控股有限公司 Method and apparatus for handling information
CN109145552A (en) * 2018-07-09 2019-01-04 维沃移动通信有限公司 Information ciphering method and terminal device
CN108989604A (en) * 2018-07-20 2018-12-11 京东方科技集团股份有限公司 Image encryption method, image transfer method, electronic equipment, readable storage medium storing program for executing
CN109543390A (en) * 2018-12-25 2019-03-29 广州知弘科技有限公司 A kind of information security management method and system
CN109886000A (en) * 2019-02-01 2019-06-14 维沃移动通信有限公司 A kind of image encryption method and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021088571A1 (en) * 2019-11-07 2021-05-14 腾讯科技(深圳)有限公司 Data encryption method and apparatus, and device and readable storage medium
CN115134635A (en) * 2022-06-07 2022-09-30 腾讯科技(深圳)有限公司 Method, device and equipment for processing media information and storage medium
CN115134635B (en) * 2022-06-07 2024-04-19 腾讯科技(深圳)有限公司 Media information processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110881033B (en) 2022-06-21
WO2021088571A1 (en) 2021-05-14

Similar Documents

Publication Publication Date Title
US11140138B2 (en) Method for encrypting an image, method for transmitting an image, electronic device and computer readable storage medium
US20150007351A1 (en) Mobile Messaging Enhanced with Concealable and Selectively Revealable Text, Image, and Video Messages
CN110287724A (en) Data storage and verification method and device
EP3114601B1 (en) Access control for a resource
CN106790172B (en) File sharing method, server and client
CN110881033B (en) Data encryption method, device, equipment and readable storage medium
CN111832031B (en) Family file processing method and device, computer equipment and storage medium
JP2019533223A (en) Information input method and apparatus
CN113010254A (en) Interaction method and device based on group channel, computer equipment and storage medium
US10120539B2 (en) Method and device for setting user interface
CN106203141A (en) The data processing method of a kind of application and device
CN115484086A (en) Cloud mobile phone screen sharing method, electronic equipment and computer readable storage medium
US20170235925A1 (en) System and methods for secure collaborative communication
CN104866773B (en) A kind of fingerprint search method, apparatus and terminal
US10560479B2 (en) Communication with component-based privacy
CN114844853A (en) Information processing method, information processing apparatus, electronic device, and medium
CN112270004B (en) Content encryption method and device and electronic equipment
CN114817784A (en) Message processing method and device, electronic equipment and readable storage medium
CN101136760A (en) Electric comic book delivering server, apparatus for creating translated electric comic book and method of creating translated electric comic book
CN109729076B (en) Data desensitization and inverse desensitization method and device, storage medium and terminal
WO2021012502A1 (en) Screenshot information control method, device, computer apparatus, and storage medium
CN113010918A (en) Information processing method and device
CN112434327A (en) Information protection method and device and electronic equipment
CN112748839A (en) Picture processing method and device, computer readable storage medium and computer equipment
CN115134473B (en) Image encryption method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022234

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant