CN115203720A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN115203720A
CN115203720A CN202210707278.7A CN202210707278A CN115203720A CN 115203720 A CN115203720 A CN 115203720A CN 202210707278 A CN202210707278 A CN 202210707278A CN 115203720 A CN115203720 A CN 115203720A
Authority
CN
China
Prior art keywords
image
desensitization
desensitized
frequency domain
user
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.)
Pending
Application number
CN202210707278.7A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210707278.7A priority Critical patent/CN115203720A/en
Publication of CN115203720A publication Critical patent/CN115203720A/en
Pending legal-status Critical Current

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/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • 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
    • H04L63/0457Network 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 wherein the sending and receiving network entities apply dynamic encryption, e.g. stream encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the specification provides an image processing method and an image processing device, wherein the image processing method comprises the following steps: inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image; encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image; sending the encrypted desensitized image and the encryption key to a server.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method and apparatus.
Background
With the continuous development of internet technology, network information resources are also continuously enriched, and the field of application of visual information such as images is also wider and wider, wherein user image information is more used for identification, authentication and the like, but many image information contain sensitive information such as privacy and the like, so that privacy data are easily leaked due to malicious stealing, and for the purpose, how to better manage user image data is more and more concerned.
Disclosure of Invention
One or more embodiments of the present specification provide an image processing method applied to a user terminal, the method including: inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: and carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image. And encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image. Sending the encrypted desensitized image and the encryption key to a server.
One or more embodiments of the present specification provide another image processing method applied to a server, the method including: receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after encrypting a desensitization image obtained by performing image desensitization processing on a user image by using the encryption key. And decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image. And carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image. And if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
One or more embodiments of the present specification provide an image processing apparatus, operating in a user terminal, the apparatus including: the image desensitization processing module is configured to input the user image into the image desensitization model for image desensitization processing and output a desensitization image; the image desensitization process includes: and carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image. An image encryption module configured to encrypt the desensitized image using an encryption key to obtain an encrypted desensitized image. A desensitization image sending module configured to send the encryption desensitization image and the encryption key to a server.
One or more embodiments of the present specification provide another image processing apparatus, operating on a server, the apparatus including: the desensitization image receiving module is configured to receive an encryption desensitization image and an encryption key sent by a user terminal; the encryption desensitization image is obtained after the encryption desensitization image obtained by carrying out image desensitization processing on the user image is encrypted by using the encryption key. And the image decryption module is configured to decrypt the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image. A living body detection module configured to perform image living body detection on the desensitization image according to a biological feature detection result of the desensitization image. And if the image living body detection is passed, operating a nuclear body processing module, wherein the nuclear body processing module is configured to perform nuclear body processing on the user according to the desensitization image.
One or more embodiments of the present specification provide an image processing apparatus including: a processor; and a memory configured to store computer-executable instructions that, when executed, cause the processor to: inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: and carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image. And encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image. Sending the encrypted desensitized image and the encryption key to a server.
One or more embodiments of the present specification provide another image processing apparatus including: a processor; and a memory configured to store computer-executable instructions that, when executed, cause the processor to: receiving an encryption desensitization image and an encryption key sent by a user terminal; the encryption desensitization image is obtained after the encryption desensitization image obtained by carrying out image desensitization processing on the user image is encrypted by using the encryption key. And decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image. And carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image. And if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
One or more embodiments of the present specification provide a storage medium storing computer-executable instructions that, when executed by a processor, implement the following: inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: and carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image. And encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image. Sending the encrypted desensitized image and the encryption key to a server.
One or more embodiments of the present specification provide another storage medium storing computer-executable instructions that, when executed by a processor, implement the following: receiving an encryption desensitization image and an encryption key sent by a user terminal; the encryption desensitization image is obtained after the encryption desensitization image obtained by carrying out image desensitization processing on the user image is encrypted by using the encryption key. And decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image. And carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image. And if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
Drawings
In order to more clearly illustrate one or more embodiments or technical solutions in the prior art in the present specification, 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 described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise;
FIG. 1 is a flowchart of a processing method of an image processing method according to one or more embodiments of the present disclosure;
FIG. 2 is a schematic diagram of a user image provided in one or more embodiments of the present disclosure;
FIG. 3 is a schematic illustration of a process image during a desensitization process provided by one or more embodiments of the present disclosure;
FIG. 4 is a schematic illustration of a desensitized image provided by one or more embodiments of the present disclosure;
FIG. 5 is a timing diagram of processing of an image processing method applied to an image desensitization scene according to one or more embodiments of the present disclosure;
FIG. 6 is a flow diagram of another image processing method according to one or more embodiments of the present disclosure;
FIG. 7 is a schematic diagram of an image processing apparatus according to one or more embodiments of the present disclosure;
FIG. 8 is a schematic diagram of another image processing apparatus provided in one or more embodiments of the present disclosure;
fig. 9 is a schematic structural diagram of an image processing apparatus according to one or more embodiments of the present disclosure;
fig. 10 is a schematic structural diagram of another image processing apparatus provided in one or more embodiments of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
An embodiment of an image processing method provided in this specification:
referring to fig. 1, the image processing method provided in this embodiment is applied to a user terminal, and specifically includes steps S102 to S106.
And step S102, inputting the user image into the image desensitization model for image desensitization processing, and outputting a desensitization image.
The image processing method provided by this embodiment implements core processing on a user by using a desensitization image obtained by performing image desensitization on a user image, so as to ensure privacy security of the user by using image desensitization, and specifically, performs image desensitization on the user image by using an image desensitization model, encrypts the desensitization image obtained by the image desensitization processing by using an encryption key to obtain an encrypted desensitization image, and on this basis, sends the encrypted desensitization image and the encryption key to a server to complete core processing on the user at the server, so as to implement hiding or filtering of sensitive information in user image information according to the image desensitization processing on the user image, and further performs core processing on the user by using the hidden or filtered image, thereby ensuring privacy security of the user, avoiding the benefit and damage of the user, and improving user experience.
The user image in this embodiment includes, but is not limited to: a biometric image of the user, a body position image of the user; the biometric image of the user includes, but is not limited to: a face image of a user and a face partial image of the user; as shown in the user image diagram of fig. 2, the entire image includes user images of a plurality of users.
The image processing method provided in this embodiment may perform image processing on 1 user image, and may also perform image processing on a plurality of user images in batch, in this embodiment, the processes of performing image desensitization processing on an image, performing image encryption on the desensitized image, and sending the encrypted desensitized image to the server are described with the user images as 1, and the process of performing image processing on a plurality of user images in batch is similar to that of 1 user image, and is not described herein again.
In practical application, the user image is directly used for executing business operation, which may cause harm to the privacy security of the user, for example, the user image is used for identity recognition, and the user image is used for verification payment.
Wherein the image desensitization processing comprises: and carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image.
Specifically, the following describes in detail an implementation process of performing image desensitization processing on a user image by using an image desensitization model.
(1) Frequency domain transformation
In an optional implementation manner provided by this embodiment, in the process of obtaining frequency domain information by performing frequency domain transformation on a user image, the following operations are performed:
the user image is segmented to obtain image blocks, and pixel values of pixel points in the image blocks are extracted to construct a pixel value matrix;
and performing frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and performing channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix as the frequency domain information.
The pixel value matrix refers to a matrix constructed by pixel values of pixels in an image block, that is, values in the matrix include pixel values of pixels in the image block, and the pixel value matrix may also be other data structures, such as a pixel value array and a pixel value sequence.
The frequency domain transformation is a transformation from a spatial domain (time domain) to a frequency domain, such as BDCT (Block Discrete Cosine Transform), which transforms information in the spatial domain to the frequency domain, and has good decorrelation performance.
The frequency coefficient matrix includes a matrix constructed by frequency coefficients generated by performing frequency domain Transform on pixel values, the frequency coefficients in the frequency coefficient matrix include direct current coefficients, low frequency coefficients and high frequency coefficients, such as DCT (Discrete Cosine Transform) coefficients generated by performing frequency domain Transform on pixel values, the DCT coefficient matrix is constructed by DCT coefficients, and the frequency coefficient matrix may also be other data structures, such as frequency coefficient arrays and frequency coefficient sequences.
The channel decomposition includes dividing frequency coefficients of the same frequency into the same frequency channel, where the frequency domain channel refers to a channel divided according to frequency size, such as a direct current channel, a low frequency channel, a high frequency channel, and further such as a 30Hz channel and a 200Hz channel; the decomposition matrix refers to a matrix generated after dividing the frequency coefficients of the same frequency into the same frequency channel, and may also be other data structures, such as a decomposition array and a decomposition sequence.
The frequency domain information refers to the relevant frequency domain information generated after the user image is transformed through the frequency domain, and comprises the decomposition matrix.
Specifically, the user image is divided according to preset division parameters to obtain image blocks, for example, the size of the user image is 122 × 122, the preset division parameters are 8*8, the user image is divided into a plurality of 8*8 image blocks, the minimum unit forming the image is a pixel point, a pixel value of each pixel point in the image is extracted, a pixel value matrix is constructed by using the extracted pixel value, frequency domain transformation is performed on the pixel value in the pixel value matrix to obtain a frequency coefficient, a frequency coefficient matrix is constructed by using the frequency coefficient, the frequency coefficients with the same frequency are divided into the same frequency channel to obtain a decomposition matrix, the decomposition matrix is used as frequency domain information, and the image information has strong correlation in a spatial domain, so that the correlation of the image information is reduced by performing the frequency domain transformation on the user image, and the convenience of image processing is improved.
(2) Frequency domain information filtering
On the basis that the user image is segmented to obtain an image block, pixel values of pixel points in the image block are extracted to construct a pixel value matrix, the pixel value matrix is subjected to frequency domain transformation to obtain a frequency coefficient matrix, and the frequency coefficient matrix is subjected to channel decomposition to obtain a decomposition matrix, which is used as frequency domain information, in an optional implementation manner provided by this embodiment, in the process of filtering channel frequency domain information of a preset frequency channel in the frequency domain information according to a preset filtering parameter, the following operations are performed:
distributing weights to channel coefficients in the decomposition matrix according to preset channel weights;
filtering the channel coefficients of the preset frequency channels in the decomposition matrix according to the distributed weights to obtain a residual matrix;
and updating the channel position of the channel coefficient in the residual matrix to obtain a target matrix.
The channel frequency domain information comprises frequency domain information of a preset frequency channel; the preset channel weight comprises preset weight distributed to each frequency channel; the channel coefficients comprise frequency coefficients of all frequency channels; the preset frequency channel refers to a preset frequency channel for filtering, the preset frequency channel may be a direct current channel and a high frequency channel, or a direct current channel, a partial low frequency channel and a partial high frequency channel, and the form and number of the specific preset frequency channel are not specifically limited herein.
For example, if there are 1 dc channel, 20 low frequency channels, 25 intermediate frequency channels and 18 high frequency channels, and the preset channel weights are dc channel 0, low frequency channel 1, intermediate frequency channel 1 and high frequency channel 0, then assigning weights to the channel coefficients in the decomposition matrix, filtering the channel coefficients of the dc channel and the high frequency channels in the decomposition matrix according to the assigned weights to obtain a residual matrix, and performing channel position update on the channel coefficients of the low frequency channels and the intermediate frequency channels in the residual matrix, specifically, updating the channel coefficients of the low frequency channels and the intermediate frequency channels in the residual matrix to the high frequency channels to obtain a target matrix; the channel coefficient of the preset frequency channel is filtered, the effect of extracting the summary information of the user image is achieved, the privacy information in the user image is filtered, meanwhile, due to the fact that human eyes have higher sensitivity to low-frequency information and are not strong in sensitivity to high-frequency information, channel position updating is conducted on the residual channel coefficient, the effect of removing visualization is achieved, the privacy information in the user image is hidden, other users can not be identified by naked eyes, and privacy safety of the users is guaranteed.
The process image diagram in the desensitization process shown in fig. 3 specifically represents an image determined from the residual matrix, namely: the method comprises the steps of carrying out frequency domain transformation on a user image to obtain a frequency coefficient matrix, carrying out channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix, filtering channel coefficients of a preset frequency channel in the decomposition matrix to obtain a residual matrix, and determining an image according to the residual matrix.
(3) Frequency domain inverse transform
After the frequency domain transformation and the channel frequency domain information filtering are carried out on the user image, the user image is processed in the frequency domain, and then the frequency domain inverse transformation is carried out according to the target frequency domain information obtained by the channel frequency domain information filtering so as to transform the frequency domain to the space domain.
In the foregoing, on the basis that an image block is obtained by performing segmentation processing on a user image, a pixel value matrix is constructed by extracting pixel values of pixel points in the image block, a frequency coefficient matrix is obtained by performing frequency domain transformation on the pixel value matrix, a decomposition matrix is obtained by performing channel decomposition on the frequency coefficient matrix and is used as frequency domain information, and filtering of channel coefficients of a preset frequency channel and updating of channel positions of channel coefficients in a residual matrix are performed according to an allocation weight, in an optional implementation manner provided in this embodiment, in a process of obtaining a desensitized image by performing inverse frequency domain transformation on target frequency domain information obtained by filtering, the following operations are performed:
carrying out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix;
and carrying out quantization processing on the image pixel values in the image pixel value matrix, and determining the desensitized image according to the quantization processing result.
Wherein, the inverse frequency domain Transform refers to transforming from a frequency domain to a spatial domain, such as an IDCT (inverse Discrete Cosine Transform), and transforming information of the frequency domain to the spatial domain; and the image pixel value matrix comprises a matrix constructed by image pixel values generated by performing frequency domain inverse transformation on the channel coefficients in the target matrix.
Specifically, after the user image is processed in the frequency domain, performing inverse frequency domain transformation, specifically performing inverse frequency domain transformation on the target matrix, transforming the channel coefficients of the target matrix from the frequency domain to the spatial domain, generating image pixel values, constructing an image pixel value matrix from the image pixel values, and performing quantization processing on the image pixel values in the image pixel value matrix, so as to further reduce the privacy information in the user image through quantization processing on the basis of the filtering of the channel frequency domain information and the updating of the channel position; the desensitized image is shown schematically in fig. 4, and is shown as a desensitized image determined from the quantification process.
In addition, in the process of obtaining the desensitized image by performing frequency domain inverse transformation on the target frequency domain information obtained by filtering, frequency domain inverse transformation can be performed only on the target matrix to obtain an image pixel value matrix, and the desensitized image is determined according to the image pixel value matrix.
In addition, in order to improve the image accuracy of the desensitized image and avoid that the subsequent kernel processing cannot be accurately performed due to excessive information loss of image information in the process of kernel processing for a user, and the result of the kernel processing is affected, in an optional implementation manner provided in this embodiment, the user image is segmented to obtain an image block, pixel values of pixels in the image block are extracted to construct a pixel value matrix, frequency domain transformation is performed on the pixel value matrix to obtain a frequency coefficient matrix, channel decomposition is performed on the frequency coefficient matrix to obtain a decomposition matrix as frequency domain information, filtering of channel coefficients of a preset frequency channel and updating of channel positions of channel coefficients in a residual matrix are performed according to assigned weights, and on the basis of performing inverse frequency transformation and quantization processing on a target matrix, the following operations are further performed:
and performing pixel mapping on the image pixel values in the image pixel value matrix to obtain mapped image pixel values and construct a mapped image pixel value matrix.
Wherein the pixel mapping comprises mapping an image pixel value in a matrix of image pixel values to another image pixel value; the pixel mapping may be performed using a convolutional network.
In addition, in the process of carrying out frequency domain inverse transformation on the target frequency domain information obtained by filtering to obtain a desensitized image, frequency domain inverse transformation can be carried out on a target matrix to obtain an image pixel value matrix; performing pixel mapping on image pixel values in the image pixel value matrix to obtain mapped image pixel values and construct a mapped image pixel value matrix; and carrying out quantization processing on the image pixel values in the mapped image pixel value matrix, and determining a desensitized image according to the quantization processing result.
It is necessary to supplement that, the process of performing image desensitization processing on the user image by using the image desensitization model may also be divided into performing frequency domain transformation on the user image to obtain frequency domain information, filtering frequency domain information of a preset frequency channel, performing channel position update on the residual frequency domain information obtained by filtering to obtain target frequency domain information, performing frequency domain inverse transformation, pixel mapping and quantization processing on the target frequency domain information.
And step S104, encrypting the desensitized image by using the encryption key to obtain an encrypted desensitized image.
In the step, the desensitization image is encrypted by using the encryption key to obtain the encrypted desensitization image so as to reduce the risk of revealing the desensitization image and ensure the privacy security of the user.
The encrypted desensitized image in this embodiment refers to an encrypted desensitized image.
In the specific implementation process, in order to enhance the information security of the desensitized image, the encryption key can be used for encrypting the desensitized image, the obtained encrypted desensitized image is used for transmission, the information leakage of the desensitized image is avoided, and in the process of encrypting the desensitized image by using the encryption key, two layers of encryption keys can be used for image encryption for further enhancing the information security of the desensitized image. Specifically, in an optional implementation manner provided by this embodiment, in the process of encrypting the desensitized image by using the encryption key to obtain the encrypted desensitized image, the following operations are performed:
encrypting the desensitized image by using a first public key of a first encryption algorithm to obtain an encrypted desensitized image;
correspondingly, after the desensitization image is encrypted by using the first public key of the first encryption algorithm to obtain the encrypted desensitization image, the following operations are further performed:
and encrypting the first public key by using a second public key of a second encryption algorithm to obtain an encrypted first public key.
For example, the first encryption algorithm is an SM4 symmetric encryption algorithm, the SM4 symmetric encryption algorithm is used for realizing the encryption rapidness, the second encryption algorithm is an SM2 asymmetric encryption algorithm, the SM2 asymmetric encryption algorithm is used for realizing the encryption safety, and the encryption efficiency is improved and the safety of the encrypted desensitized image is also improved.
And step S106, sending the encryption desensitization image and the encryption key to a server.
In the step, the encrypted desensitized image and the encryption key are sent to the server.
During specific implementation, after the encrypted desensitized image and the encryption key are sent to the server, the server receives the encrypted desensitized image and the encryption key, decrypts the encrypted desensitized image to obtain the desensitized image, performs image living body detection on the desensitized image according to a biological feature detection result of the desensitized image, and performs core body processing on a user under the condition that the image living body detection is determined to pass through, so that the core body processing effectiveness is improved, part of users are prevented from performing core body processing by using non-living body images, and the information safety is improved.
In addition, after the server receives the encryption desensitization image and the encryption key, the encryption desensitization image and the encryption key can be stored, or when a user registers for service for the first time, the user terminal acquires the user image, the image desensitization model is used for carrying out image desensitization on the user image to obtain a desensitization image, the encryption key is used for encrypting the desensitization image to obtain an encryption desensitization image, the encryption desensitization image and the encryption key are sent to the server, the server decrypts the encryption desensitization image by using the decryption key corresponding to the encryption key to obtain the desensitization image, the desensitization image is subjected to living body image detection according to a biological feature detection result of the desensitization image, if the living body detection of the image passes, the encryption key is used for encrypting the desensitization image and storing the encryption desensitization image and the encryption key, and if the living body detection of the image does not pass, the processing is not carried out.
In a specific implementation procedure, in an optional implementation manner provided by this embodiment, after receiving the encryption desensitization image and the encryption key, the server performs the following operations:
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image;
and if the image living body detection is not passed, sending a nuclear failure prompt to the user terminal or not processing.
Specifically, the above provides that image encryption is performed by using two layers of encryption keys, and on this basis, in an optional implementation manner provided by this embodiment, in the process of obtaining a desensitized image by decrypting an encrypted desensitized image by using a decryption key corresponding to an encryption key, the server performs the following operations:
decrypting the encrypted first public key by using a second private key corresponding to the second public key to obtain the first public key;
and decrypting the encrypted desensitized image by using a first private key corresponding to the first public key to obtain the desensitized image.
In an optional implementation manner provided by this embodiment, on the basis that the server decrypts the encrypted desensitized image to obtain a desensitized image, performs image live detection on the desensitized image, and performs core processing on the user according to the desensitized image, the biometric detection result is obtained by:
carrying out biological characteristic detection on the desensitization image to obtain boundary information of a biological characteristic image block in the desensitization image; and detecting the pixel coordinate information of the key feature points in the biological feature image block according to the boundary information.
And the biological characteristic detection result comprises boundary information of the biological characteristic image block and/or pixel coordinate information of the key characteristic point.
The boundary information comprises coordinate information of boundary pixel points of the biological characteristic image blocks; the biological feature detection comprises detecting a feature region of a biological feature in a desensitized image, such as detecting a human face region in the desensitized image, and the biological feature detection may use a biological feature detection model, such as a human face detection model; the biological feature image block comprises a feature area of a biological feature, such as a human face area.
The key feature points comprise key biological feature points, such as eye points, nose points and mouth points, and can also be other body part points, such as palm points; the pixel coordinate information comprises coordinate information of pixel points corresponding to the key characteristic points; it should be noted that the key feature point is composed of at least one pixel point.
For example, the server detects a face region in the desensitized image by using the face detection model, obtains boundary information of a face image block in the desensitized image, and detects coordinate information of pixel points corresponding to an eye point, a nose point, a mouth point and the like in the face image block according to the boundary information of the face image block.
The server decrypts the encrypted desensitized image to obtain a desensitized image, performs image living body detection on the desensitized image and performs core processing on the user according to the desensitized image, and on the basis of obtaining a biological characteristic detection result of the desensitized image, performs image living body detection on the desensitized image according to the biological characteristic detection result, and performs core processing on the user according to the desensitized image under the condition that the image living body detection passes through, particularly under the condition that the desensitized image is the living body image, so that the core processing is performed on the user by using the living body image, the core processing effectiveness is ensured, and the core processing efficiency and precision are improved.
In the process of performing the coring processing on the user according to the desensitized image, this embodiment provides an optional implementation manner, in which the server performs the following operations:
affine transformation is carried out on the desensitization image based on the pixel coordinate information of the key feature points, and an affine desensitization image is obtained;
cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed;
and performing nuclear body treatment on the user according to the to-be-treated desensitization image.
The affine desensitization image is a desensitization image subjected to affine transformation; the preset cutting parameters refer to preset cutting parameters, such as 100 × 100; the affine transformation refers to transformation which can arbitrarily incline the image and allow the image to be arbitrarily stretched in two directions.
Specifically, the server can judge whether to perform affine transformation on the desensitized image according to the pixel coordinate information of the key feature points, if so, perform affine transformation on the desensitized image based on the pixel coordinate information of the key feature points to obtain an affine desensitized image, for example, perform affine transformation on the desensitized image according to the coordinate information of pixel points corresponding to eye points, nose points, mouth points and the like to obtain an affine desensitized image, perform cutting processing on the affine desensitized image to obtain a desensitized image to be processed, and perform kernel processing on a user according to the desensitized image to be processed; if not, the desensitization image is cut according to preset cutting parameters to obtain a desensitization image to be processed, and the user is subjected to core processing according to the desensitization image to be processed.
Through carrying out affine transformation on the desensitized image, the image angle of the desensitized image is corrected, the positions of key feature points are adjusted, for example, the desensitized face image on the side surface is adjusted to be the front desensitized face image, the image precision of the desensitized image is improved, and through carrying out cutting processing on the affine desensitized image, image information irrelevant to core processing, such as background information in the desensitized face image, is removed, the core processing is convenient to carry out, and the core processing efficiency and the throughput rate are improved.
In the above-mentioned process of performing the coring processing on the user according to the desensitized image to be processed, in an optional implementation manner provided by this embodiment, on the basis of obtaining the biometric detection result, performing affine transformation and cropping processing on the desensitized image, and performing the coring processing, the server performs the following operations:
extracting the image features of the desensitized image to be processed, and generating feature vectors of the image features;
calculating the distance between the feature vector and the feature vector of the preset image feature of the user;
determining a core processing result of the user based on the distance.
The distance here includes a cosine distance.
Specifically, after calculating the distance between the feature vector and the feature vector of the preset image feature of the user, the server may determine the core processing result of the user according to the calculated distance, and if the distance is greater than or equal to the distance threshold, determine that the core processing of the user passes; and if the distance is smaller than the distance threshold, determining that the core processing of the user is not passed.
In addition, after receiving the encrypted desensitized image and the encryption key, the server can also decrypt the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image; carrying out biological characteristic detection on the desensitization image, and carrying out image living body detection on the desensitization image according to a biological characteristic detection result; and if the image living body detection passes, performing core body processing on the user according to the desensitization image, and if the image living body detection does not pass, sending a core body failure prompt to the user terminal or not performing the processing.
In addition, in order to carry out core processing on the user, the server can extract the image features of the desensitization image to be processed and generate feature vectors of the image features; encrypting the feature vector and storing the encrypted feature vector obtained by encryption; in addition, when a user registers for service for the first time, the user terminal acquires a user image, image desensitization is carried out on the user image by using an image desensitization model to obtain a desensitization image, an encryption key is used for encrypting the desensitization image to obtain an encryption desensitization image, the encryption desensitization image and the encryption key are sent to the server, the server decrypts the encryption desensitization image by using a decryption key corresponding to the encryption key to obtain the desensitization image, image living body detection is carried out on the desensitization image according to a biological feature detection result of the desensitization image, if the image living body detection passes, image features of the desensitization image to be processed are extracted to generate feature vectors of the image features, the feature vectors are encrypted and the encrypted feature vectors obtained by encryption are stored, and if the image living body detection does not pass, the processing is not carried out.
The following further describes the image processing method provided in this embodiment by taking an application of the image processing method provided in this embodiment to an image desensitization scene as an example, and referring to fig. 5, the image processing method applied to the image desensitization scene specifically includes the following steps.
Step S502, the face image of the user is segmented to obtain image blocks, and pixel values of pixel points in the image blocks are extracted to construct a pixel value matrix.
Step S504, the frequency domain transformation is carried out on the pixel value matrix to obtain a frequency coefficient matrix, and the channel decomposition is carried out on the frequency coefficient matrix to obtain a decomposition matrix.
Step S506, distributing weights to the channel coefficients in the decomposition matrix according to the preset channel weights, and filtering the channel coefficients of the preset frequency channels in the decomposition matrix according to the distributed weights to obtain a residual matrix.
And step S508, channel position updating is carried out on the channel coefficients in the residual matrix to obtain a target matrix.
Step S510, performing inverse frequency domain transformation on the target matrix to obtain an image pixel value matrix.
Step S512, performing pixel mapping on the image pixel values in the image pixel value matrix to obtain a mapped image pixel value matrix constructed by the mapped image pixel values.
Step S514, the image pixel values in the mapped image pixel value matrix are quantized, and the face desensitization image is determined according to the quantization processing result.
Step S516, the first public key of the first encryption algorithm is used for encrypting the face desensitization image to obtain an encrypted face desensitization image, and the second public key of the second encryption algorithm is used for encrypting the first public key to obtain an encrypted first public key.
And step S518, sending the encrypted face desensitization image, the encrypted first public key and the second public key to a server.
The server decrypts the encrypted first public key by using a second private key corresponding to the second public key to obtain a first public key, and decrypts the encrypted face desensitization image by using the first private key corresponding to the first public key to obtain a face desensitization image; carrying out face detection on a face desensitization image to obtain boundary information of a face image block in the desensitization image, and detecting pixel coordinate information of key feature points in the face image block according to the boundary information; carrying out image living body detection on the face desensitization image according to the boundary information of the face image block; if the image living body detection passes, carrying out affine transformation on the face desensitization image based on the pixel coordinate information of the key feature points to obtain an affine desensitization image, and if the image living body detection does not pass, sending a core failure prompt to a user terminal or not carrying out processing; cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed; and performing nuclear body treatment on the user according to the desensitization image to be treated.
In summary, in the image processing method provided in this embodiment, firstly, a user image is segmented to obtain an image block, and pixel values of pixel points in the image block are extracted to construct a pixel value matrix; carrying out frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and carrying out channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix; distributing weights to channel coefficients in the decomposition matrix according to preset channel weights; filtering channel coefficients of a preset frequency channel in the decomposition matrix according to the distributed weights to obtain a residual matrix; channel positions of channel coefficients in the residual matrix are updated to obtain a target matrix;
secondly, performing frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix; performing pixel mapping on image pixel values in the image pixel value matrix to obtain mapped image pixel values and construct a mapped image pixel value matrix; quantizing the image pixel values in the mapped image pixel value matrix, and determining a desensitized image according to the quantization processing result;
finally, encrypting the desensitized image by using a first public key of a first encryption algorithm to obtain an encrypted desensitized image; encrypting the first public key by using a second public key of a second encryption algorithm to obtain an encrypted first public key; sending the encrypted desensitized image and the encrypted first public key to a server; therefore, the hiding or filtering of sensitive information in the user image information is realized according to the image desensitization processing of the user image, and then the hidden or filtered image is utilized to carry out self-checking processing on the user at the server, so that the privacy safety of the user is guaranteed, the rights and interests of the user are prevented from being damaged, and the user experience is improved.
The implementation process of the image processing method applied to the image desensitization scene provided by the following method embodiment is executed by a server, and the two are matched with each other in the execution process, so that please refer to the corresponding contents of the following method embodiment for reading the implementation process.
Another embodiment of an image processing method provided in this specification:
in the above embodiment, an image processing method is provided, which is applied to a user terminal, and in cooperation therewith, the embodiment further provides another image processing method, which is applied to a server, and the following description is made with reference to the accompanying drawings.
Referring to fig. 6, the image processing method provided in this embodiment is applied to a server, and specifically includes steps S602 to S608.
Step S602, receiving the encryption desensitized image and the encryption key sent by the user terminal.
The image processing method provided by the embodiment receives an encrypted desensitized image and an encryption key sent by a user terminal, decrypts the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image, performs image living body detection on the desensitized image by using a biological feature detection result of the desensitized image on the basis, and performs self-check processing on the user according to the desensitized image under the condition that the image living body detection passes, so that the hiding or filtering of sensitive information in user image information is realized according to the image desensitized processing on the user image, and then performs self-check processing on the user by using the hidden or filtered image, thereby ensuring the privacy security of the user, avoiding the rights and interests of the user from being damaged, and improving the user experience.
Wherein the user images include, but are not limited to: a biometric image of the user, a body position image of the user; the biometric image of the user includes, but is not limited to: a face image of a user, a face partial image of the user, such as a user image schematic diagram shown in fig. 2, where the whole image includes user images of a plurality of users; the encrypted desensitization image is obtained after encrypting a desensitization image obtained by performing image desensitization processing on a user image by using the encryption key.
The image processing method provided in this embodiment may perform image processing on 1 user image, and may also perform image processing on a plurality of user images in batch, where in this embodiment, 1 user image is taken as an example, and a process of performing image processing on a plurality of user images in batch is similar to that of 1 user image, and is not described herein again.
In practical application, directly using a user image to execute business operation may cause harm to the privacy security of a user, for example, using the user image to perform identity recognition, and using the user image to perform verification payment, based on which, in order to ensure the privacy security of the user, after a user terminal collects the user image, an image desensitization model is used to perform image desensitization processing on the user image so as to hide or remove privacy information in the user image, and obtain a desensitization image of the user image.
In an optional implementation manner provided by this embodiment, the image desensitization processing includes:
carrying out frequency domain transformation on the user image to obtain frequency domain information;
filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter;
and performing frequency domain inverse transformation on the target frequency domain information obtained by filtering to obtain the desensitized image.
Specifically, the following describes in detail the implementation process of the user terminal performing image desensitization processing on the user image by using the image desensitization model.
(1) Frequency domain transformation
In an optional implementation manner provided by this embodiment, in the process of obtaining frequency domain information by performing frequency domain transformation on a user image, the user terminal performs the following operations:
the user image is segmented to obtain image blocks, and pixel values of pixel points in the image blocks are extracted to construct a pixel value matrix;
and performing frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and performing channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix as the frequency domain information.
The pixel value matrix refers to a matrix constructed by pixel values of pixels in an image block, that is, values in the matrix include pixel values of pixels in the image block.
The frequency domain transformation is a transformation from a spatial domain (time domain) to a frequency domain, such as BDCT (Block Discrete Cosine Transform), which transforms information in the spatial domain to the frequency domain, and has good decorrelation performance.
The frequency coefficient matrix includes a matrix constructed by frequency coefficients generated by performing frequency domain Transform on pixel values, the frequency coefficients in the frequency coefficient matrix include direct current coefficients, low frequency coefficients and high frequency coefficients, such as DCT (Discrete Cosine Transform) coefficients generated by performing frequency domain Transform on pixel values, the DCT coefficient matrix is constructed by DCT coefficients, and the frequency coefficient matrix may also be other data structures, such as frequency coefficient arrays and frequency coefficient sequences.
The channel decomposition includes dividing frequency coefficients of the same frequency into the same frequency channel, where the frequency domain channel refers to a channel divided according to frequency size, such as a direct current channel, a low frequency channel, a high frequency channel, and further such as a 30Hz channel and a 200Hz channel; the decomposition matrix refers to a matrix generated after dividing the frequency coefficients of the same frequency into the same frequency channel, and may also be other data structures, such as a decomposition array and a decomposition sequence.
The frequency domain information refers to the relevant frequency domain information generated after the user image is transformed through the frequency domain, and comprises the decomposition matrix.
Specifically, the user terminal performs segmentation processing on the user image, that is, the user image is segmented according to preset segmentation parameters to obtain image blocks, for example, the size of the user image is 122 × 122, the preset segmentation parameters are 8*8, the user image is segmented into a plurality of 8*8 image blocks, since the minimum unit forming the image is a pixel point, a pixel value of each pixel point in the image is extracted, a pixel value matrix is constructed by using the extracted pixel value, frequency domain transformation is performed on the pixel value in the pixel value matrix to obtain a frequency coefficient, a frequency coefficient matrix is constructed by using the frequency coefficient, the frequency coefficient of the same frequency is divided into the same frequency channel to obtain a decomposition matrix, the decomposition matrix is used as frequency domain information, and since the image information has strong correlation in a spatial domain, the frequency domain transformation is performed on the user image to reduce the correlation of the image information, and improve convenience of image processing.
(2) Frequency domain information filtering
On the basis that the user image is segmented to obtain an image block, pixel values of pixel points in the image block are extracted to construct a pixel value matrix, the pixel value matrix is subjected to frequency domain transformation to obtain a frequency coefficient matrix, and the frequency coefficient matrix is subjected to channel decomposition to obtain a decomposition matrix, which is used as frequency domain information, in an optional implementation manner provided by this embodiment, in a process of filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter, a user terminal performs the following operations:
distributing weights to channel coefficients in the decomposition matrix according to preset channel weights;
filtering the channel coefficient of the preset frequency channel in the decomposition matrix according to the distributed weight to obtain a residual matrix;
and updating the channel position of the channel coefficient in the residual matrix to obtain a target matrix.
The channel frequency domain information comprises frequency domain information of a preset frequency channel; the preset channel weight comprises preset weight distributed to each frequency channel; the channel coefficients comprise frequency coefficients of each frequency channel; the preset frequency channel refers to a preset frequency channel for filtering, the preset frequency channel may be a direct current channel and a high frequency channel, or a direct current channel, a partial low frequency channel and a partial high frequency channel, and the form and number of the specific preset frequency channel are not specifically limited herein.
For example, there are 1 direct current channel, 20 low frequency channels, 25 intermediate frequency channels and 18 high frequency channels, and the preset channel weights are direct current channel 0, low frequency channel 1, intermediate frequency channel 1 and high frequency channel 0, the user terminal assigns weights to the channel coefficients in the decomposition matrix, filters the channel coefficients of the direct current channel and the high frequency channels in the decomposition matrix according to the assigned weights to obtain a residual matrix, updates the channel positions of the channel coefficients of the low frequency channels and the intermediate frequency channels in the residual matrix, and specifically updates the channel coefficients of the low frequency channels and the intermediate frequency channels in the residual matrix to the high frequency channels to obtain a target matrix; the channel coefficient of the preset frequency channel is filtered, the effect of extracting the summary information of the user image is achieved, the privacy information in the user image is filtered, meanwhile, due to the fact that human eyes have higher sensitivity to low-frequency information and are not strong in sensitivity to high-frequency information, channel position updating is conducted on the residual channel coefficient, the effect of removing visualization is achieved, the privacy information in the user image is hidden, other users can not be identified by naked eyes, and privacy safety of the users is guaranteed.
The process image diagram in the desensitization process shown in fig. 3 specifically represents an image determined from the residual matrix, namely: the method comprises the steps of carrying out frequency domain transformation on a user image to obtain a frequency coefficient matrix, carrying out channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix, filtering channel coefficients of a preset frequency channel in the decomposition matrix to obtain a residual matrix, and determining an image according to the residual matrix.
(3) Frequency domain inverse transform
After the frequency domain transformation and the frequency domain information filtering are performed on the user image, the user image is processed in the frequency domain, and then the user terminal performs frequency domain inverse transformation on the target frequency domain information obtained by the frequency domain information filtering so as to transform the target frequency domain information from the frequency domain to the spatial domain.
In the foregoing, on the basis that an image block is obtained by performing segmentation processing on a user image, a pixel value matrix is constructed by extracting pixel values of pixel points in the image block, a frequency coefficient matrix is obtained by performing frequency domain transformation on the pixel value matrix, a decomposition matrix is obtained by performing channel decomposition on the frequency coefficient matrix and is used as frequency domain information, and filtering of channel coefficients of a preset frequency channel and updating of channel positions of channel coefficients in a residual matrix are performed according to an allocation weight, in an optional implementation manner provided in this embodiment, in a process of obtaining a desensitized image by performing inverse frequency domain transformation on target frequency domain information obtained by filtering, a user terminal performs the following operations:
carrying out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix;
and carrying out quantization processing on the image pixel values in the image pixel value matrix, and determining the desensitized image according to the quantization processing result.
Wherein, the inverse frequency domain Transform is a Transform from a frequency domain to a spatial domain, such as IDCT (inverse Discrete Cosine Transform), to convert information of the frequency domain to the spatial domain; and the image pixel value matrix comprises a matrix constructed by image pixel values generated by performing frequency domain inverse transformation on the channel coefficients in the target matrix.
Specifically, after processing a user image in a frequency domain, the user terminal performs frequency domain inverse transformation, specifically performs frequency domain inverse transformation on a target matrix, transforms a channel coefficient of the target matrix from the frequency domain to a spatial domain, generates an image pixel value, constructs an image pixel value matrix from the image pixel value, and performs quantization processing on the image pixel value in the image pixel value matrix, so as to further reduce privacy information in the user image through quantization processing on the basis of filtering channel frequency domain information and updating a channel position; the desensitized image is shown schematically in fig. 4, and is shown as a desensitized image determined from the quantification process.
In addition, in the process of obtaining the desensitized image by performing frequency domain inverse transformation on the target frequency domain information obtained by filtering, the user terminal can also perform frequency domain inverse transformation only on the target matrix to obtain an image pixel value matrix, and determine the desensitized image according to the image pixel value matrix.
In addition, in order to improve the image accuracy of a desensitized image of a user and avoid that the subsequent kernel processing cannot be accurately performed due to excessive information loss of image information in the process of performing the kernel processing on the user, and the kernel processing result is affected, the user image is segmented to obtain an image block, pixel values of pixels in the image block are extracted to construct a pixel value matrix, frequency domain transformation is performed on the pixel value matrix to obtain a frequency coefficient matrix, channel decomposition is performed on the frequency coefficient matrix to obtain a decomposition matrix as frequency domain information, filtering of channel coefficients of a preset frequency channel is performed according to distribution weights, channel positions of channel coefficients in a residual matrix are updated, and on the basis of performing frequency domain inverse transformation and quantization processing on a target matrix, the user terminal further performs the following operations:
and performing pixel mapping on the image pixel values in the image pixel value matrix to obtain mapped image pixel values to form a mapped image pixel value matrix.
Wherein the pixel mapping comprises mapping an image pixel value in a matrix of image pixel values to another image pixel value; the pixel mapping may be performed using a convolutional network.
In addition, in the process of carrying out frequency domain inverse transformation on the target frequency domain information obtained by filtering to obtain a desensitized image, the user terminal can also carry out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix; performing pixel mapping on image pixel values in the image pixel value matrix to obtain mapped image pixel values to form a mapped image pixel value matrix; and carrying out quantization processing on the image pixel values in the mapped image pixel value matrix, and determining a desensitized image according to the quantization processing result.
It is necessary to supplement that, the process of performing image desensitization processing on the user image by using the image desensitization model may also be divided into performing frequency domain transformation on the user image to obtain frequency domain information, filtering frequency domain information of a preset frequency channel, performing channel position update on the residual frequency domain information obtained by filtering to obtain target frequency domain information, performing frequency domain inverse transformation, pixel mapping and quantization processing on the target frequency domain information.
The user terminal inputs the user image into the image desensitization model for image desensitization processing, and after the desensitization image is output, the encryption key is used for encrypting the desensitization image to obtain an encrypted desensitization image; the encrypted desensitized image refers to an encrypted desensitized image.
During specific implementation, in order to enhance the information security of the desensitization image, the user terminal can encrypt the desensitization image by using the encryption key, the acquired encrypted desensitization image is used for transmission, information leakage of the desensitization image is avoided, and in the process of encrypting the desensitization image by using the encryption key, two layers of encryption keys can be used for image encryption for further enhancing the information security of the desensitization image. Specifically, in the process of encrypting the desensitized image by using the encryption key to obtain the encrypted desensitized image, the user terminal performs the following operations:
encrypting the desensitized image by using a first public key of a first encryption algorithm to obtain an encrypted desensitized image;
correspondingly, after the desensitized image is encrypted by using the first public key of the first encryption algorithm to obtain an encrypted desensitized image, the following operations are further performed:
and encrypting the first public key by using a second public key of a second encryption algorithm to obtain an encrypted first public key.
For example, the first encryption algorithm is an SM4 symmetric encryption algorithm, the user terminal utilizes the SM4 symmetric encryption algorithm to realize the rapidity of encryption, the second encryption algorithm is an SM2 asymmetric encryption algorithm, the user terminal utilizes the SM2 asymmetric encryption algorithm to realize the security of encryption, and the two algorithms are matched to improve the encryption efficiency and simultaneously improve the security of the encrypted desensitized image.
The user terminal encrypts the desensitized image by using the encryption key to obtain an encrypted desensitized image, and then the user terminal sends the encrypted desensitized image and the encryption key to the server.
And S604, decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image.
In the step, the encrypted desensitized image and the encryption key sent by the user terminal are received, and the decryption key corresponding to the encryption key is used for decrypting the encrypted desensitized image to obtain the desensitized image.
In specific implementation, after the user terminal sends the encrypted desensitized image and the encryption key to the server, the server receives the encrypted desensitized image and the encryption key and decrypts the encrypted desensitized image to obtain the desensitized image.
In a specific implementation process, the image encryption is performed by using two layers of encryption keys, and on this basis, the server decrypts the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image, and in this process, the server performs the following operations:
decrypting the encrypted first public key by using a second private key corresponding to the second public key to obtain a first public key;
and decrypting the encrypted desensitized image by using a first private key corresponding to the first public key to obtain the desensitized image.
In addition, after the server receives the encryption desensitization image and the encryption key, in an optional implementation manner provided in this embodiment, the encryption desensitization image and the encryption key may also be stored.
Or when the user registers for service for the first time, the user terminal collects the user image, the image desensitization model is used for carrying out image desensitization on the user image to obtain a desensitized image, the encryption key is used for encrypting the desensitized image to obtain an encrypted desensitized image, the encrypted desensitized image and the encryption key are sent to the server, the server decrypts the encrypted desensitized image by using the decryption key corresponding to the encryption key to obtain the desensitized image, the image living body detection is carried out on the desensitized image according to the biological feature detection result of the desensitized image, if the image living body detection passes, the encryption key is used for encrypting the desensitized image and storing the encrypted desensitized image and the encryption key, and if the image living body detection does not pass, the processing is not carried out.
And step S606, performing image living body detection on the desensitized image according to the biological feature detection result of the desensitized image.
The encrypted desensitized image is decrypted by using the decryption key corresponding to the encryption key to obtain the desensitized image, and in the step, image living body detection is carried out on the desensitized image according to the biological feature detection result of the desensitized image.
In an optional implementation manner provided in this embodiment, the biometric detection result is obtained by:
carrying out biological characteristic detection on the desensitization image to obtain boundary information of a biological characteristic image block in the desensitization image; and detecting the pixel coordinate information of the key feature points in the biological feature image block according to the boundary information.
And the biological characteristic detection result comprises boundary information of the biological characteristic image block and/or pixel coordinate information of the key characteristic point.
The boundary information comprises coordinate information of boundary pixel points of the biological characteristic image blocks; the biological feature detection comprises detecting a feature region of a biological feature in the desensitized image, such as detecting a face region in the desensitized image, and the biological feature detection can adopt a biological feature detection model, such as a face detection model; the biological feature image block comprises a feature area of biological features, such as a human face area.
The key feature points comprise key biological feature points, such as eye points, nose points and mouth points, and can also be other body part points, such as palm points; the pixel coordinate information comprises coordinate information of pixel points corresponding to the key characteristic points; it should be noted that the key feature point is composed of at least one pixel point.
For example, a face detection model is used for detecting a face region in a desensitized image, boundary information of a face image block in the desensitized image is obtained, and coordinate information of pixel points corresponding to an eye point, a nose point, a mouth point and the like in the face image block is detected according to the boundary information of the face image block.
In specific implementation, after a biological characteristic detection result of a desensitization image is obtained, image living body detection can be carried out on the desensitization image according to the biological characteristic detection result, whether the desensitization image is a living body image is specifically detected, if yes, the image living body detection is determined to be passed, and if not, the image living body detection is determined not to be passed; in a specific image biopsy process, an image biopsy model can be adopted.
And step S608, if the image living body detection is passed, performing nuclear body processing on the user according to the desensitization image.
In the step, the core processing is carried out on the user according to the desensitization image, specifically, the core processing is carried out on the user according to the desensitization image under the condition that the image biopsy passes, and the core processing non-passing prompt or non-processing prompt is sent to the user terminal under the condition that the image biopsy does not pass.
The server performs image living body detection on the desensitization image according to the biological characteristic detection result, and performs core body processing on the user according to the desensitization image under the condition that the image living body detection result is that the desensitization image is a living body image, so that the core body processing efficiency and the core body processing precision are guaranteed by using the living body image to perform core body processing on the user.
In the process of performing the coring treatment on the user according to the desensitized image, the embodiment provides an optional implementation method that:
affine transformation is carried out on the desensitization image based on the pixel coordinate information of the key feature points, and an affine desensitization image is obtained;
cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed;
and performing nuclear body treatment on the user according to the to-be-treated desensitized image.
The affine desensitization image is a desensitization image subjected to affine transformation; the preset cutting parameters refer to preset cutting parameters, such as 100 × 100; the affine transformation refers to transformation which can arbitrarily incline the image and allow the image to be arbitrarily stretched in two directions.
Specifically, whether affine transformation is performed on the desensitized image or not can be judged according to the pixel coordinate information of the key feature points, if yes, affine transformation is performed on the desensitized image based on the pixel coordinate information of the key feature points to obtain an affine desensitized image, for example, affine transformation is performed on the desensitized image according to the coordinate information of pixel points corresponding to eye points, nose points, mouth points and the like to obtain an affine desensitized image, the desensitized image is cut to obtain a desensitized image to be processed, and the user is subjected to nuclear processing according to the desensitized image to be processed; if not, the desensitization image is cut according to preset cutting parameters to obtain a desensitization image to be processed, and the user is subjected to core processing according to the desensitization image to be processed.
Through carrying out affine transformation on the desensitized image, the image angle of the desensitized image is corrected, the positions of key feature points are adjusted, for example, the desensitized face image on the side surface is adjusted to be the front desensitized face image, the image precision of the desensitized image is improved, and through carrying out cutting processing on the affine desensitized image, image information irrelevant to core processing, such as background information in the desensitized face image, is removed, the core processing is convenient to carry out, and the core processing efficiency and the throughput rate are improved.
Wherein, in the process of carrying out the nuclear body treatment on the user according to the to-be-treated desensitized image, the following operations are specifically executed:
extracting the image characteristics of the desensitized image to be processed to generate a characteristic vector of the image characteristics;
calculating the distance between the feature vector and the feature vector of the preset image feature of the user;
and determining the core processing result of the user based on the distance.
The distance here includes a cosine distance.
Specifically, after calculating the distance between the feature vector and the feature vector of the preset image feature of the user, the core processing result of the user can be determined according to the calculated distance, and if the distance is greater than or equal to the distance threshold, the core processing of the user is determined to be passed; and if the distance is smaller than the distance threshold, determining that the core processing of the user is not passed.
In addition, after the server receives the encrypted desensitized image and the encryption key, the encrypted desensitized image can be decrypted by using a decryption key corresponding to the encryption key to obtain a desensitized image; carrying out biological characteristic detection on the desensitization image, and carrying out image living body detection on the desensitization image according to a biological characteristic detection result; and if the image biopsy passes, performing the nuclear body treatment on the user according to the desensitization image, and if the image biopsy does not pass, sending a warning that the nuclear body treatment does not pass or not performing the treatment to the user terminal.
In addition, in order to facilitate the core processing for the user, in an optional implementation manner provided in this embodiment, the server may further extract image features of the image to be processed, and generate feature vectors of the image features; the feature vector is encrypted and the encrypted feature vector obtained by the encryption is stored.
In addition, when a user registers for service for the first time, the user terminal acquires a user image, image desensitization is carried out on the user image by using an image desensitization model to obtain a desensitized image, the desensitized image is encrypted by using an encryption key to obtain an encrypted desensitized image, the encrypted desensitized image and the encryption key are sent to the server, the server decrypts the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image, image living body detection is carried out on the desensitized image according to a biological feature detection result of the desensitized image, if the image living body detection passes, image features of an image to be processed are extracted to generate feature vectors of the image features, the feature vectors are encrypted and the encrypted feature vectors obtained by encryption are stored, and if the image living body detection does not pass, the image is not processed.
The following further describes the image processing method provided in this embodiment by taking an application of the image processing method provided in this embodiment to an image desensitization scene as an example, and referring to fig. 5, the image processing method applied to the image desensitization scene specifically includes the following steps.
The user terminal divides the face image of the user to obtain an image block, and extracts pixel values of pixel points in the image block to construct a pixel value matrix; carrying out frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and carrying out channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix; distributing weights to channel coefficients in the decomposition matrix according to preset channel weights, and filtering the channel coefficients of preset frequency channels in the decomposition matrix according to the distributed weights to obtain a residual matrix; channel positions of channel coefficients in the residual matrix are updated to obtain a target matrix; carrying out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix; performing pixel mapping on image pixel values in the image pixel value matrix to obtain mapped image pixel values and construct a mapped image pixel value matrix; quantizing the image pixel values in the mapped image pixel value matrix, and determining a face desensitization image according to the quantization processing result; encrypting the face desensitization image by using a first public key of a first encryption algorithm to obtain an encrypted face desensitization image, and encrypting the first public key by using a second public key of a second encryption algorithm to obtain an encrypted first public key; and sending the encrypted face desensitization image, the encrypted first public key and the encrypted second public key to a server.
And S520, decrypting the encrypted first public key by using a second private key corresponding to the second public key to obtain a first public key, and decrypting the encrypted face desensitization image by using the first private key corresponding to the first public key to obtain the face desensitization image.
Step S522, face detection is carried out on the face desensitization image, boundary information of face image blocks in the desensitization image is obtained, and pixel coordinate information of key feature points is detected in the face image blocks according to the boundary information.
And step S524, performing image living body detection on the face desensitized image according to the boundary information of the face image block.
And step S526, if the image living body detection is passed, performing affine transformation on the face desensitization image based on the pixel coordinate information of the key feature points to obtain an affine desensitization image.
And if the image living body detection is not passed, sending a nuclear failure prompt to the user terminal or not processing.
And step S528, performing cutting processing on the affine desensitized image according to preset cutting parameters to obtain a desensitized image to be processed.
Step S530, performing core processing on the user according to the desensitization image to be processed.
The specific core-body treatment comprises the following steps: extracting the image characteristics of the desensitized image to be processed to generate a characteristic vector of the image characteristics; calculating the distance between the feature vector and the feature vector of the preset image feature of the user; and determining the core processing result of the user based on the distance.
In summary, the image processing method provided in this embodiment receives the encrypted desensitized image and the encryption key sent by the user terminal, and decrypts the encrypted first public key by using the second private key corresponding to the second public key to obtain the first public key; decrypting the encrypted desensitized image by using a first private key corresponding to the first public key to obtain a desensitized image; carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image; if the image living body detection passes, carrying out affine transformation on the desensitization image based on the pixel coordinate information of the key feature points to obtain an affine desensitization image; cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed; the user is subjected to coring processing according to the to-be-processed desensitized image, so that the sensitive information in the user image information is hidden or filtered according to the image desensitized processing on the user image, the hidden or filtered image is further utilized for coring processing on the user, the privacy safety of the user is guaranteed, the rights and interests of the user are prevented from being damaged, and the user experience is improved.
An embodiment of an image processing apparatus provided in this specification is as follows:
in the foregoing embodiment, an image processing method applied to a user terminal is provided, and correspondingly, an image processing apparatus operating in the user terminal is also provided, which is described below with reference to the accompanying drawings.
Referring to fig. 7, a schematic diagram of an image processing apparatus provided in the present embodiment is shown.
Since the apparatus embodiments correspond to the method embodiments, the description is relatively simple, and reference may be made to the corresponding description of the method embodiments provided above for relevant portions. The device embodiments described below are merely illustrative.
The embodiment provides an image processing apparatus, which runs on a user terminal, and the apparatus includes:
an image desensitization processing module 702 configured to input the user image into an image desensitization model for image desensitization processing, and output a desensitized image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
a desensitization image encryption module 704 configured to encrypt the desensitization image with an encryption key to obtain an encrypted desensitization image;
a desensitization image sending module 706 configured to send the encrypted desensitization image and the encryption key to a server.
Another embodiment of an image processing apparatus provided in this specification is as follows:
in the above embodiment, an image processing method applied to a server is provided, and correspondingly, an image processing apparatus operating on the server is also provided, which is described below with reference to the accompanying drawings.
Referring to fig. 8, a schematic diagram of an image processing apparatus provided in the present embodiment is shown.
Since the device embodiments correspond to the method embodiments, the description is relatively simple, and the relevant portions may refer to the corresponding description of the method embodiments provided above. The device embodiments described below are merely illustrative.
The embodiment provides an image processing apparatus, operating on a server, the apparatus comprising:
an image receiving module 802 configured to receive an encryption desensitization image and an encryption key transmitted by a user terminal; the encrypted desensitization image is obtained after the desensitization image obtained by performing image desensitization processing on the user image is encrypted by using the encryption key;
an image decryption module 804, configured to decrypt the encrypted desensitized image using a decryption key corresponding to the encryption key, to obtain a desensitized image;
a live body detection module 806 configured to perform image live body detection on the desensitized image according to a biological feature detection result of the desensitized image;
if the image live detection passes, a core processing module 808 is executed, and the core processing module 808 is configured to perform core processing on the user according to the desensitization image.
An embodiment of an image processing apparatus provided in the present specification is as follows:
corresponding to the image processing method applied to the user terminal described above, based on the same technical concept, one or more embodiments of the present specification further provide an image processing apparatus for executing the image processing method provided above, and fig. 9 is a schematic structural diagram of an image processing apparatus provided in one or more embodiments of the present specification.
The embodiment provides an image processing apparatus including:
as shown in fig. 9, the image processing apparatus may have a relatively large difference due to different configurations or performances, and may include one or more processors 901 and a memory 902, where one or more stored applications or data may be stored in the memory 902. Memory 902 may be, among other things, transient storage or persistent storage. The application program stored in memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in the image processing device. Still further, the processor 901 may be arranged in communication with the memory 902 for executing a series of computer executable instructions in the memory 902 on the image processing device. The image processing apparatus may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input/output interfaces 905, one or more keyboards 906, and the like.
In one particular embodiment, an image processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image;
sending the encryption desensitized image and the encryption key to a server.
Another embodiment of an image processing apparatus provided in this specification is as follows:
corresponding to the image processing method applied to the server described above, based on the same technical concept, one or more embodiments of the present specification further provide an image processing apparatus for executing the image processing method provided above, and fig. 10 is a schematic structural diagram of an image processing apparatus provided in one or more embodiments of the present specification.
The embodiment provides an image processing apparatus including:
as shown in fig. 10, the image processing apparatus may have a relatively large difference due to different configurations or performances, and may include one or more processors 1001 and a memory 1002, and one or more stored applications or data may be stored in the memory 1002. Memory 1002 may be, among other things, transient storage or persistent storage. The application program stored in memory 1002 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in the image processing device. Still further, the processor 1001 may be configured to communicate with the memory 1002 to execute a series of computer-executable instructions in the memory 1002 on the image processing device. The image processing apparatus may also include one or more power supplies 1003, one or more wired or wireless network interfaces 1004, one or more input/output interfaces 1005, one or more keyboards 1006, etc.
In one particular embodiment, an image processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image processing apparatus, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after the desensitization image obtained by performing image desensitization processing on the user image is encrypted by using the encryption key;
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
An embodiment of a storage medium provided in this specification is as follows:
on the basis of the same technical concept, one or more embodiments of the present specification further provide a storage medium corresponding to the image processing method applied to the user terminal described above.
The storage medium provided in this embodiment is used to store computer-executable instructions, and when the computer-executable instructions are executed by the processor, the following processes are implemented:
inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image;
sending the encrypted desensitized image and the encryption key to a server.
It should be noted that the embodiment of the storage medium in this specification and the embodiment of the image processing method in this specification are based on the same inventive concept, and therefore, for specific implementation of this embodiment, reference may be made to implementation of the foregoing corresponding method, and repeated details are not described here.
Another storage medium embodiment provided in this specification is as follows:
on the basis of the same technical concept corresponding to the image processing method applied to the server described above, one or more embodiments of the present specification further provide a storage medium.
The present embodiment provides a storage medium for storing computer-executable instructions, which when executed by a processor implement the following procedures:
receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after the desensitization image obtained by performing image desensitization processing on the user image is encrypted by using the encryption key;
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
It should be noted that the embodiment of the storage medium in this specification and the embodiment of the image processing method in this specification are based on the same inventive concept, and therefore, for specific implementation of this embodiment, reference may be made to implementation of the foregoing corresponding method, and repeated details are not described here.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 30 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain a corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in multiple software and/or hardware when implementing the embodiments of the present description.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
One or more embodiments of the specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of this document and is not intended to limit this document. Various modifications and changes may occur to those skilled in the art from this document. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (25)

1. An image processing method is applied to a user terminal, and comprises the following steps:
inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image;
sending the encrypted desensitized image and the encryption key to a server.
2. The image processing method of claim 1, the frequency-domain transforming the user image to obtain frequency-domain information, comprising:
the user image is segmented to obtain image blocks, and pixel values of pixel points in the image blocks are extracted to construct a pixel value matrix;
and performing frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and performing channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix as the frequency domain information.
3. The image processing method according to claim 2, wherein the filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter comprises:
distributing weights to channel coefficients in the decomposition matrix according to preset channel weights;
filtering the channel coefficients of the preset frequency channels in the decomposition matrix according to the distributed weights to obtain a residual matrix;
and updating the channel position of the channel coefficient in the residual matrix to obtain a target matrix.
4. The image processing method according to claim 3, wherein the performing of the inverse frequency domain transform on the target frequency domain information obtained by filtering to obtain the desensitized image comprises:
carrying out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix;
and carrying out quantization processing on the image pixel values in the image pixel value matrix, and determining the desensitized image according to the quantization processing result.
5. The image processing method according to claim 4, further comprising:
and performing pixel mapping on the image pixel values in the image pixel value matrix to obtain mapped image pixel values and construct a mapped image pixel value matrix.
6. The image processing method according to claim 1, the server, upon receiving the encryption-desensitized image and the encryption key, performing:
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain the desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
7. The image processing method according to claim 6, wherein the biometric detection result is obtained by:
carrying out biological characteristic detection on the desensitization image to obtain boundary information of a biological characteristic image block in the desensitization image;
and detecting the pixel coordinate information of the key feature points in the biological feature image block according to the boundary information.
8. The image processing method of claim 7, the nuclear processing of the user according to the desensitized image, comprising:
affine transformation is carried out on the desensitization image based on the pixel coordinate information of the key feature points, and an affine desensitization image is obtained;
cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed;
and performing nuclear body treatment on the user according to the to-be-treated desensitized image.
9. The image processing method according to claim 8, the performing the nuclear processing on the user according to the to-be-processed desensitized image, comprising:
extracting the image features of the desensitized image to be processed, and generating feature vectors of the image features;
calculating the distance between the feature vector and the feature vector of the preset image feature of the user;
determining a core processing result of the user based on the distance.
10. The image processing method according to claim 6, wherein the encrypting the desensitized image with an encryption key to obtain an encrypted desensitized image comprises:
encrypting the desensitized image by using a first public key of a first encryption algorithm to obtain an encrypted desensitized image;
the method further comprises the following steps:
encrypting the first public key by using a second public key of a second encryption algorithm to obtain an encrypted first public key;
correspondingly, the decrypting the encrypted desensitized image by using the decryption key corresponding to the encryption key to obtain the desensitized image includes:
decrypting the encrypted first public key by using a second private key corresponding to the second public key to obtain the first public key;
and decrypting the encrypted desensitized image by using a first private key corresponding to the first public key to obtain the desensitized image.
11. An image processing method applied to a server, the method comprising:
receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after encrypting a desensitization image obtained by performing image desensitization processing on a user image by using the encryption key;
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
12. The image processing method according to claim 11, the image desensitization process comprising:
carrying out frequency domain transformation on the user image to obtain frequency domain information;
filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter;
and performing frequency domain inverse transformation on the target frequency domain information obtained by filtering to obtain the desensitized image.
13. The image processing method of claim 12, the frequency-domain transforming the user image to obtain frequency-domain information, comprising:
the user image is segmented to obtain image blocks, and pixel values of pixel points in the image blocks are extracted to construct a pixel value matrix;
and performing frequency domain transformation on the pixel value matrix to obtain a frequency coefficient matrix, and performing channel decomposition on the frequency coefficient matrix to obtain a decomposition matrix as the frequency domain information.
14. The image processing method according to claim 13, wherein the filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter comprises:
distributing weights to channel coefficients in the decomposition matrix according to preset channel weights;
filtering the channel coefficients of the preset frequency channels in the decomposition matrix according to the distributed weights to obtain a residual matrix;
and updating the channel position of the channel coefficient in the residual matrix to obtain a target matrix.
15. The image processing method according to claim 14, wherein the performing of the inverse frequency domain transform on the target frequency domain information obtained by filtering to obtain the desensitized image comprises:
carrying out frequency domain inverse transformation on the target matrix to obtain an image pixel value matrix;
and carrying out quantization processing on the image pixel values in the image pixel value matrix, and determining the desensitized image according to the quantization processing result.
16. The image processing method according to claim 11, wherein the biometric detection result is obtained by:
carrying out biological feature detection on the desensitization image to obtain boundary information of a biological feature image block in the desensitization image;
and detecting the pixel coordinate information of the key feature points in the biological feature image block according to the boundary information.
17. The image processing method of claim 16, the nuclear processing of the user according to the desensitized image, comprising:
affine transformation is carried out on the desensitization image based on the pixel coordinate information of the key feature points, and an affine desensitization image is obtained;
cutting the affine desensitization image according to preset cutting parameters to obtain a desensitization image to be processed;
and performing nuclear body treatment on the user according to the to-be-treated desensitized image.
18. The image processing method according to claim 11, wherein after the step of receiving the encrypted desensitized image and the encryption key sent by the user terminal is executed, and before the step of decrypting the encrypted desensitized image by using the decryption key corresponding to the encryption key and obtaining the desensitized image is executed, the method further comprises:
storing the encryption-desensitized image and the encryption key.
19. The image processing method of claim 17, further comprising:
extracting the image features of the desensitized image to be processed, and generating feature vectors of the image features;
and encrypting the feature vector and storing the encrypted feature vector obtained by encryption.
20. An image processing apparatus, operating in a user terminal, the apparatus comprising:
the image desensitization processing module is configured to input the user image into the image desensitization model for image desensitization processing and output a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
a desensitization image encryption module configured to encrypt the desensitization image using an encryption key to obtain an encrypted desensitization image;
a desensitization image sending module configured to send the encrypted desensitization image and the encryption key to a server.
21. An image processing apparatus, operating on a server, the apparatus comprising:
the image receiving module is configured to receive an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after the desensitization image obtained by performing image desensitization processing on the user image is encrypted by using the encryption key;
the image decryption module is configured to decrypt the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
a living body detection module configured to perform image living body detection on the desensitization image according to a biological feature detection result of the desensitization image;
and if the image living body detection is passed, operating a nuclear body processing module, wherein the nuclear body processing module is configured to perform nuclear body processing on the user according to the desensitization image.
22. An image processing apparatus comprising:
a processor; and a memory configured to store computer-executable instructions that, when executed, cause the processor to:
inputting the user image into an image desensitization model for image desensitization treatment, and outputting a desensitization image; the image desensitization process includes: performing frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to a preset filtering parameter, and performing frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image;
sending the encrypted desensitized image and the encryption key to a server.
23. An image processing apparatus comprising:
a processor; and a memory configured to store computer-executable instructions that, when executed, cause the processor to:
receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after encrypting a desensitization image obtained by performing image desensitization processing on a user image by using the encryption key;
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
24. A storage medium storing computer-executable instructions that when executed by a processor implement the following:
inputting the user image into an image desensitization model for image desensitization processing, and outputting a desensitization image; the image desensitization process includes: carrying out frequency domain transformation on the user image to obtain frequency domain information, filtering channel frequency domain information of a preset frequency channel from the frequency domain information according to preset filtering parameters, and carrying out frequency domain inverse transformation on target frequency domain information obtained by filtering to obtain the desensitized image;
encrypting the desensitized image by using an encryption key to obtain an encrypted desensitized image;
sending the encryption desensitized image and the encryption key to a server.
25. A storage medium storing computer-executable instructions that when executed by a processor implement the following:
receiving an encryption desensitization image and an encryption key sent by a user terminal; the encrypted desensitization image is obtained after the desensitization image obtained by performing image desensitization processing on the user image is encrypted by using the encryption key;
decrypting the encrypted desensitized image by using a decryption key corresponding to the encryption key to obtain a desensitized image;
carrying out image living body detection on the desensitization image according to the biological feature detection result of the desensitization image;
and if the image living body detection passes, performing nuclear body treatment on the user according to the desensitization image.
CN202210707278.7A 2022-06-21 2022-06-21 Image processing method and device Pending CN115203720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210707278.7A CN115203720A (en) 2022-06-21 2022-06-21 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210707278.7A CN115203720A (en) 2022-06-21 2022-06-21 Image processing method and device

Publications (1)

Publication Number Publication Date
CN115203720A true CN115203720A (en) 2022-10-18

Family

ID=83576773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210707278.7A Pending CN115203720A (en) 2022-06-21 2022-06-21 Image processing method and device

Country Status (1)

Country Link
CN (1) CN115203720A (en)

Similar Documents

Publication Publication Date Title
TWI762283B (en) Image privacy protection method, device and device
CN109145563B (en) Identity verification method and device
WO2021238956A1 (en) Identity verification method, apparatus and device based on privacy protection
CN112016120B (en) Event prediction method and device based on user privacy protection
KR20170051424A (en) Encrypting and decrypting information
JP2016012111A (en) Encryption processing method, encryption processing device, and encryption processing program
Khashan et al. Performance study of selective encryption in comparison to full encryption for still visual images
MY182245A (en) Authentication methods and systems
CN112200796A (en) Image processing method, device and equipment based on privacy protection
CN116383793B (en) Face data processing method, device, electronic equipment and computer readable medium
WO2018166484A1 (en) Data encryption and decryption methods and apparatuses, electronic device and readable storage medium
CN112800467B (en) Online model training method, device and equipment based on data privacy protection
CN112837202B (en) Watermark image generation and attack tracing method and device based on privacy protection
WO2018166483A1 (en) Data encryption and decryption method and apparatus
CN116432244B (en) Image processing method, device, equipment and system
CN115203720A (en) Image processing method and device
CN114978623B (en) Face comparison method and device based on privacy protection
KR102371391B1 (en) License platae recognition system using ai and operation method thereof
CN113239852B (en) Privacy image processing method, device and equipment based on privacy protection
CN115357929A (en) Image processing method, device and equipment
CN113312668A (en) Image identification method, device and equipment based on privacy protection
CN115550071B (en) Data processing method, device, storage medium and equipment
CN114238910A (en) Data processing method, device and equipment
CN116436619B (en) Method and device for verifying streaming media data signature based on cryptographic algorithm
CN116522370B (en) Full homomorphic encryption authentication method, storage medium and electronic equipment

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