CN106650469B - Photo processing method and terminal equipment - Google Patents

Photo processing method and terminal equipment Download PDF

Info

Publication number
CN106650469B
CN106650469B CN201610891093.0A CN201610891093A CN106650469B CN 106650469 B CN106650469 B CN 106650469B CN 201610891093 A CN201610891093 A CN 201610891093A CN 106650469 B CN106650469 B CN 106650469B
Authority
CN
China
Prior art keywords
photo
encrypted
terminal device
terminal equipment
data
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
CN201610891093.0A
Other languages
Chinese (zh)
Other versions
CN106650469A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610891093.0A priority Critical patent/CN106650469B/en
Publication of CN106650469A publication Critical patent/CN106650469A/en
Application granted granted Critical
Publication of CN106650469B publication Critical patent/CN106650469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The embodiment of the invention discloses a photo processing method and terminal equipment, which are used for improving the data security. The method provided by the embodiment of the invention comprises the following steps: the terminal equipment encrypts the original photo according to the key to obtain an encrypted photo, decrypts the encrypted photo according to the key after receiving a decryption instruction sent by a user to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo, judges whether the state of the terminal equipment meets a preset condition for deleting the preview photo, and deletes the preview photo and the temporary data if the state of the terminal equipment meets the condition. The embodiment of the invention also provides the terminal equipment, and the embodiment of the invention can improve the data security.

Description

Photo processing method and terminal equipment
Technical Field
The present invention relates to the field of communications, and in particular, to a photo processing method and a terminal device.
Background
In recent years, with the development of science and technology, terminal devices (such as mobile phones and tablet computers) with a camera function are widely used, and users like to record good memories in life by using the camera function. However, the importance of users to privacy is also increasing, and the demand for protecting photo privacy is also increasing.
In the prior art, when a user takes a picture by using a mobile terminal, the picture is encrypted through working software such as a mobile phone manager, namely, the picture is stored in a 'safe', and when the user needs to check the picture, a preset password is input, and the 'safe' is opened, so that the picture can be checked.
However, in the prior art, when another person opens the "safe" by using the mobile phone of the user, the picture in the "safe" can be copied and sent to other devices, so that the current security mode is easily utilized by a malicious user, and the security of data is affected.
Disclosure of Invention
The embodiment of the invention provides a photo processing method and terminal equipment, which are used for improving the privacy of a user.
An embodiment of the present invention provides a method for processing a photo, including:
the terminal equipment encrypts the original photo according to the secret key to obtain an encrypted photo;
the terminal equipment receives a photo decryption instruction sent by a user;
the terminal equipment decrypts the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo;
the terminal equipment judges whether the state of the terminal equipment meets a preset condition for deleting the preview picture or not;
and if so, deleting the preview photo and the temporary data by the terminal equipment.
Another aspect of the embodiments of the present invention provides a terminal device, which specifically includes:
the encryption unit is used for encrypting the original photo according to the key to obtain an encrypted photo;
the first receiving unit is used for receiving a photo decryption instruction sent by a user;
the decryption unit is used for decrypting the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo;
the judging unit is used for judging whether the state of the terminal equipment meets the preset condition of deleting the preview photo;
and the deleting unit is used for deleting the preview photo and the temporary data by the terminal equipment if the condition is met.
According to the technical scheme, the embodiment of the invention has the following advantages: the terminal equipment encrypts the original photo according to the key to obtain an encrypted photo, decrypts the encrypted photo according to the key after receiving a decryption instruction sent by a user to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo, judges whether the state of the terminal equipment meets a preset condition for deleting the preview photo, and deletes the preview photo and the temporary data if the state of the terminal equipment meets the condition. The original photo is encrypted through the key to obtain the encrypted photo, when the encrypted photo is sent to other equipment, the other equipment cannot decrypt the encrypted photo because the key is only known by the terminal equipment, so that the preview photo cannot be seen on the other equipment, and when the terminal equipment detects that the state of the equipment meets the preset condition of deleting the preview photo, the preview photo and the temporary data are deleted, so that the preview photo and the temporary data cannot be copied and stored on the other equipment, and the data security is improved.
Drawings
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 2 is a diagram of an embodiment of a photo processing method according to an embodiment of the present invention;
FIG. 3 is a diagram of another embodiment of a photo processing method according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of a terminal device interface in an embodiment of the invention;
FIG. 5 is a diagram illustrating another exemplary application scenario in accordance with an embodiment of the present invention;
FIG. 6 is a diagram illustrating another exemplary application scenario in accordance with an embodiment of the present invention;
FIG. 7 is a diagram illustrating another exemplary application scenario in accordance with an embodiment of the present invention;
FIG. 8 is a diagram of an embodiment of a terminal device in an embodiment of the present invention;
fig. 9 is a schematic diagram of another embodiment of the terminal device in the embodiment of the present invention;
fig. 10 is a schematic diagram of another embodiment of the terminal device in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a photo processing method and terminal equipment, which are used for improving the privacy of a user.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention can be used in the application scenario as shown in fig. 1. In the application scene, a user uses shooting software of the mobile device to shoot a scene, and when the user does not want others to see the scene, the shot photos need to be hidden.
In the prior art, a user downloads security software, moves a photo to the security software for storage, sets a password for encryption on a folder for storing the photo, equivalently, the photo is put in a safe, and when the photo needs to be checked, the safe can be opened by inputting the set password to see the photo. However, when other people use the mobile phone of the user, if the safe box is cracked, the photos in the safe box can be copied and sent to other equipment, so that the privacy of the user is violated, and the privacy of the user is greatly threatened.
In view of this, in the embodiment of the present invention, the photo itself is encrypted. The terminal equipment encrypts the original photo according to the key to obtain an encrypted photo, decrypts the encrypted photo according to the key after receiving a decryption instruction sent by a user to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo, judges whether the state of the terminal equipment meets a preset condition for deleting the preview photo, and deletes the preview photo and the temporary data if the state of the terminal equipment meets the condition.
For convenience of understanding, a specific flow in the embodiment of the present invention is described below, and referring to fig. 2, an embodiment of a photo processing method in the embodiment of the present invention includes:
201. the terminal equipment encrypts the original photo according to the secret key to obtain an encrypted photo;
when a user uses a terminal device and wants to keep the original photo as the privacy of the user, the terminal device encrypts the original photo according to a secret key to obtain an encrypted photo, and the content displayed by the original photo cannot be seen from the encrypted photo.
202. The terminal equipment receives a photo decryption instruction sent by a user;
after the terminal equipment encrypts the original photo to obtain the encrypted photo, when a user uses the terminal equipment and wants to preview the original photo, the terminal equipment receives a photo decryption instruction sent by the user so that the terminal equipment can decrypt the encrypted photo.
203. The terminal equipment decrypts the encrypted photo according to the secret key to obtain temporary data and a preview photo;
after receiving a photo decryption instruction sent by a user, the terminal equipment decrypts the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set forming the preview photo as the pixels are the most basic units forming the photo, and the user can preview the original photo through the preview photo.
204. The terminal device determines whether the state of the terminal device meets a preset condition for deleting the preview photo, and if so, executes step 205; if not, go to step 206.
When the terminal equipment decrypts the encrypted photo according to the secret key to obtain temporary data and a preview photo, detecting and judging whether the state of the terminal equipment meets the preset condition of deleting the preview photo, and if so, executing the step 205; if not, go to step 206.
205. The terminal equipment deletes the preview photo and the temporary data;
and after detecting that the state of the terminal equipment meets the preset condition for deleting the preview photo, the terminal equipment deletes all temporary data including the preview photo and the temporary data so as to prevent the preview photo and the temporary data from being copied to other equipment.
206. The terminal device performs other operations.
And after the terminal equipment detects that the state of the terminal equipment does not meet the preset condition for deleting the preview photo, other steps are executed.
According to the technical scheme, the terminal equipment encrypts the original photo according to the key to obtain the encrypted photo, after receiving a decryption instruction sent by a user, the terminal equipment decrypts the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo, the terminal equipment judges whether the state of the terminal equipment meets a preset condition for deleting the preview photo, and if the state of the terminal equipment meets the preset condition for deleting the preview photo, the terminal equipment deletes the preview photo and the temporary data. The original photo is encrypted through the key to obtain the encrypted photo, when the encrypted photo is sent to other equipment, the other equipment cannot decrypt the encrypted photo because the key is only known by the terminal equipment, so that the preview photo cannot be seen on the other equipment, and when the terminal equipment detects that the state of the equipment meets the preset condition of deleting the preview photo, the preview photo and the temporary data are deleted, so that the preview photo and the temporary data cannot be copied and stored on the other equipment, and the data security is improved.
For convenience of understanding, the following will describe in detail a photo processing method according to an embodiment of the present invention, and referring to fig. 3, another photo processing method according to an embodiment of the present invention includes:
301. the terminal equipment receives a starting instruction;
the terminal device is preset with encrypted camera software and corresponding encrypted photo review software, as shown in fig. 4. The encrypted camera software enables a user to freely select whether to encrypt the shot photo or not, and can also encrypt the local photo, and the user can decrypt the encrypted photo through the encrypted photo reference software to preview the encrypted photo. And when the user clicks the application icon of the encrypted camera software, sending an opening instruction to the terminal equipment to run the encrypted camera software.
It should be noted that the terminal device in this embodiment includes a mobile phone, a tablet computer, a notebook computer, or the like with a photographing function, and the details are not limited herein.
302. The terminal equipment generates a secret key;
after the terminal device receives the opening instruction sent by the user, if the user runs the encrypted camera software for the first time or runs the encrypted camera software for the first time after the terminal device restores the factory settings, the terminal device generates a secret key.
It can be understood that, in practical application, there are various triggering modes for the terminal device to generate the key, and besides the user sends the opening instruction for the first time to trigger, the terminal device can also automatically generate the key after installing the encrypted camera software. Therefore, the specific time for the terminal device to generate the key is not limited herein.
It should be noted that in practical applications, there are various ways for the terminal device to generate the key, and the key may be generated randomly, or an identification code of the terminal device may be obtained as the key, such as a device serial number, a mobile phone number, or a user identification code. In addition, in addition to the terminal device generating the key, the terminal device may also receive a key instruction sent by the user, where the key instruction carries the key set by the user. The specific way for the terminal device to obtain the key is not limited herein.
303. The terminal equipment generates secret data according to a preset algorithm;
after the terminal equipment generates the secret key, unique secret data corresponding to the secret key is obtained according to a preset algorithm, and the length of the secret data is not limited.
It should be noted that, in practical applications, there are multiple preset algorithms, and if the preset algorithm is to repeat the secret data twice, if the key is 1358, the secret data is 13581358, or if the preset algorithm is to add 1 to each bit number, the secret data is 2469 when the key is 1358. Therefore, the specific preset algorithm is not limited herein.
304. The terminal equipment receives a first instruction;
the terminal equipment receives a first instruction sent by a user, and the first instruction instructs the terminal equipment to run the encryption camera software.
It should be noted that, if the opening instruction in step 303 is an instruction for running the encrypted camera software that is received by the terminal device for the first time to trigger the terminal device to generate the key, when the first instruction is also an instruction for running the encrypted camera software that is received by the mobile device for the first time, that is, the first instruction is the same as the opening instruction, step 304 may be omitted; and when the first instruction is not the instruction which is received by the terminal equipment for encrypting the camera software for the first time, the first instruction and the opening instruction have time difference, and the first instruction is only used for indicating the terminal equipment to operate the encrypted camera software. Therefore, the specific function of the first instruction is not limited herein.
305. The terminal equipment prompts a user whether to start an encryption function, if so, executing a step 306; if not, go to step 307;
after receiving a first instruction sent by a user, the terminal device calls an application layer to prompt the user whether to start an encryption function, and if the user selects to start the encryption function, step 306 is executed; if the user chooses not to activate the encryption function, go to step 307.
306. The terminal equipment generates first pixel data;
after the terminal device receives an instruction of a user for confirming to start an encryption function and after a photographing action of the user is completed, the terminal device generates first pixel data and temporary data, and performs format processing on the generated first pixel data and temporary data to obtain a primary photo and a preview photo, wherein the first pixel data is a pixel set of the primary photo, the temporary data is a pixel set of the preview photo, and it can be understood that the first pixel data is the same as the temporary data.
It should be noted that, the terminal device obtains the first pixel data corresponding to the original photo generated when the user takes a picture through steps 305 and 306, and in practical applications, the user may also select to encrypt the existing local photo, so that the user sends a second instruction to the terminal device to instruct the terminal device to encrypt the locally stored original photo, and after receiving the second instruction, the terminal device obtains the first pixel data corresponding to the original photo from the local database. Therefore, the specific manner of obtaining the first pixel data is not limited herein.
In addition, the terminal device performs format processing on the first pixel data and the temporary data to obtain a native photo and a preview photo, where the format of the native photo and the preview photo may be jpeg, bmp, jpg, or the like, and the specific generation format is not limited here.
307. The terminal equipment executes other steps;
and after the terminal equipment receives the instruction that the user confirms not to start the encryption function, executing a normal photographing process.
308. The terminal equipment encrypts the original photo according to the secret data and the first pixel data to obtain an encrypted photo;
after the terminal device generates the first pixel data, the secret data and the first pixel data are operated according to a preset encryption algorithm to obtain a second pixel set, the terminal device performs format processing on the second pixel set to obtain an encrypted photo, and meanwhile, the terminal device stores the generated second pixel data and the secret data in different positions of the terminal device, such as a folder, a disk or a storage medium, and the specific position is not limited here.
It should be noted that the second pixel data may be stored in the terminal device after being generated, or may be obtained in real time when the encrypted photograph is decrypted without being stored, and therefore, the specific details are not limited herein.
It can be understood that the content displayed by the encrypted original photo is different from the content displayed by the encrypted original photo, i.e. the user cannot see the content displayed by the original photo from the encrypted photo.
In practical application, there are various preset encryption algorithms. For example, the first pixel data and the secret data are sequentially subtracted or sequentially added by a round function, or the first pixel data is alternately used at the center, and the secret data is interleaved according to a predetermined sequence, so that a specific preset encryption algorithm is not limited here.
309. The terminal equipment receives a photo decryption request;
when a user wants to preview the encrypted original photo, the user clicks an application icon of the encrypted photo reference software to indicate the terminal device to run the software, the terminal device runs the encrypted photo reference software, and the user can enable the terminal device to receive a photo decryption request sent by the user through clicking the icon of the encrypted photo so as to decrypt the encrypted photo.
310. The terminal equipment obtains second pixel data;
and after receiving a photo decryption request sent by a user, the terminal equipment generates second pixel data through the encrypted photo, wherein the second pixel data is a pixel set of the encrypted photo.
It should be noted that, in practical applications, the terminal device encrypts the original photo to obtain the second pixel data and generate the encrypted photo, the second pixel data and the secret data may be stored in different locations of a local database of the terminal device, and when the encrypted photo is decrypted, the second pixel data is directly obtained from the local database. Therefore, the specific manner of acquiring the second pixel data by the terminal device is not limited herein.
311. The terminal equipment decrypts the encrypted photo according to the secret data and the second pixel data to obtain temporary data and a preview photo;
and after the terminal equipment obtains the second pixel data, the secret data and the second pixel data are operated according to a preset decryption algorithm to obtain temporary data, and the terminal equipment performs format processing on the temporary data to obtain a preview picture.
It will be appreciated that the preset encryption algorithm and the preset decryption algorithm are reversed. For example, the data 1358 is encrypted by an algorithm of adding 1 to each bit number to obtain encrypted data 2469, and when the encrypted data needs to be decrypted, the decryption algorithm is to subtract 1 from each bit number to obtain original data 1358.
312. The terminal equipment judges whether the state of the terminal equipment meets the preset condition of deleting the preview photo, and if so, the step 313 is executed; if not, go to step 314;
when the terminal equipment decrypts to obtain temporary data and a preview photo, detecting whether the state of the terminal equipment meets a preset condition for deleting the preview photo, and if so, executing a step 313; if not, go to step 314.
It should be noted that, in order to prevent the preview photo and the temporary data from being copied, the terminal device presets a condition for deleting the preview photo, and the condition may include: the terminal device detects that the decryption function is closed, the terminal device detects that the encrypted photo reference program is closed, the terminal device connects to an external storage device or the terminal device detects that the encrypted photo reference program is closed, and the like, and it is required to ensure that the encrypted photo reference program is in a preview state and the terminal device does not have access to the external storage device when the preview photo and the temporary data exist. Therefore, the specific condition for deleting the preview photo is not limited here.
In addition, as science and technology is continuously developed, more and more terminals are preset with a screen capture function, so that when a user utilizes an encrypted photo look-up program to decrypt and view a preview photo, the screen capture function of the terminal device is set to a use-prohibited state by the terminal device, so that when the user previews a primary photo, the display interface of the terminal device is currently captured, the generated screen capture picture can display the content displayed by the primary photo, and the privacy of the user is threatened.
313. The terminal equipment deletes the preview photo and the temporary data;
and the terminal equipment detects that the state of the terminal equipment meets the preset condition for deleting the preview photo, and simultaneously deletes the decrypted preview photo and the temporary data together to prevent the preview photo from being utilized by other people.
314. The terminal device performs other operations.
And when the terminal equipment detects that the state of the terminal equipment meets the preset condition of deleting the preview photo, the terminal equipment displays the preview photo.
For ease of understanding, the present embodiment is described below with reference to specific application scenarios:
on monday, Ann bought a new mobile phone, and found that the mobile phone is internally provided with encrypted photo software and encrypted photo viewing software, and she wants to take a photo for her puppy but does not want to share with others, so that the icon of the encrypted photo software on the mobile phone screen is clicked, and the mobile phone generates a unique sequence Ss according to a rule of continuously repeating the sequence code by taking her mobile phone sequence code 8497256453 as a secret key. The mobile phone prompts an Ann whether to select to start the encryption camera function, the Ann clicks a determination option displayed on a mobile phone screen to select the encryption camera function and takes a picture, and after the mobile phone finishes the picture taking action, the mobile phone obtains pixel data of a picture and a preview picture, which are respectively A and A ', obviously, A is A'. The shot photo is a two-dimensional photo, the length and the width of the A acquired by the mobile phone are respectively La and Lb, and according to an encryption circulation function preset by the mobile phone, a specific circulation rule is shown in fig. 5, namely, data in the A and the Ss are sequentially subtracted, because the quantity in the A is far greater than that of the Ss, after circulation is carried out to the tail of the Ss, a circulation pointer center of the Ss data returns to the head of the Ss data, the A and the Ss data are continuously subtracted until the circulation reaches an end condition, the A after encryption calculation is obtained, the encrypted A is subjected to JPEG format processing to generate an encrypted photo in a JPEG format, and pixel data A of a preview photo and the preview photo are deleted. As shown in fig. 6, the left side shows a photograph before encryption, and the right side shows a photograph after encryption. The next day, Ann wants to see the photo taken by the puppy yesterday, Ann clicks the icon of the encrypted photo software on the screen of the mobile phone, Ann clicks the icon of the encrypted photo after the mobile phone enters the interface of the encrypted photo software, the mobile phone starts to decrypt the encrypted photo after sensing, respectively finding the Ss and the A after encryption calculation at different positions of a local database, according to a preset decryption round function, and a specific round rule is shown in FIG. 7, namely, the data in A after encryption calculation is sequentially added with the Ss, and after the circulation is carried out to the tail of the Ss, and returning the center of the loop pointer of the Ss data to the head of the Ss data, and continuously adding the A data and the Ss data until the loop reaches an end condition to obtain pixel data A 'of the preview picture, performing format processing by using the pixel data A' to generate the preview picture in the JPEG format, wherein Ann sees the picture shot by the Ann yesterday through the preview picture.
In the above description of the photo processing method in the embodiment of the present invention, the following description of the terminal device in the embodiment of the present invention refers to fig. 8, where the terminal device in the embodiment of the present invention includes:
an encryption unit 801 configured to encrypt the original photo according to the key to obtain an encrypted photo;
a first receiving unit 802, configured to receive a photo decryption instruction sent by a user;
a decryption unit 803, configured to decrypt the encrypted photo according to the key to obtain temporary data and a preview photo, where the temporary data is a pixel set of the preview photo;
a judging unit 804, configured to judge whether a state of the terminal device meets a preset condition for deleting the preview picture;
and a deleting unit 805, configured to delete the preview picture and the temporary data by the terminal device if the preview picture and the temporary data are satisfied.
In this embodiment, the encryption unit encrypts the original photo according to the key to obtain an encrypted photo, after the first receiving unit receives a decryption instruction sent by a user, the decryption unit decrypts the encrypted photo according to the key to obtain temporary data and a preview photo, where the temporary data is a pixel set of the preview photo, the determining unit determines whether the state of the terminal device meets a preset condition for deleting the preview photo, and if so, the deleting unit deletes the preview photo and the temporary data. The original photo is encrypted through the key to obtain the encrypted photo, when the encrypted photo is sent to other equipment, the other equipment cannot decrypt the encrypted photo because the key is only known by the terminal equipment, so that the preview photo cannot be seen on the other equipment, and when the terminal equipment detects that the state of the equipment meets the preset condition of deleting the preview photo, the preview photo and the temporary data are deleted, so that the preview photo and the temporary data cannot be copied and stored on the other equipment, and the privacy of the user is greatly improved.
For convenience of understanding, the following describes in detail a terminal device in an embodiment of the present invention, and with reference to fig. 9, another embodiment of the terminal device in the embodiment of the present invention includes:
an encryption unit 901 configured to encrypt the original photo according to the key to obtain an encrypted photo;
a first receiving unit 902, configured to receive a photo decryption instruction sent by a user;
a decryption unit 903, configured to decrypt the encrypted photo according to the key to obtain temporary data and a preview photo, where the temporary data is a pixel set of the preview photo;
a judging unit 904, configured to judge whether a state of the terminal device satisfies a preset condition for deleting the preview picture;
and the deleting unit 905 is used for deleting the preview photo and the temporary data by the terminal equipment if the condition is met.
The terminal device in the embodiment of the present invention may further include:
a first generating unit 906 for generating a key.
The terminal device in the embodiment of the present invention may further include:
a second receiving unit 907, configured to receive a key instruction sent by a user, where the key instruction carries a key.
The encryption unit in the embodiment of the present invention may include:
a generating module 9011, configured to generate secret data corresponding to the key according to a preset algorithm;
the encryption module 9012 is configured to encrypt the native photograph according to the secret data and the first pixel data to obtain an encrypted photograph, where the first pixel data is a pixel set of the native photograph, and the first pixel data and the secret data are respectively stored in different folders of the local database.
The terminal device in the embodiment of the present invention may further include:
a third receiving unit 908, configured to receive a first instruction sent by a user, where the first instruction is used to instruct to run preset encrypted camera software;
a prompting unit 909 for calling the application layer to prompt the user whether to enable the encryption function;
and a second generating unit 910, configured to generate the first pixel data through preset encryption camera software if yes.
The terminal device in the embodiment of the present invention may further include:
a fourth receiving unit 911, configured to receive a second instruction sent by the user, where the second instruction is used to instruct to encrypt the native photograph;
a first obtaining unit 912, configured to obtain first pixel data from a local database.
The decryption unit in the embodiment of the present invention may further include:
and a decryption module 9031, configured to decrypt the encrypted photo according to the secret data and second pixel data, where the secret data corresponds to the key, and the second pixel data is a pixel set of the encrypted photo.
The terminal device in the embodiment of the present invention may further include:
a third generating unit 913 for generating the second pixel data from the encrypted photograph.
The terminal device in the embodiment of the present invention may further include:
a second obtaining unit 914, configured to obtain second pixel data from the local database.
The terminal device in the embodiment of the present invention may further include:
and a preview unit 915, configured to display the preview photo on the terminal device if the condition is not met.
In the above, the terminal device in the embodiment of the present invention is described from the perspective of a modular functional entity, and in the following, the terminal device in the embodiment of the present invention is described from the perspective of hardware processing, referring to fig. 10, an embodiment of a mobile device monitoring system 1000 in the embodiment of the present invention includes:
an input device 1001, an output device 1002, a processor 1003 and a memory 1004 (wherein the number of the processors 1003 in the first switch 1000 may be one or more, and one processor 1003 is taken as an example in fig. 10). In some embodiments of the present invention, the input device 1001, the output device 1002, the processor 1003, and the memory 1004 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 10.
Wherein, by calling the operation instruction stored in the memory 1004, the processor 1003 is configured to execute the following steps:
encrypting the original photo according to the key to obtain an encrypted photo;
decrypting the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo;
judging whether the state of the terminal equipment meets the preset condition of deleting the preview photo;
and if so, deleting the preview photo and the temporary data.
The input device 1001 is configured to, by calling an operation instruction stored in the memory 1004, execute the following steps:
and receiving a photo decryption instruction sent by a user.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (16)

1. A method of processing a photograph, comprising:
the terminal equipment encrypts the original photo according to the secret key to obtain an encrypted photo;
the terminal equipment receives a photo decryption instruction sent by a user;
the terminal equipment decrypts the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo;
the terminal equipment judges whether the state of the terminal equipment meets a preset condition for deleting the preview photo, wherein the preset condition for deleting the temporary data comprises the following steps: connecting an external storage device, and enabling a preset encrypted photo viewing program to exit a preview state or close a decryption function;
if so, deleting the preview photo and the temporary data by the terminal equipment;
the terminal equipment encrypts the original photo according to the key to obtain the encrypted photo, and the method comprises the following steps:
the terminal equipment generates secret data corresponding to the secret key according to a preset algorithm;
the terminal equipment encrypts the original photo according to the secret data and first pixel data to obtain the encrypted photo, wherein the first pixel data are a pixel set of the original photo, and the first pixel data and the secret data are respectively stored in different folders of a local database;
before the terminal device encrypts the native photo according to the secret data and the first pixel data to obtain the encrypted photo, the method further includes:
the terminal equipment receives a first instruction sent by a user, wherein the first instruction is used for indicating to run preset encryption camera software;
the terminal equipment calls an application layer to prompt the user whether to start an encryption function;
if yes, the terminal equipment generates the first pixel data through the preset encryption camera software;
and the terminal equipment is set to be in a use prohibition state in the running process of the encryption camera software.
2. The method of processing a photograph according to claim 1, wherein before the terminal device encrypts the original photograph in accordance with the key to obtain the encrypted photograph, the method further comprises:
the terminal device generates the key.
3. The method of processing a photograph according to claim 1, wherein before the terminal device encrypts the original photograph in accordance with the key to obtain the encrypted photograph, the method further comprises:
and the terminal equipment receives a key instruction sent by the user, wherein the key instruction carries the key.
4. The method of processing a photograph according to claim 1, wherein before the terminal device encrypts the native photograph based on the secret data and the first pixel data to obtain the encrypted photograph, the method further comprises:
the terminal equipment receives a second instruction sent by the user, wherein the second instruction is used for indicating that the original photo is encrypted;
and the terminal equipment acquires the first pixel data from the local database.
5. The photo processing method according to claim 1, wherein the terminal device decrypting the encrypted photo according to the key includes:
and the terminal equipment decrypts the encrypted photo according to the secret data and second pixel data, wherein the secret data corresponds to the secret key, and the second pixel data is a pixel set of the encrypted photo.
6. The method for processing photos of claim 5, wherein before the terminal device decrypts the encrypted photos according to the secret key, after the terminal device receives a command for decrypting the photos sent by a user, the method further comprises:
and the terminal equipment generates the second pixel data according to the encrypted photo.
7. The method for processing photos of claim 5, wherein before the terminal device decrypts the encrypted photos according to the secret key, after the terminal device receives a command for decrypting the photos sent by a user, the method further comprises:
and the terminal equipment acquires the second pixel data from the local database.
8. A photo processing method according to any one of claims 1 to 3, wherein after determining whether the state of the device satisfies a preset condition for deleting temporary data, the method further comprises:
and if not, the terminal equipment displays the preview photo.
9. A terminal device, comprising:
the encryption unit is used for encrypting the original photo according to the key to obtain an encrypted photo;
the first receiving unit is used for receiving a photo decryption instruction sent by a user;
the decryption unit is used for decrypting the encrypted photo according to the key to obtain temporary data and a preview photo, wherein the temporary data is a pixel set of the preview photo;
a judging unit, configured to judge whether a state of the terminal device satisfies a preset condition for deleting the preview picture, where the preset condition for deleting the temporary data includes: connecting an external storage device, and enabling a preset encrypted photo viewing program to exit a preview state or close a decryption function;
the deleting unit is used for deleting the preview photo and the temporary data by the terminal equipment if the preview photo and the temporary data are met;
the encryption unit includes:
the generating module is used for generating secret data corresponding to the secret key according to a preset algorithm;
the encryption module is used for encrypting the original photo according to the secret data and first pixel data to obtain the encrypted photo, wherein the first pixel data is a pixel set of the original photo, and the first pixel data and the secret data are respectively stored in different folders of a local database;
the terminal device further includes:
the third receiving unit is used for receiving a first instruction sent by a user, wherein the first instruction is used for indicating to run preset encryption camera software;
the prompting unit is used for calling an application layer to prompt whether the user starts an encryption function or not;
and a second generation unit, configured to generate the first pixel data through the preset encryption camera software if the first pixel data is the first pixel data.
10. The terminal device according to claim 9, wherein the terminal device further comprises:
a first generating unit configured to generate the key.
11. The terminal device according to claim 9, wherein the terminal device further comprises:
and the second receiving unit is used for receiving a key instruction sent by the user, wherein the key instruction carries the key.
12. The terminal device according to claim 9, wherein the terminal device further comprises:
a fourth receiving unit, configured to receive a second instruction sent by the user, where the second instruction is used to instruct to encrypt the native photo;
a first obtaining unit, configured to obtain the first pixel data from the local database.
13. The terminal device according to claim 9, wherein the decryption unit includes:
and the decryption module is used for decrypting the encrypted photo according to the secret data and second pixel data, the secret data corresponds to the secret key, and the second pixel data is a pixel set of the encrypted photo.
14. The terminal device according to claim 13, wherein the terminal device further comprises:
a third generating unit configured to generate the second pixel data from the encrypted photograph.
15. The terminal device according to claim 13, wherein the terminal device further comprises:
a second obtaining unit, configured to obtain the second pixel data from the local database.
16. The terminal device according to any one of claims 9 to 11, wherein the terminal device further comprises:
and the preview unit is used for displaying the preview photo by the terminal equipment if the preview photo does not meet the requirement.
CN201610891093.0A 2016-10-12 2016-10-12 Photo processing method and terminal equipment Active CN106650469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610891093.0A CN106650469B (en) 2016-10-12 2016-10-12 Photo processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610891093.0A CN106650469B (en) 2016-10-12 2016-10-12 Photo processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN106650469A CN106650469A (en) 2017-05-10
CN106650469B true CN106650469B (en) 2021-05-18

Family

ID=58855609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610891093.0A Active CN106650469B (en) 2016-10-12 2016-10-12 Photo processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN106650469B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680078A (en) * 2015-01-20 2015-06-03 中兴通讯股份有限公司 Method and system for taking photos and checking images and terminal
CN105279443A (en) * 2015-11-30 2016-01-27 东莞酷派软件技术有限公司 Picture encrypting and decrypting methods and devices
CN105279440A (en) * 2015-07-06 2016-01-27 深圳市美贝壳科技有限公司 Photo file encryption method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9059972B2 (en) * 2012-07-03 2015-06-16 International Business Machines Corporation Issuing, presenting and challenging mobile device identification documents

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680078A (en) * 2015-01-20 2015-06-03 中兴通讯股份有限公司 Method and system for taking photos and checking images and terminal
CN105279440A (en) * 2015-07-06 2016-01-27 深圳市美贝壳科技有限公司 Photo file encryption method
CN105279443A (en) * 2015-11-30 2016-01-27 东莞酷派软件技术有限公司 Picture encrypting and decrypting methods and devices

Also Published As

Publication number Publication date
CN106650469A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN104135605B (en) Photographic method and device
CN104933342B (en) A kind of picture inspection method and mobile terminal
JPWO2008010275A1 (en) Media data processing apparatus and media data processing method
KR20190104220A (en) Data backup methods and devices, storage media and servers
CN109688145B (en) Method and device for protecting privacy information
CN104253933A (en) Shooting method and device
CN104680078B (en) Method for shooting picture, method, system and terminal for viewing picture
US20190065790A1 (en) Method Of Displaying Content On A Screen Of An Electronic Processing Device
US10223537B2 (en) Method and electronic device for managing data
EP2835997A1 (en) Cell phone data encryption method and decryption method
CN109858274A (en) The method and apparatus that message is shown
JP6172866B2 (en) Agent for providing security cloud service and security key device for security cloud service
CN105681365B (en) Method and apparatus for file transmission
WO2017120745A1 (en) Method, device, and system for processing profile
CN112464268A (en) Computer data encryption system and method
KR102244504B1 (en) Apparatus and method for recovering deleted message using cache file
CN106897634B (en) Display method of burn-after-reading picture and terminal device
CN106650469B (en) Photo processing method and terminal equipment
CN107276874B (en) Network connection method, device, electronic equipment and storage medium
CN103067367A (en) Password hidden method and device and password retrieval method and device
KR101846163B1 (en) Method and system for protecting shared information
CN111314207B (en) Instant communication receiving method, device and equipment
CN114117488A (en) File management method, file uploading method, file decryption method and related equipment
CN106533898B (en) Mobile terminal device and control method
CN109063492A (en) Information processing method and device

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