Disclosure of Invention
The present invention provides a method and an apparatus for processing a picture, which are directed to solve the above-mentioned problems.
The technical scheme adopted by the invention for solving the technical problems is as follows: the invention provides a picture processing method, which is applied to a terminal and comprises the following steps:
detecting a control operation acting on a picture of the terminal;
if the control operation meets a preset condition, determining a region to be hidden of the picture according to the control operation and hiding the region to be hidden of the picture;
and encrypting the hidden area to be hidden according to a preset rule.
Preferably, the encrypting the to-be-hidden area which is hidden according to the preset rule includes:
acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored by the terminal according to the control operation;
generating an encryption key according to the fingerprint information;
encrypting the hidden area to be hidden by using the encryption key; or
Acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored by the terminal according to the control operation;
generating an encryption key according to the fingerprint information and the identity of the terminal;
and encrypting the hidden area to be hidden by utilizing the encryption key.
Preferably, the hiding the to-be-hidden area of the picture includes:
carrying out mosaic processing on the region to be hidden of the picture; or
And carrying out fuzzy processing on the region to be hidden of the picture.
Preferably, the picture processing method further includes:
if a sharing request is received, prompting to input verification information;
receiving verification information for the prompt input;
and if the verification information passes verification, decrypting the encrypted region to be hidden, and sharing the decrypted picture according to the sharing request.
Preferably, the picture processing method further includes:
if receiving the checking request, prompting to input verification information;
receiving verification information for the prompt input;
and if the verification information passes the verification, decrypting the encrypted region to be hidden and displaying the decrypted picture.
Preferably, the acquiring of the fingerprint information corresponding to the control operation includes:
and acquiring the fingerprint information according to the fingerprint identification area of the control operation control terminal.
The invention also constructs a picture processing device, which is applied to a terminal, and the picture processing device comprises:
the detection module is used for detecting control operation acting on the picture of the terminal;
the hiding processing module is used for determining a region to be hidden of the picture according to the control operation and hiding the region to be hidden of the picture when the control operation meets a preset condition;
and the encryption module is used for encrypting the hidden area to be hidden according to a preset rule.
Preferably, the encryption module includes:
the fingerprint acquisition unit is used for acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored in the terminal according to the control operation;
a key generating unit, configured to generate an encryption key according to the fingerprint information, or generate an encryption key according to the fingerprint information and an identity of the terminal;
and the encryption processing unit is used for encrypting the hidden area to be hidden by using the encryption key.
Preferably, the hiding processing module includes:
the mosaic processing unit is used for carrying out mosaic processing on the region to be hidden of the picture; or,
and the blurring processing unit is used for blurring the region to be hidden of the picture.
Preferably, the method further comprises the following steps:
the prompting module is used for prompting to input verification information when receiving a sharing request or a viewing request;
an input module for receiving verification information for the prompt input;
and the decryption module is used for decrypting the encrypted region to be hidden when the verification information passes the verification, and sharing the decrypted picture according to the sharing request or displaying the decrypted picture according to the viewing request.
By implementing the technical scheme of the invention, when a user needs to protect the privacy of some areas on the picture, the control operation meeting the preset conditions can be carried out on the picture, and then the area to be hidden can be determined according to the control operation and can be hidden and encrypted. Therefore, other people cannot see clear picture content, and the privacy protection of the picture is improved.
Detailed Description
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.
Referring to fig. 1, fig. 1 is a flowchart illustrating a first embodiment of a picture processing method according to the present invention, where the picture processing method of the embodiment can be applied to a terminal. The terminal includes, but is not limited to, a mobile phone, a tablet computer, a smart watch, a smart bracelet, MP3, MP4, and the like. The operating system of the terminal may include, but is not limited to, a flash operating system, an Android operating system, an IOS operating system, a Symbian operating system, a Black Berry operating system, a windows phone operating system, and the like. As shown in fig. 1, the picture processing method of this embodiment includes the following steps:
s10, detecting control operation acting on the picture of the terminal;
in this step, first, the picture of the terminal may be a picture currently taken by the user, a downloaded picture or a received picture, or a picture of a certain interface. Regarding the control operation of the user on the picture, it may be a click, a press, a slide, and the like, which are applied to the terminal screen for displaying the picture on the screen, where the click operation may include a single click, a double click, or multiple clicks, the press operation may include a short press, a long press, and a press operation with different pressure values (e.g., a heavy press, a light press), and the like, and the slide operation may slide along a straight line, may slide out a specific symbol, and the like.
S20, if the control operation meets a preset condition, determining a region to be hidden of the picture according to the control operation and hiding the region to be hidden of the picture;
in this step, when the terminal detects the control operation of the user, the control operation information may be output to a main controller or other processor or controller with data operation processing function built in the terminal, including but not limited to a microprocessor, a microcontroller, a digital signal processor, a microcomputer, a central processing unit, a field programmable gate array, a programmable logic device, a state machine, a logic circuit, an analog circuit, a digital circuit, and/or any device that operates signals (analog and/or digital) based on the operation instruction. Then, it is determined by the processor or the controller whether the control operation satisfies a preset condition.
The preset condition may be a default condition provided by the apparatus, or may also be preset by a user, for example, the user may set the preset condition when the terminal is powered on for the first time, or the terminal may set the preset condition after inputting a certain preset password in the using process, and the like, and the embodiment of the present invention is not limited. For example, in setting the preset condition, a combination of one or more of the following may be set: a pressure threshold for a control operation, a time threshold for a control operation, a particular region of a control operation, a sliding direction, etc.
The present invention can store the set preset conditions through various storage devices. Each memory device may be implemented by one or more memory components. Herein, the storage element may be, but is not limited to, a memory or a buffer. Memory may be, for example, Read-Only Memory (ROM), Random Access Memory (RAM), volatile Memory, persistent Memory, static Memory, volatile Memory, flash Memory, and/or any device that stores digital information.
In addition, the step of determining whether the control operation satisfies a preset condition includes determining whether any one or a combination of more of the following conditions is satisfied: controlling the pressure value corresponding to the operation to be greater than or equal to a preset pressure threshold value; the control operation is a sliding operation; the touch sliding direction of the control operation is consistent with the preset sliding direction; controlling the touch duration value of the operation to be greater than or equal to a preset duration threshold value; and controlling the touch frequency of the operation to be greater than or equal to a preset operation frequency threshold. Preferably, the control operation satisfies the preset conditions as follows: the control operation is a sliding operation and the corresponding pressure value is greater than or equal to a preset pressure threshold value.
In other embodiments, the control operation satisfies the preset condition: the control operation is a sliding operation, the pressure value corresponding to the sliding operation is greater than or equal to a preset pressure threshold, and the fingerprint information input by the sliding operation is preset fingerprint information. When the preset fingerprint information is the fingerprint information pre-stored by the terminal user, only the terminal user can hide the picture area covered by the sliding operation by performing the sliding operation on the picture.
When the control operation is judged to meet the preset condition, the area to be hidden of the picture can be further determined according to the control operation. When determining the region to be hidden of the picture, in a specific implementation manner, the touch region for controlling the operation may be directly determined as the region to be hidden of the picture. In another specific implementation manner, the area to be hidden of the picture may be determined according to the sliding track of the control operation, for example, the area covered by the sliding track is determined as the area to be hidden, or a closed area surrounded by the sliding track is determined as the area to be hidden. In another specific implementation manner, after the control operation is triggered, image recognition is automatically performed on the picture to recognize a sensitive area in the picture, for example, an account information area, a password information area, a privacy region area of a portrait, and the like.
When the area to be hidden is hidden, in a specific implementation manner, the area to be hidden of the picture may be subjected to mosaic processing, in the implementation manner, a preset mosaic size and/or strength is used for mosaic processing, and a user may further change the mosaic size and/or strength. In another specific implementation manner, the region to be hidden of the picture may be blurred.
In the above other embodiments, when the preset fingerprint information is fingerprint information pre-stored by the terminal user, only the terminal user may perform the hiding processing on the picture area covered by the sliding operation by performing the sliding operation on the picture.
And S30, encrypting the hidden area to be hidden according to a preset rule.
In this step, in addition to hiding the specific hidden area of the picture, the user cannot clearly view the hidden area of the picture, and the hidden area may be further encrypted, for example, the operation of releasing the hidden process on the area to be hidden is encrypted, so as to further improve the privacy protection of the picture. In addition, in the encryption process, the encryption process may be performed based on a password, fingerprint information, face feature information, iris information, or the like.
In one embodiment, step S30 may specifically include:
s31, acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored in the terminal according to the control operation;
in this step, acquiring fingerprint information corresponding to the control operation includes:
fingerprint information input by control operation is acquired. The control operation meeting the preset condition is, for example, a sliding operation with a certain force, the terminal supports full-screen fingerprint identification of the display screen, and when the sliding operation acting on a picture display area on the display screen is received, fingerprint information input by the sliding operation is acquired.
Or, the acquiring the fingerprint information corresponding to the control operation includes:
and acquiring the fingerprint information according to the fingerprint identification area of the control operation control terminal.
The terminal takes a mobile phone as an example, and the fingerprint identification area of the terminal can be an HOME key, a certain preset area on a display screen, a fingerprint identification area on the side surface and a fingerprint identification area on the back surface. And when the control operation meets the preset condition, triggering a fingerprint identification area of the terminal to acquire fingerprint information.
Or, the acquiring the fingerprint information corresponding to the control operation includes:
and acquiring fingerprint information stored by the terminal according to the control operation.
And when the control operation meets the preset condition, acquiring fingerprint information prestored by the user.
And S32, generating an encryption key according to the fingerprint information.
And S33, encrypting the hidden area to be hidden by using the encryption key.
In this embodiment, since the hidden area of the picture is subjected to the encryption processing, and the key used in the encryption processing is obtained according to the fingerprint information of the user, even if someone obtains the picture, the hidden area to be hidden of the picture cannot be correctly decrypted, so that the content of the area in the picture cannot be seen.
In another alternative embodiment, step S30 specifically includes:
s34, acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored in the terminal according to the control operation;
s35, generating an encryption key according to the fingerprint information and the identity of the terminal;
and S36, encrypting the hidden area to be hidden by using the encryption key.
In this embodiment, since the hidden area of the picture is subjected to encryption processing, and the key used in the encryption processing is obtained according to the fingerprint information of the user and the identity of the terminal, even if another person obtains the picture, the hidden area to be hidden of the picture cannot be correctly decrypted, so that the picture content in the hidden area cannot be seen. In an optional embodiment, the image processing method of the present invention further includes:
if a sharing request is received, prompting to input verification information;
receiving verification information for the prompt input;
and if the verification information passes verification, decrypting the encrypted region to be hidden, and sharing the decrypted picture according to the sharing request.
In this embodiment, after the user hides and encrypts the picture, the user may also share the picture, but before sharing, the hidden area of the picture needs to be decrypted, specifically: authentication information, such as fingerprint information, is first input according to the prompt. And after the terminal receives the verification information, verifying, and after the verification is passed, decrypting the encrypted hidden area, thereby canceling the hidden processing of the area aiming at the sharing request, and then sharing the decrypted picture. When the picture is viewed, the area is still hidden.
In an optional embodiment, the image processing method of the present invention further includes:
if receiving the checking request, prompting to input verification information;
receiving verification information for the prompt input;
and if the verification information passes the verification, decrypting the encrypted region to be hidden and displaying the decrypted picture.
In this embodiment, after the user performs the hiding processing and the encryption processing on the picture, the user can also view the picture, but before viewing, the hidden area of the picture needs to be decrypted, specifically: authentication information, such as fingerprint information, is first input according to the prompt. And after the terminal receives the verification information, verifying, and after the verification is passed, decrypting the encrypted hidden area, so that the hidden processing of the area is cancelled aiming at the viewing request, and then the picture content can be clearly seen. The next time viewing occurs, the area is still hidden from processing.
Referring to fig. 2, fig. 1 is a flowchart illustrating a first embodiment of a picture processing apparatus according to the present invention, where the picture processing apparatus of the embodiment can be applied to a terminal. The terminal includes, but is not limited to, a mobile phone, a tablet computer, a smart watch, a smart bracelet, MP3, MP4, and the like. The operating system of the terminal may include, but is not limited to, a flash operating system, an Android operating system, an IOS operating system, a Symbian operating system, a Black Berry operating system, a windows phone operating system, and the like. As shown in fig. 1, the picture processing system of this embodiment includes a detection module 11, a concealment processing module 12, and an encryption module 13, and the logical structure of each module is described below.
The detection module 11 is used for detecting a control operation acting on the picture of the terminal.
Specifically, first, the picture of the terminal may be a picture currently taken by the user, may also be a downloaded picture or a received picture, and may also be a picture of a certain interface. Regarding the control operation of the user on the picture, the control operation may be a click, a press, a slide operation and the like on the touch screen, wherein the click operation may include a single click, a double click, a multiple click and the like, the press operation may include a short press, a long press, a press operation with different pressure values (e.g., a heavy press, a light press) and the like, and the slide operation may slide along a straight line, may slide out a specific symbol and the like.
The hiding processing module 12 is configured to, when the control operation meets a preset condition, determine a region to be hidden of the picture according to the control operation and hide the region to be hidden of the picture.
Specifically, when the terminal detects a control operation of a user, the control operation information may be output to a main controller or other processor or controller with data operation processing function built in the terminal, including but not limited to a microprocessor, a microcontroller, a digital signal processor, a microcomputer, a central processing unit, a field programmable gate array, a programmable logic device, a state machine, a logic circuit, an analog circuit, a digital circuit, and/or any device that operates signals (analog and/or digital) based on operation instructions. Then, it is determined by the processor or the controller whether the control operation satisfies a preset condition.
The preset condition may be a default setting provided by the apparatus, or may be preset by a user, for example, the user may set the preset condition when the terminal is powered on for the first time, or the terminal may set the preset condition after inputting a certain preset password in the using process, and the like, which is not limited in the embodiment of the present invention. For example, in setting the preset condition, a combination of one or more of the following may be set: a pressure threshold for a control operation, a time threshold for a control operation, a particular region of a control operation, a sliding direction, etc.
The present invention can store the set preset conditions through various storage devices. Each memory device may be implemented by one or more memory components. Herein, the storage element may be, but is not limited to, a memory or a buffer. Memory may be, for example, Read-Only Memory (ROM), Random Access Memory (RAM), volatile Memory, persistent Memory, static Memory, volatile Memory, flash Memory, and/or any device that stores digital information.
In addition, the step of determining whether the control operation satisfies a preset condition includes determining whether any one or a combination of more of the following conditions is satisfied: controlling the pressure value corresponding to the operation to be greater than or equal to a preset pressure threshold value; the control operation is a sliding operation; the touch sliding direction of the control operation is consistent with the preset sliding direction; controlling the touch duration value of the operation to be greater than or equal to a preset duration threshold value; and controlling the touch frequency of the operation to be greater than or equal to a preset operation frequency threshold. Preferably, the control operation satisfies the preset conditions as follows: the control operation is a sliding operation and the corresponding pressure value is greater than or equal to a preset pressure threshold value.
In other embodiments, the control operation satisfies the preset condition: the control operation is a sliding operation, the pressure value corresponding to the sliding operation is greater than or equal to a preset pressure threshold, and the fingerprint information input by the sliding operation is preset fingerprint information. When the preset fingerprint information is the fingerprint information pre-stored by the terminal user, only the terminal user can hide the picture area covered by the sliding operation by performing the sliding operation on the picture.
When the control operation is judged to meet the preset condition, the area to be hidden of the picture can be further determined according to the control operation. When determining the region to be hidden of the picture, in a specific implementation manner, the touch region for controlling the operation may be directly determined as the region to be hidden of the picture. In another specific implementation manner, the area to be hidden of the picture may be determined according to the sliding track of the control operation, for example, the area covered by the sliding track is determined as the area to be hidden, or a closed area surrounded by the sliding track is determined as the area to be hidden. In yet another specific implementation, image recognition may be automatically performed on the picture to identify a sensitive area in the picture, for example, an account information area, a password information area, a privacy portion of a portrait, and the like.
When the area to be hidden is hidden, in a specific implementation manner, the hiding processing module 12 includes a mosaic processing unit, where the mosaic processing unit is configured to perform mosaic processing on the area to be hidden of the picture, and in this implementation manner, a preset mosaic size and/or a preset mosaic strength are used to perform mosaic processing, and a user may also change the mosaic size and/or the preset mosaic strength. In another specific implementation manner, the concealment processing module 12 includes a blurring processing unit, which is configured to perform blurring processing on a region to be concealed of the picture. The encryption module 13 is configured to encrypt the to-be-hidden area that has been hidden according to a preset rule.
Specifically, in addition to hiding a specific area of the picture, which makes a user unable to clearly view the hidden area of the picture, the hidden area may be further encrypted, for example, a release operation of the hiding process on the area to be hidden is encrypted, so as to further improve the privacy protection of the picture. In addition, in the encryption process, the encryption process may be performed based on a password, fingerprint information, face feature information, iris information, or the like.
In a particular embodiment, the encryption module may specifically include a fingerprint acquisition unit, a key generation unit, and an encryption processing unit. The fingerprint acquisition unit is used for acquiring fingerprint information corresponding to the control operation or acquiring fingerprint information stored in the terminal according to the control operation; the key generation unit is used for generating an encryption key according to the fingerprint information or generating an encryption key according to the fingerprint information and the identity of the terminal; the encryption processing unit is used for encrypting the hidden area to be hidden by using the encryption key.
Regarding the fingerprint acquisition unit, in one particular implementation, the fingerprint acquisition unit is configured to acquire fingerprint information of a control operation input. The control operation meeting the preset condition is, for example, a sliding operation with a certain force, the terminal supports full-screen fingerprint identification of the display screen, and when the sliding operation acting on a picture display area on the display screen is received, fingerprint information input by the sliding operation is acquired. In another specific implementation manner, the fingerprint acquisition unit is used for acquiring the fingerprint information according to a fingerprint identification area of the control operation control terminal. The terminal takes a mobile phone as an example, and the fingerprint identification area of the terminal can be an HOME key, a certain preset area on a display screen, a fingerprint identification area on the side surface and a fingerprint identification area on the back surface. And when the control operation meets the preset condition, triggering a fingerprint identification area of the terminal to acquire fingerprint information. In another specific implementation manner, the fingerprint obtaining unit is configured to obtain fingerprint information stored in the terminal according to the control operation. And when the control operation meets the preset condition, acquiring fingerprint information prestored by the user.
In this embodiment, in addition to hiding the specific area of the picture, the user cannot clearly view the hidden area of the picture, and the hidden area can be further encrypted, so as to further improve the privacy protection of the picture. In addition, in the encryption process, the encryption process may be performed based on fingerprint information, face feature information, iris information, and the like.
In an optional embodiment, the image processing apparatus of the present invention further includes a prompt module, an input module, and a decryption module, where the prompt module is configured to prompt to input authentication information when receiving a sharing request or a viewing request; the input module is used for receiving verification information input aiming at the prompt; the decryption module is used for decrypting the encrypted region to be hidden when the verification information passes the verification, and sharing the decrypted picture according to the sharing request or displaying the decrypted picture according to the viewing request.
After the user hides and encrypts the picture, the user can share or view the picture, but before sharing or viewing, the user needs to decrypt the hidden area of the picture, specifically: authentication information, such as fingerprint information, is first input according to the prompt. The terminal verifies after receiving the verification information, and after the verification is passed, the encrypted hidden area can be decrypted, so that the hidden processing of the area is cancelled for the current sharing or viewing, then the decrypted picture is shared or viewed, and when the picture is viewed again, the area is still hidden.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The modules or units or sub-units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, read only memory ROM, random access memory RAM, magnetic or optical disk, and the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.