CN112800452A - User identity image processing method and user identity image identification method - Google Patents

User identity image processing method and user identity image identification method Download PDF

Info

Publication number
CN112800452A
CN112800452A CN202110293708.0A CN202110293708A CN112800452A CN 112800452 A CN112800452 A CN 112800452A CN 202110293708 A CN202110293708 A CN 202110293708A CN 112800452 A CN112800452 A CN 112800452A
Authority
CN
China
Prior art keywords
image
scrambling
user identity
parameters
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110293708.0A
Other languages
Chinese (zh)
Other versions
CN112800452B (en
Inventor
顾佳昕
沈鹏程
李绍欣
李季檩
黄飞跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110293708.0A priority Critical patent/CN112800452B/en
Publication of CN112800452A publication Critical patent/CN112800452A/en
Application granted granted Critical
Publication of CN112800452B publication Critical patent/CN112800452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/602Rotation of whole images or parts thereof by block rotation, e.g. by recursive reversal or rotation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • 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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0203Image watermarking whereby the image with embedded watermark is reverted to the original condition before embedding, e.g. lossless, distortion-free or invertible watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application relates to the fields of intelligent security, intelligent traffic and intelligent cities, and provides a user identity image processing method, which comprises the following steps: obtaining a plurality of image sub-blocks with the same shape and size obtained by segmenting a user identity image, and carrying out scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambled identity image; the scrambling processing comprises the steps that the direction of the image subblocks to be processed is changed according to the direction change parameters in the scrambling parameters, and the positions of the image subblocks are exchanged according to the position exchange parameters in the scrambling parameters. The application also provides a method for realizing the user identity image recognition, the user identity recognition is carried out on the recovered user identity image by carrying out descrambling processing on the scrambled identity image based on the scrambling parameter, and the user identity can be quickly and safely recognized.

Description

User identity image processing method and user identity image identification method
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for processing a user identification image, a computer device, and a storage medium, and a method and an apparatus for identifying a user identification image, a computer device, and a storage medium.
Background
The user identity image is an image containing the identity information of the user, and is applied in a wide range under the scenes of security protection, entrance guard, payment and the like, so that the life quality of people is greatly improved, but the worry of the user about the safety of the privacy information is brought. Once the user identity image is leaked, the privacy of the leaked user can be immeasurably damaged. To solve this problem, a processing method of encrypting the user identification image has appeared.
However, a common Encryption algorithm, such as a symmetric Encryption DES (Data Encryption Standard) algorithm, has a short key, and can be brute-force cracked by an exhaustive search method (library collision); the algorithm of asymmetric encryption RSA (RSA algorithm) is high in security, but the operation cost is very high, so that the encryption and decryption speed is slow, and the algorithm is particularly obvious on edge equipment with weak computing power, and the real-time performance cannot meet the requirement. Therefore, there is a problem that efficiency and safety are difficult to reconcile.
Disclosure of Invention
In view of the above, it is necessary to provide a user identification image processing method, apparatus, computer device and storage medium, and a user identification image recognition method, apparatus, computer device and storage medium, which can achieve both efficiency and security.
A user identity image processing method, the method comprising:
obtaining a plurality of image sub-blocks obtained by segmenting a user identity image, wherein each image sub-block has the same shape and size;
scrambling at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
A user identity image processing apparatus, the apparatus comprising:
the image segmentation module is used for obtaining a plurality of image sub-blocks obtained by segmenting the user identity image, and each image sub-block has the same shape and size;
the image subblock scrambling module is used for scrambling at least a part of image subblocks in the plurality of image subblocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
obtaining a plurality of image sub-blocks obtained by segmenting a user identity image, wherein each image sub-block has the same shape and size;
scrambling at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
obtaining a plurality of image sub-blocks obtained by segmenting a user identity image, wherein each image sub-block has the same shape and size;
scrambling at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
The user identity image processing method, the device, the computer equipment and the storage medium have the advantages that the plurality of image sub-blocks obtained by segmenting the user identity image are obtained, the user identity image is segmented from the whole to obtain the plurality of image sub-blocks with the same shape and size, so that the image sub-blocks at different segmentation positions can realize position interchange, the scrambling processing is carried out on at least one part of the image sub-blocks in the plurality of image sub-blocks according to the randomly generated scrambling parameter to obtain the scrambling identity image, the user identity image can be conveniently and quickly recovered and obtained by recovering the scrambling parameter of the user identity image based on the scrambling identity image, the scrambling processing comprises the steps of carrying out direction change on the image sub-blocks to be processed according to the direction change parameter in the scrambling parameter and carrying out position interchange on the image sub-blocks to be processed according to the position interchange parameter in the scrambling parameter, the scrambling processing based on the direction change processing and the position interchange processing not only reduces the complexity of scrambling the user identity image, is convenient for quickly scrambling to obtain the scrambled identity image, but also reduces the possibility that the scrambled identity image is violently cracked, thereby quickly obtaining the scrambled identity image with high safety.
A method of user identity image recognition, the method further comprising:
extracting a scrambling identity image carried by a user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters;
based on the scrambling parameter, carrying out descrambling processing on the scrambled identity image to obtain a recovered user identity image;
and carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
A user identity image recognition device, the device comprising:
the scrambling identity image extraction module is used for extracting a scrambling identity image carried by the user identity identification request, wherein the scrambling identity image is an image obtained by scrambling image subblocks obtained by segmenting the user identity image according to randomly generated scrambling parameters;
the image descrambling module is used for performing descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image;
and the user identity recognition module is used for carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
extracting a scrambling identity image carried by a user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters;
based on the scrambling parameter, carrying out descrambling processing on the scrambled identity image to obtain a recovered user identity image;
and carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
extracting a scrambling identity image carried by a user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters;
based on the scrambling parameter, carrying out descrambling processing on the scrambled identity image to obtain a recovered user identity image;
and carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
The method, the device, the computer equipment and the storage medium for identifying the user identity image ensure the safety of the scrambled identity image by extracting the scrambled identity image carried by the user identity identification request, carrying out the descrambling processing on the scrambled identity image based on the image subblock obtained by segmenting the user identity image according to the randomly generated scrambling parameter to obtain the scrambled identity image, carrying out the descrambling processing on the scrambled identity image based on the scrambling parameter to obtain the recovered user identity image, carrying out the user identity identification based on the recovered user identity image to obtain the user identity identification result corresponding to the user identity identification request, and reducing the scrambling and descrambling mode based on the scrambling parameter, on one hand, reducing the complexity of the descrambling processing on the user identity image, facilitating the fast descrambling to obtain the user identity image, and on the other hand, reducing the possibility of brute force cracking of the scrambled identity image, therefore, the identification processing of the user identity is realized quickly and safely.
Drawings
FIG. 1 is a diagram of an embodiment of an application environment of a method for processing a user identity image;
FIG. 2 is a diagram of an application environment of a user identification image processing method in another embodiment;
FIG. 3 is a flowchart illustrating a method for processing a user identification image according to an embodiment;
FIG. 4 is a schematic diagram of image sub-blocks of different shapes in one embodiment;
FIG. 5(a) is a diagram illustrating the position exchange between two image sub-blocks in one embodiment;
FIG. 5(b) is a diagram illustrating the position exchange of multiple image sub-blocks according to an embodiment;
FIG. 6(a) is a schematic diagram illustrating the position of partial image sub-blocks being interchanged in one embodiment;
FIG. 6(b) is a diagram illustrating the position exchange of all image sub-blocks in one embodiment;
FIG. 7(a) is a diagram illustrating the result of the direction change of image sub-blocks at different rotation angles according to an embodiment;
FIG. 7(b) is a diagram illustrating the result of the direction change of image sub-blocks according to different symmetry axes in one embodiment;
FIG. 8 is a flowchart illustrating a method for identifying a user identity image according to one embodiment;
FIG. 9 is a diagram illustrating results of user identity image scrambling and descrambling processing in one embodiment;
FIG. 10 is a flowchart illustrating a user identification image processing method and a user identification image recognition method according to an embodiment;
FIG. 11 is a flow diagram illustrating a face recognition process in one embodiment;
FIG. 12(a) is a schematic diagram of scrambling identity images in one embodiment;
FIG. 12(b) is a schematic diagram of scrambling identity images in another embodiment;
FIG. 13 is a block diagram showing the structure of a user identification image processing apparatus according to an embodiment;
FIG. 14 is a block diagram showing the structure of a user identification image recognition apparatus according to an embodiment;
FIG. 15 is a diagram showing an internal structure of a computer device in one embodiment;
fig. 16 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The scheme provided by the embodiment of the application can relate to the technologies of Artificial Intelligence (AI), Machine Learning (ML) and the like. Artificial intelligence is a theory, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making. Machine learning is a multi-field cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Based on technologies such as artificial intelligence and machine learning, a plurality of image sub-blocks obtained by segmenting a user identity image can be obtained, and each image sub-block has the same shape and size; scrambling at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining a user identity image based on the scrambled identity image; wherein, the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to interchange the positions of the image sub-blocks to be processed according to the position interchange parameters, so that the scrambled identity image with high safety is quickly obtained. The scrambling identity image carried by the user identity identification request can be extracted, and is an image obtained by scrambling the image subblock obtained by segmenting the user identity image according to the randomly generated scrambling parameter; based on the scrambling parameter, carrying out descrambling processing on the scrambled identity image to obtain a recovered user identity image; and performing user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request, thereby quickly and safely realizing the recognition processing of the user identity.
The user identity image processing method and the user identity image recognition method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 collects a user identity image, and divides the user identity image into a plurality of image sub-blocks, wherein each image sub-block has the same shape and size; the terminal 102 conducts scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image and sends the scrambling identity image to the server 104; the server 104 is configured with a scrambling parameter for recovering the user identity image based on the scrambled identity image. Wherein, the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to interchange the positions of the image sub-blocks to be processed according to the position interchange parameters.
The server 104 receives a user identity identification request uploaded by the terminal 102, and extracts a scrambling identity image carried by the user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image subblock obtained by segmenting the user identity image according to randomly generated scrambling parameters; the server 104 conducts descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image; the server 104 performs user identification based on the recovered user identification image, obtains a user identification result corresponding to the user identification request, and feeds back the user identification result to the terminal 102.
In another embodiment, the user identification image processing method and the user identification image recognition method may be applied to an application environment as shown in fig. 2. Wherein, the terminal 200 comprises an image scrambling module 202 and an image descrambling module 204,
the image scrambling module 202 collects a user identity image, and divides the user identity image into a plurality of image sub-blocks, wherein each image sub-block has the same shape and size; the image scrambling module 202 performs scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image and sends the scrambling identity image to the image descrambling module 204; the image descrambling module 204 is configured with a scrambling parameter for recovering the user identity image based on the scrambled identity image. Wherein, the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to interchange the positions of the image sub-blocks to be processed according to the position interchange parameters.
The image descrambling module 204 receives the user identity identification request sent by the image scrambling module 202, and extracts a scrambling identity image carried by the user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters; the image descrambling module 204 performs descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image; the image descrambling module 204 performs user identity recognition based on the recovered user identity image to obtain a user identity recognition result.
Further, the image scrambling module 202 may be a module for performing image acquisition and image processing, the image descrambling module 204 may be a module for storing a registered user identity image and related privacy information and performing user identity verification, the security level of the image descrambling module 204 is higher than that of the image scrambling module 202, and the image scrambling and descrambling processing is respectively realized by modules with different security levels. When the terminal is attacked and invaded, the image descrambling module with high security level can avoid the leakage of the identity image of the registered user and the related privacy information, thereby realizing the user identity recognition function of the terminal and protecting the information security of the registered user.
The terminal 102 and the terminal 200 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), and a big data and artificial intelligence platform. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
In an embodiment, the registered user identity image and the related privacy information may also be stored in a block chain, so as to facilitate identity recognition of the user identity image recovered based on the scrambled identity image, and feed back the user identity recognition result to a request end of the user identity recognition request, thereby avoiding leakage of the registered user identity image and the related privacy information. And the data security of the block chain is utilized to improve the security of the registered user information.
In one embodiment, as shown in fig. 3, a user identity image processing method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1 or the image scrambling module 202 in fig. 2, and includes the following steps:
step 302, obtaining a plurality of image sub-blocks obtained by segmenting the user identity image, wherein each image sub-block has the same shape and size.
The user identity image is an image containing identity information of a user, and the identity information of the user may specifically be biometric information capable of representing the identity of the user, such as face information, fingerprint information, iris information, and the like.
Segmentation refers to a process of segmenting a complete image into a plurality of identical image sub-blocks, and conversely, the plurality of identical image sub-blocks are pieced together to form the complete image. An image sub-block refers to an independent sub-image on which some processing may be performed separately. Specifically, the content conversion and other processing are performed on one of the image sub-blocks obtained by segmentation, and other image sub-blocks are not affected.
The shape of the image sub-block refers to the existence or representation form of the image sub-block, and as shown in fig. 4, the shape of the image sub-block may be any one of a square, a rectangle, a parallelogram, a regular triangle, a regular hexagon and the like, so as to ensure that the user identity image can be obtained by piecing together after the direction change processing. The size of the image sub-block refers to the size of the image sub-block. The image sub-blocks with the same shape and size are objects that can be completely overlapped by a certain position movement. For example, a plurality of image sub-blocks with 8 × 8 pixels are image sub-blocks with the same shape and size.
Specifically, the terminal or the image scrambling module segments the user identity image according to the shape and size of the user identity image and the image sub-block segmentation parameters to obtain a plurality of image sub-blocks with the same shape and size.
In one embodiment, the image sub-block segmentation parameters may include the number of image sub-blocks, and the shape and size of the segmented image sub-blocks. The user identification image may be an image with a specified shape and size through a normalization process, for example, the user identification image with the specified shape and size through the normalization process may be an image with a pixel composition of 256 × 256, and the image sub-block segmentation parameter may be a square image sub-block with a pixel composition of 8 × 8, so that the user identification image is segmented according to the shape and size of the user identification image (256 × 256) and the image sub-block segmentation parameter (8 × 8), and 32 × 32 square image sub-blocks with a pixel composition of 8 × 8 are obtained.
In another embodiment, the image subblock splitting parameter may include the number of image subblocks and an image symmetry type of the split image subblock, and the shape and size of the user identification image may be determined based on the image symmetry type and number of the image subblocks. Thereby acquiring a user identification image that conforms to the shape and size of the user identification image. The image symmetry type may be determined according to a direction change parameter in the scrambling parameter, for example, if the direction change parameter is a symmetry axis, the corresponding image type is an axisymmetric pattern.
Assuming that 32 × 32 axisymmetric image sub-blocks are required, the shape of the image sub-blocks may be square, rectangular, etc., for example, 32 × 32 pixels constitute 16 × 8 rectangular image sub-blocks, and the required user identity image should be an image with 512 × 256 pixels. For example, 32 × 32 pixels are formed into 8 × 8 square image sub-blocks, the required user identity image should be an image with 256 × 256 pixels. Assuming that 32 x 32 axisymmetric and rotationally symmetric image sub-blocks are desired, the shape of the image sub-blocks may be square.
In one embodiment, the user identity image processing method further includes:
and determining the shape and size of the image subblock based on the minimum compressed pixel unit of the image file format corresponding to the user identity image, wherein the shape and size of the image subblock are the shape and size of the minimum compressed pixel unit or the shape and size of a symmetrical figure formed by a plurality of minimum compressed pixel units.
The image file format is a format in which video information is recorded and stored. The digital image is stored, processed and transmitted in a certain image format, that is, the pixels of the image are organized and stored according to a certain mode, and the image file is obtained by storing the image data into a file.
For example, JPEG (Joint Photographic Experts Group) is an example of a lossy compression scheme, and JPEG is compressed based on a pixel block with a pixel composition of 8 × 8, and image sub-blocks are independent from each other and do not interfere with each other. Correspondingly, the shape and size of the image sub-block may be an image sub-block having a pixel composition of 8 × 8, or may be a pixel sub-block having a plurality of pixel blocks having a pixel composition of 8 × 8, such as 16 × 8, 8 × 16, 16 × 16, and the like.
By dividing the user identity image into one or more image sub-blocks consisting of 8 × 8 pixel blocks consisting of pixels, because the scrambling processing is only direction change processing in the image sub-blocks, the position sequence among the image sub-blocks is randomly scrambled, and the JPEG is compressed based on the 8 × 8 pixel blocks consisting of pixels, no additional image compression effect is introduced in the image compression, thereby improving the accuracy of the user identity image restored based on the scrambled identity image.
And 304, performing scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image. And the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambled identity image. Wherein, the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to interchange the positions of the image sub-blocks to be processed according to the position interchange parameters.
The scrambling parameter is a parameter for determining a scrambling manner of the image subblock to be processed. Specifically, for each image sub-block to be processed, there is a corresponding scrambling parameter. The scrambling parameters include a direction change parameter and a position interchange parameter, the direction change parameter is a parameter for changing the direction of the image content in the image sub-block, and the direction change parameter specifically may be that the image sub-block is rotated clockwise or counterclockwise by a specified angle to change the direction of the image content in the image sub-block, or that the image sub-block is turned upside down or turned left and right to change the direction of the image content in the image sub-block. The position interchange parameter is a parameter for indicating a destination position to which each image sub-block is to be moved, wherein the position interchange may be an image sub-block interchange of any two positions, and referring to fig. 5(a), an image sub-block 1 in a first row and a first column, i.e., a position (1, 1), is interchanged with an image sub-block 2 in a first row and a second column, i.e., a position (1, 2), and an image sub-block 3 in a position (1, 3) is interchanged with an image sub-block 4 in a position (1, 4). As shown in fig. 5(b), the image sub-block 1 at position (1, 1), the image sub-block 2 at position (1, 2), the image sub-block 3 at position (1, 3), and the image sub-block 4 at position (1, 4) may be interchanged to obtain an image sub-block 2 at position (1, 1), an image sub-block 3 at position (1, 2), an image sub-block 4 at position (1, 3), and an image sub-block 1 at position (1, 4).
Specifically, the image sub-blocks subjected to the scrambling processing in accordance with the randomly generated scrambling parameter may be all of the image sub-blocks or some of the plurality of image sub-blocks. The image sub-block subjected to the direction change processing and the image sub-block subjected to the position exchange processing may be the same image sub-block or different image sub-blocks. For example, for 32 × 32 image sub-blocks, the direction change processing may be performed on each image sub-block, and the position exchange processing may be performed on all the image sub-blocks. Alternatively, the direction change process may be performed on a part of the image sub-blocks (for example, 32 × 16) and the position change process may be performed on all the image sub-blocks (32 × 32). The direction change processing may be performed on all the image sub-blocks (32 × 32), and the position exchange processing may be performed on a part of the image sub-blocks (for example, 32 × 16), or the direction change processing may be performed on a first part of the image sub-blocks and the position exchange processing may be performed on a second part of the image sub-blocks, where the same image sub-blocks may or may not be present in the first part of the image sub-blocks and the second part of the image sub-blocks, and the method is not limited herein.
In one embodiment, the terminal conducts scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image. The server corresponding to the terminal stores the scrambling parameter, and the server can restore the scrambled identity image to the user identity image based on the scrambling parameter.
In another embodiment, the image scrambling module performs scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image. The image descrambling module corresponding to the image scrambling module stores the scrambling parameter, and the image descrambling module can restore the scrambled identity image to the user identity image based on the scrambling parameter.
Specifically, the server or the image descrambling module may extract a scrambled identity image obtained through the scrambling process carried in the user identity identification request sent by the terminal or the image scrambling module, perform descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image, and perform user identity identification based on the recovered user identity image to obtain a user identity identification result corresponding to the user identity identification request.
The user identity image processing method comprises the steps of obtaining a plurality of image sub-blocks obtained by segmenting a user identity image, segmenting the user identity image from a whole to obtain a plurality of image sub-blocks with the same shape and size, so that the image sub-blocks at different segmentation positions can realize position interchange, carrying out scrambling processing on at least a part of the image sub-blocks in the image sub-blocks according to randomly generated scrambling parameters to obtain a scrambled identity image, obtaining the scrambling parameters of the user identity image through recovery based on the scrambled identity image, conveniently and quickly recovering to obtain the user identity image, wherein the scrambling processing comprises the steps of carrying out direction change on the image sub-blocks to be processed according to the direction change parameters in the scrambling parameters, carrying out position interchange on the image sub-blocks to be processed according to the position interchange parameters in the scrambling parameters, and carrying out scrambling processing based on the direction change processing and the position interchange processing, the complexity of scrambling the user identity image is reduced, the scrambling processing is conveniently and quickly carried out to obtain the scrambled identity image, the possibility that the scrambled identity image is violently cracked is reduced, and therefore the scrambled identity image with high safety can be quickly obtained.
In one embodiment, the user identity image processing method further includes:
determining candidate direction change parameters of the image subblocks according to the shapes of the image subblocks, and performing direction change processing on the image subblocks according to any one of the candidate direction change parameters without changing the shapes and the sizes of the image subblocks;
and randomly generating direction change parameters corresponding to the image sub-blocks to be subjected to the direction change processing based on the candidate direction change parameters.
The candidate direction change parameter refers to a parameter that does not change the shape and size of the image sub-block before and after the direction change processing is performed on the image sub-block, the candidate direction change parameter changes the image content in the image sub-block, and specifically changes the direction of the image content.
The shape of the image sub-blocks may be a pre-configured parameter, with different shapes of image sub-blocks having different candidate direction change parameters. The direction change parameters are randomly generated based on the candidate direction change parameters, so that the shape and the size of the image subblocks are not changed after the image subblocks are subjected to the direction change processing, and the scrambled identity image spliced by the image subblocks subjected to the scrambling processing has the same shape as the user identity image. The randomness of the direction change parameters corresponding to the image subblocks to be subjected to the direction change processing is ensured, and the safety of the scrambled identity image subjected to the direction change processing based on the direction change parameters is improved.
The image sub-blocks to be subjected to the direction change processing may be all image sub-blocks, or may be partial image sub-blocks selected from all image sub-blocks, for example, as shown in fig. 6(a), 32 × 16 image sub-blocks in the left half of the 32 × 32 image sub-blocks are taken as the image sub-blocks to be subjected to the direction change processing, and for example, as shown in fig. 6(b), all the image sub-blocks are taken as the image sub-blocks to be subjected to the direction change processing.
And the relative position of the image subblock to be processed in the user identity image during the direction change processing is the same as that of the image subblock to be processed in the user identity image corresponding to the randomly generated direction change parameter. For example, if the image subblock to be subjected to the direction change processing is an even-numbered image subblock, the image subblock to be processed during the direction change processing is also an even-numbered image subblock, so as to ensure that the scrambling process and the descrambling process are performed on the same image subblock, and ensure the accuracy of the user identity image obtained by descrambling.
In one embodiment, the image sub-blocks are symmetric graphs; determining candidate direction change parameters of the image subblocks according to the shapes of the image subblocks, wherein the candidate direction change parameters comprise:
determining candidate direction change parameters of the image subblocks according to the symmetry type of the image subblocks, wherein the symmetry type of the image subblocks comprises at least one of a rotationally symmetric figure and an axially symmetric figure; the candidate direction change parameter of (a) includes a plurality of candidate rotation angle parameters; the candidate direction change parameters of the axisymmetric pattern include a plurality of candidate symmetry-axis parameters.
The rotationally symmetrical figure is a figure which is superposed with an initial figure after a plane figure rotates alpha (radian) around a fixed point on the plane, wherein the fixed point is called a rotational symmetry center, and the rotating angle is called a rotating angle. The rotation angle parameter may be an angle corresponding to the rotation angle, or may be a parameter for characterizing the angle corresponding to the rotation angle. The axisymmetric pattern is a pattern which is folded along a straight line and the parts at the two sides of the straight line can be completely superposed. This line is called the symmetry axis. The symmetry axis parameter may be a relative position of the symmetry axis in the graph, and may also be a parameter for characterizing the relative position of the symmetry axis in the graph.
For example, a square image sub-block is both a rotationally symmetric pattern and an axially symmetric pattern. The candidate direction change parameters of the square image sub-block may include rotation angle parameters of 0 ° (or 360 °), 90 °, 180 °, and 270 ° corresponding to the four direction changes of the image sub-block of the first row and the first column shown in fig. 7(a), and may also be based on symmetry axis parameters of a vertical direction (i.e., 0 ° direction), a 45 ° direction, a horizontal direction (i.e., 90 ° direction), and a 135 ° direction, in which a line on which a diagonal line of the square is located along a symmetry axis of 45 ° or 135 ° corresponding to the four direction changes of the image sub-block of the first row and the second column shown in fig. 7 (b). The overturning along the symmetry axis in the vertical direction is left-right overturning, and the overturning along the symmetry axis in the horizontal direction is up-down overturning.
For another example, the candidate direction change parameters of the image subblock of the rectangle may include a rotation angle parameter by 0 ° or 180 °, a symmetry axis parameter based on a vertical direction or a horizontal direction. It should be noted that the candidate direction change parameter may be one of a rotation parameter and a flipping parameter, or may include both the rotation parameter and the flipping parameter.
In this embodiment, based on the symmetry type of the image sub-blocks, the candidate direction change parameters of the image sub-blocks can be quickly determined through the symmetry axis or the rotation angle, and the direction change processing performed based on the candidate direction change parameters can be ensured without changing the size and shape of the image sub-blocks, so that the scrambled identity image assembled by the image sub-blocks after the scrambling processing has the same shape as the user identity image. The randomness of the direction change parameters corresponding to the image subblocks to be subjected to the direction change processing is ensured, and the safety of the scrambled identity image subjected to the direction change processing based on the direction change parameters is improved.
In one embodiment, the direction change parameter may carry relative position information of the image sub-block to be subjected to the direction change processing in the user identity image. Specifically, the direction change parameter includes a coding parameter matrix. Randomly generating direction change parameters corresponding to the image sub-blocks to be subjected to the direction change processing based on the candidate direction change parameters, wherein the direction change parameters comprise:
encoding the candidate direction change parameters, and determining candidate encoding parameters corresponding to each candidate direction change parameter; and randomly generating an encoding parameter matrix based on the candidate encoding parameters, wherein the position of each element in the encoding parameter matrix represents the relative position of the image subblock to be subjected to the direction change processing in the user identity image, and the element value of each element is the encoding parameter corresponding to the image subblock to be subjected to the direction change processing.
The encoding parameter matrix may be an encoding parameter matrix of [ N, M ], an encoding parameter matrix of [ N × M, 1], or an encoding parameter matrix of [1, N × M ], that is, an encoding parameter sequence, for the user identity image obtained by segmenting the N × M image sub-blocks.
Taking the user identity image obtained by segmenting the 32 × 32 square image sub-blocks as an example, the direction change parameter may be represented by a 32 × 32 encoding parameter matrix or a 1024-bit encoding parameter sequence. The position of each element in the encoding parameter matrix or the encoding parameter sequence represents an image sub-block corresponding to each slice position of the user identity image, for example, a 32 th bit in a 1024-bit encoding parameter sequence may represent an image sub-block in a row 1 and a 32 th column, and a 33 th bit may represent an image sub-block in a row 2 and a 1 st column. The value of each element in the coding parameter matrix or coding parameter sequence represents the direction change parameter of the image sub-block corresponding to the element. For example, the candidate direction change parameters corresponding to four different rotation angles of a square are represented by 0 to 3. If the rotation angles 0 °, 90 °, 180 ° and 270 ° are encoded in sequence as [0, 1, 2, 3], one possible encoding parameter sequence θ is: θ = [2, 2, 3, 1, 0, 2, …, 3, 2, 0 ]. For another example, the candidate direction change parameters corresponding to the symmetry axes at four different positions of the square may be represented by 4 to 7, and the combinations of different rotation angles and different symmetry axes may be represented by other numerical values or numerical value combinations.
In this embodiment, the encoding parameter matrix is randomly generated by using the candidate encoding parameters corresponding to each candidate direction change parameter, so that not only can the direction change parameter corresponding to each image sub-block to be subjected to the direction change processing be accurately represented, but also the relative position of each image sub-block to be subjected to the direction change processing in the user identity image can be accurately represented, and thus, the accurate and recoverable scrambling processing for the user identity image can be realized.
In one embodiment, the user identity image processing method further includes:
determining a position parameter corresponding to each relative position based on the relative position of the image subblock to be subjected to position interchange processing in the user identity image;
and randomly scrambling the position parameters to obtain position interchange parameters corresponding to the image subblocks to be subjected to position interchange processing.
The position parameter is a parameter used for representing a relative position of an image sub-block to be subjected to position exchange processing in the user identity image, and specifically may be a coordinate of a reference point of the image sub-block in a coordinate system corresponding to the user identity image, where the reference point may be a central point or any vertex of the image sub-block, and the like. The random scrambling of the position parameters may be specifically realized by means of multiple pairwise interactions of the position parameters, or by means of single random exchanges of multiple position parameters, and the like.
In this embodiment, random scrambling is performed through the position parameters of the image sub-blocks to be subjected to the position exchange processing, so that the position exchange parameters corresponding to the image sub-blocks to be subjected to the position exchange processing can be obtained, it is convenient to accurately find the corresponding replacement positions based on the position exchange parameters during the position exchange processing, and on the premise of ensuring that position recovery can be subsequently performed based on the position exchange parameters, simple and rapid position exchange of the image sub-blocks is realized, so that a scrambled identity image with high safety is obtained.
In one embodiment, the position parameters include row-column data combinations of the image subblocks to be subjected to position interchange processing in the image subblock matrix obtained by segmentation; the position interchange parameter comprises a row and column data combination matrix which is randomly generated by scrambling the row and column data combination; and the positions of the elements in the row-column data combination matrix represent the relative positions of the image sub-blocks to be subjected to the position interchange processing in the user identity image.
The image sub-block matrix refers to image sub-blocks arranged in rows and columns. The row-column data combination refers to the combination of the number of rows and the number of columns of the image subblock to be subjected to the position exchange processing in the image subblock matrix, for example, (2, 5) indicates the position of the second row and the fifth row in the image subblock matrix.
For example, for the user identity image obtained by segmenting the user identity image into N × M image sub-blocks, the column-column data combination matrix randomly generated by scrambling the column-column data combination may be the column-column data combination matrix of [ N, M, 2], or the encoding parameter matrix of [ N × M, 2] or the column-column data combination matrix of [2, N × M ]. Taking the coding parameter matrix of [ N × M, 2] as an example, the 2-dimensional vector of each row represents the number of rows and columns of the image subblock in the scrambled image.
In this embodiment, by using a row-column data combination matrix randomly generated by scrambling a row-column data combination corresponding to an image sub-block to be subjected to position interchange, based on the row-column data combination, not only can a row-column position corresponding to each image sub-block to be subjected to position interchange be accurately represented, but also a replacement position corresponding to the image sub-block at each position can be accurately represented, and on the premise of ensuring that position recovery can be subsequently performed based on position interchange parameters, simple and rapid position interchange of the image sub-blocks is realized, so that a scrambled identity image with high security and recoverability is obtained.
In one embodiment, the scrambling processing is performed on at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image, and the method includes:
sequentially executing or nesting execution direction change processing and position interchange processing aiming at least one part of image sub-blocks in the plurality of image sub-blocks to obtain a scrambling identity image; the sequential execution is an execution mode which takes the output of one of the direction change processing and the position interchange processing as the input of the other processing aiming at the same image subblock; the nested execution is an execution mode in which the direction change processing is performed in the process of the position exchange processing for the same image subblock.
Wherein the direction change processing and the position interchange processing, which are sequentially performed, may be directed to image sub-blocks at different positions. The direction change processing and the position interchange processing performed in the nesting require image sub-blocks for the same position. Specifically, the sequential execution includes performing the direction change processing first and then the position exchange processing, and performing the position exchange processing first and then the direction change processing. In an embodiment, the order of execution of the direction change process and the position exchange process is used to derive the user identity image based on scrambled identity image recovery. The execution sequence when the user identity image is obtained through scrambling processing is reciprocal to the execution sequence of the user identity image obtained through descrambling and recovering.
Specifically, the first direction changing process and the second position exchanging process may be performed by changing a direction of an image subblock to be subjected to the direction changing process in the image subblock matrix based on a direction changing parameter to obtain an updated image subblock matrix including the image subblock subjected to the direction changing process, and then performing position exchanging on the image subblock to be subjected to the position exchanging process in the updated image subblock matrix based on a position exchanging parameter to obtain a displaced identity image.
Specifically, the position exchange processing and the direction change processing may be performed first by performing position exchange on the image subblocks to be subjected to the position exchange processing in the image subblock matrix based on the position exchange parameter to obtain an updated image subblock matrix including the image subblocks subjected to the position exchange, and then performing direction change on the image subblocks to be subjected to the direction change processing in the updated image subblock matrix based on the direction change parameter to obtain the permuted identity image.
Specifically, the execution mode of performing the direction change processing in the process of the position interchange processing for the same image subblock may be to extract the image subblock at the position of the image subblock from an image subblock matrix based on the position of the image subblock represented by the position of the element corresponding to the position interchange parameter, perform the direction change processing on the extracted image subblock based on the direction change parameter corresponding to the position of the image subblock, and place the image subblock after the direction change processing in the replacement position corresponding to the position interchange parameter. Or, based on the replacement position represented by the position interchange parameter, extracting the image sub-block at the replacement position represented by the position interchange parameter from the image sub-block matrix, based on the direction change parameter corresponding to the position of the image sub-block, performing direction change processing on the extracted image sub-block, and placing the image sub-block after the direction change processing at the position of the image sub-block represented by the position interchange parameter corresponding element position.
By defining the execution sequence of the direction change processing and the position interchange processing, the diversity of the scrambling result can be further increased, the security of the scrambled identity image is improved, and the privacy disclosure of the user caused by brute force cracking of the scrambled identity image is avoided.
In one embodiment, the direction change processing is to change the directions of a plurality of image sub-blocks to be processed in parallel according to the direction change parameters through multiple threads; and the position interchange processing is to perform position interchange on a plurality of image sub-blocks to be processed in parallel according to the position interchange parameters through multithreading.
The multithreading parallel processing can be realized by a multi-core processor or a multi-core chip, wherein the multi-core processor is formed by integrating two or more complete computing engines (cores) in one processor, the processor can support a plurality of processors on a system bus at the moment, and a bus controller provides all bus control signals and command signals. By dividing tasks, the thread application can fully utilize a plurality of execution kernels, can execute more tasks in specific time, and can meet the requirements of a user on simultaneously performing multi-task processing and multi-task computing environment.
In one embodiment, the user identity image processing method further includes:
performing identity information key point identification on the acquired user image, and determining the position of the identity information key point in the user image;
and based on the position of the identity information key point in the user image, cutting the user image through key point alignment processing to obtain the user identity image containing the identity information key point.
The identity information key points refer to key points for determining user identity information in a user image, for example, key facial feature points in a face image of a user, such as eyes, nose tips, mouth corner points, eyebrows, contour points of each part of the face, and the like. As another example, eye contour points, pupils, etc. in the user's iris image. After the user image is collected, identify identity information key points in the user image are identified. Based on the position of the identity information key point in the user image, determining the area of the user identity image in the user image through key point alignment processing, and cutting out the user identity image which meets the size and shape requirements of the user identity image and contains the identity information key point from the user image based on the size and shape requirements of the user identity image.
In this embodiment, the user image is clipped by the key point alignment processing based on the identified identity information key point, and the necessary image content can be extracted in a targeted manner, so that the influence of the unnecessary image content is reduced, and the processing speed of the scrambling processing is increased.
In one embodiment, the scrambling according to the randomly generated scrambling parameter comprises:
when the matching between the image type corresponding to the user identity image and the currently selected scrambling parameter fails, the scrambling parameter matched with the image type is selected from the scrambling parameter set for scrambling, and the scrambling parameter set comprises a plurality of randomly generated scrambling parameters matched with the image type.
The user identity image carries attribute information used for representing the category of the user identity image, and the image type corresponding to the user identity image is determined through the attribute information. The scrambling parameters may be randomly generated based on the image type of the user identity image, one image type corresponding to a set of scrambling parameters. Specifically, the image types may be specifically classified into a user face image, a user iris image, a user fingerprint image, and the like. Different categories can be distinguished based on the terminal type of the acquisition terminal information carried by the user identity image.
The scrambling parameter set comprises a plurality of randomly generated groups of scrambling parameters matched with the image types, so that when the image type corresponding to the user identity image fails to be matched with the currently selected scrambling parameter, the scrambling parameter matched with the image type can be selected from the scrambling parameter set to be scrambled. And configuring corresponding randomly generated scrambling parameters based on the image type, so that the security of scrambling the identity image can be improved.
In one embodiment, as shown in fig. 8, a method for identifying a user identity image is provided, which is described by taking the method as an example of the image descrambling module 204 applied in the server 104 in fig. 1 or the terminal 200 in fig. 2, and includes the following steps:
step 802, extracting a scrambling identity image carried by the user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters.
And 804, performing descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image.
Step 806, performing user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
The user identity identification request may be a request carrying a scrambled identity image, which is sent to a server or an image descrambling module after a terminal or an image scrambling module performs scrambling processing on at least a part of image sub-blocks obtained by segmenting a user identity image according to a randomly generated scrambling parameter to obtain a scrambled identity image, and is used for requesting the server or the image descrambling module to descramble the scrambled identity image through the scrambling parameter and identifying a user identity corresponding to the user identity image obtained by the descrambling processing. Specifically, the user identity identification request may be initiated by an application program, and after the terminal or the image scrambling module performs scrambling processing on the user identity image to obtain a scrambled identity image, the scrambled identity image is added to the user identity identification request initiated by the application program, and the user identity identification request carrying the scrambled identity image is sent to the server or the image descrambling module.
It is understood that the scrambled identity image herein includes, but is not limited to, an image obtained based on the user identity image processing method described above. As shown in fig. 9, the left image is a user identity image acquired by the terminal or image scrambling module, the middle image is a scrambling identity image obtained by the terminal or image scrambling module through image sub-block segmentation and scrambling and sent to the server or image descrambling module, and the right image is a restored user identity image obtained by the server or image descrambling module through descrambling.
Wherein the descrambling process is the inverse of the scrambling process. Specifically, the server or the image descrambling module may obtain a corresponding descrambling parameter based on the scrambling parameter, perform descrambling processing based on the descrambling parameter, or directly perform reverse descrambling processing based on the scrambling parameter. For example, the descrambling parameter corresponding to the scrambling parameter rotated by 90 ° clockwise is rotated by 270 ° clockwise or rotated by 90 ° counterclockwise; the reverse process of rotating 90 ° clockwise is rotating 90 ° counterclockwise.
The user identification can specifically determine the user identity by comparing with a user feature library. Specifically, the server or the image descrambling module extracts user identity feature data from the restored user identity image by using a pre-designed user feature extraction scheme such as a deep convolutional neural network, compares the extracted user identity feature data with a user feature library, obtains a user identity recognition result that a user corresponding to the user identity recognition request is a legal user when the comparison result is an object successfully matched with the user feature library, and obtains a user identity recognition result that a user corresponding to the user identity recognition request is an illegal user when the comparison result is not an object successfully matched with the user feature library. The user identity recognition result is set as a legal user and an illegal user, so that the transmitted recognition result is only the user identity, the user identity information is not leaked, and the safety of the user identity image and the user identity information is improved.
The user identity image identification method ensures the safety of the scrambled identity image by extracting the scrambled identity image carried by the user identity identification request and carrying out scrambling processing on the image subblock obtained by segmenting the user identity image according to the randomly generated scrambling parameter to obtain the scrambled identity image, the method comprises the steps of conducting descrambling processing on a scrambled identity image to obtain a recovered user identity image, conducting user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to a user identity recognition request, and conducting scrambling and descrambling based on scrambling parameters.
In one embodiment, the scrambling parameters include a direction change parameter and a position interchange parameter; the descrambling processing comprises direction recovery processing and position recovery processing; the direction recovery processing is to recover the direction of the scrambled image sub-blocks in the scrambled identity image according to the direction change parameters; and position recovery is carried out on the scrambled image sub-blocks in the scrambled identity image according to the position interchange parameters.
The scrambled image sub-block refers to an image sub-block subjected to scrambling processing, specifically, the scrambled image sub-block corresponding to direction restoration processing refers to an image sub-block subjected to direction change processing, and the scrambled image sub-block corresponding to position restoration processing refers to an image sub-block subjected to position exchange processing.
Further, the descrambling processing may further include an execution order of the direction recovery processing and the position recovery processing, and the execution order of the direction recovery processing and the position recovery processing in the descrambling processing is reverse to the execution order of the direction change processing and the position exchange processing in the scrambling processing.
By the direction recovery processing and the position recovery processing, on the premise of ensuring the safety of the user identity image, the image recovery processing can be quickly and accurately carried out on the scrambled identity image which is scrambled based on the scrambling parameter.
In one embodiment, as shown in fig. 10, a user identification image processing method and a user identification image recognition method are provided, the user identification image processing method is applied to a terminal and includes the following steps 1002 to 1024, and the user identification image recognition method is applied to a server and includes the following steps 1026 to 1030.
Step 1002, determining the shape and size of the image sub-block based on the minimum compressed pixel unit of the image file format corresponding to the user identity image.
Step 1004, determining candidate direction change parameters of the image subblocks according to the symmetry type corresponding to the shape of the image subblock, wherein the symmetry type of the image subblock comprises at least one of a rotational symmetry figure and an axial symmetry figure; the candidate direction change parameters of the rotational symmetry figure comprise a plurality of candidate rotation angle parameters; the candidate direction change parameters of the axisymmetric pattern include a plurality of candidate symmetry-axis parameters.
Step 1006, encoding the candidate direction change parameters, and determining a candidate encoding parameter corresponding to each candidate direction change parameter.
And step 1008, randomly generating an encoding parameter matrix based on the candidate encoding parameters, wherein the positions of elements in the encoding parameter matrix represent the relative positions of the image sub-blocks to be subjected to the direction change processing in the user identity image, and the element values are encoding parameters corresponding to the image sub-blocks to be subjected to the direction change processing.
Step 1010, determining a row and column data combination corresponding to each relative position based on the relative positions of the image sub-blocks to be subjected to the position interchange processing in the user identity image.
And 1012, randomly scrambling the row-column data combination to obtain a row-column data combination matrix corresponding to the image subblock to be subjected to the position interchange processing, wherein the positions of the elements in the row-column data combination matrix represent the relative positions of the image subblock to be subjected to the position interchange processing in the user identity image.
And 1014, identifying the identity information key points of the acquired user image, and determining the positions of the identity information key points in the user image.
Step 1016, based on the position of the identity information key point in the user image, the user image is cropped through key point alignment processing to obtain the user identity image containing the identity information key point.
And step 1018, segmenting the user identity image according to the shape and the size of the image sub-blocks to obtain a plurality of image sub-blocks.
Step 1020, when the matching between the image type corresponding to the user identity image and the currently selected scrambling parameter fails, selecting a scrambling parameter matched with the image type from the scrambling parameter set, wherein the scrambling parameter comprises a coding parameter matrix and a row-column data combination matrix.
Step 1022, sequentially executing or nesting execution of direction change processing and position interchange processing for at least a part of image sub-blocks in the plurality of image sub-blocks to obtain a scrambling identity image; the direction change processing is to change the direction of the image subblocks to be processed according to the coding parameter matrix; and the position interchange processing is to interchange the positions of the image subblocks to be processed according to the row and column data combination matrix.
And step 1024, generating a user identity identification request carrying the scrambled identity image and sending the user identity identification request to the server.
Step 1026, extracting the scrambled identity image carried by the user identity identification request.
Step 1028, based on the scrambling parameter, performing descrambling processing on the scrambled identity image to obtain a recovered user identity image.
And step 1030, performing user identity identification based on the recovered user identity image to obtain a user identity identification result corresponding to the user identity identification request.
The application scene can be specifically a face recognition scene such as security, entrance guard, payment and the like, and the user identity image processing method and the user identity image recognition method are applied to the application scene. Specifically, the application of the user identity image processing method and the user identity image recognition method in face recognition is as follows:
as shown in fig. 11, the method mainly includes the following processes, and the feature extraction and the feature comparison may be performed at the front end (local) and the cloud end (background) according to different specific scenes:
firstly, an application program initiates a face recognition request for a specific service to try to determine the identity of a user; the method comprises the steps that a front-end camera collects a user image containing a face area of a user; and (3) obtaining preset face key points such as 5 key points of left and right eyes, nose tips and left and right mouth corners by using a face detection and registration algorithm. The face image is aligned based on face key points to obtain a face image with a preset size such as N x N, and face detection and registration can be specifically performed through open source algorithms such as MTCNN (Multi-task captured connected Networks, a face detection and face alignment method based on deep learning) or RetinaFace (face detection algorithm). And cutting the face image of N by N into image sub-blocks of B by B size. Taking 256 × 256 original image divided into 8 × 8 image sub-blocks as an example, an image sub-block matrix consisting of 32 × 32=1024 image sub-blocks can be obtained; carrying out direction change on image subblocks in the image subblock matrix according to a predetermined angle code, and carrying out position interchange according to a row-column data combination matrix to obtain a scrambled identity image so as to protect the privacy of a user; specifically, according to the encoding parameter matrix, each image sub-block is rotated by 0 °, 90 °, 180 ° and 270 °, and the rotation angle of each sub-block is determined by the predetermined angle encoding. Taking N =256 and B =8 as an example, the encoding parameter matrix is an encoding parameter sequence θ with a length of 1024 bits. If 0 degrees, 90 degrees, 180 degrees and 270 degrees are sequentially coded as [0, 1, 2, 3]],θ=[2,2,3,1,0,2,…,3,2,0]Since the rotation between different sub-blocks is not affected each other, the direction change process can be accelerated by using a multi-core chip. And randomly scrambling the positions of the image sub-blocks subjected to the direction change processing in the original face image. The position code of scrambling dependence is generated randomly in advance, and the row-column data combination matrix omega is (N/B)2A x 2-dimensional matrix, the 2-dimensional vector of each row representing the coordinates or row-column position of the image sub-block in the scrambled image. For example, N =256 and B =8, the row-column data combination matrix is 1024 × 2 dimensions, such as:
Figure 393455DEST_PATH_IMAGE001
and transmitting the scrambled face image to a cloud terminal by using the internet, and transmitting the face image to a local image descrambling module for user identity recognition if a local recognition scheme is adopted. The face image after scrambling may be a scrambled face image composed of 4 × 4 scrambled image sub-blocks as shown in fig. 12(a), or may be a scrambled face image composed of 32 × 32 scrambled image sub-blocks as shown in fig. 12 (b). The number of the scrambled image sub-blocks for scrambling the face image can be set according to actual needs.
At the cloud end/front end, recovering an original face image according to a pre-designed descrambling scheme, wherein the descrambling scheme is obtained based on a coding parameter matrix and a row and column data combination matrix, and the recovery process and the scrambling process of the face image are reciprocal processes; extracting human face features by using a human face extraction scheme such as a deep convolutional neural network scheme; based on algorithms such as arcface (a face recognition algorithm) and the like, the method compares the algorithm with a cloud/front-end registered user feature library to determine the user identity, and returns the user identity recognition result to the application program initiating the recognition request. Scrambling parameters such as the coding parameter matrix and the row and column data combination matrix can be replaced regularly to improve safety.
By the method, the face images can be efficiently and safely scrambled on the premise of not obviously increasing the time consumption of the whole face recognition system flow and being difficult to crack, the privacy of the user is greatly protected, and the face recognition system with the privacy guaranteed in place can technically eliminate the worry of the user about the system and improve the acceptance of the system, so that the service scale is further enlarged, and the production and life of people are facilitated better.
In addition, by the method, firstly, the introduction of an additional image compression effect can be avoided, a lossy compression scheme represented by a JPEG compression technology is used for compressing the image on the basis of 8-by-8 blocks, and the image sub-blocks are independent from each other and do not interfere with each other. According to the user identity image processing method, the face image of the user is divided into 8-by-8 sub-blocks, only rotation processing is carried out in the sub-blocks, and the position sequence is randomly disturbed among the sub-blocks, so that an additional image compression effect is not introduced; secondly, the safety is high: taking 256 × 256 aligned face images as an example, 1024 sub-blocks can be obtained by segmenting 8 × 8 image sub-blocks, each sub-block has 4 rotation modes, so that 5.4E2640 × 4=2.2E2641 possibilities exist, and each scheme needs manual confirmation of correct and wrong positions, so that the scheme can not be cracked theoretically; thirdly, the scrambling and descrambling speeds are fast: firstly, the scrambling and the descrambling of the scheme have the same time consumption, and the segmentation, the scrambling and the descrambling of the image subblocks can fully utilize the computing capacity of a multi-core chip. Different from the traditional scheme of knight tour, Arnold transformation and affine transformation, which can achieve the purpose of scrambling only by transforming the image for a plurality of times, the scheme can efficiently ensure that the face information cannot be distinguished by naked eyes only by transforming the image once.
It should be understood that, although the steps in the flowcharts of fig. 3, 9 and 10 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3, 9, and 10 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 13, there is provided a user identity image processing apparatus 1300, which may be a part of a computer device by using a software module or a hardware module, or a combination of the two, and specifically includes an image segmentation module 1302 and an image sub-block scrambling module 1304:
the image segmentation module 1302 is configured to obtain a plurality of image sub-blocks obtained by segmenting the user identity image, where each image sub-block has the same shape and size;
an image sub-block scrambling module 1304, configured to perform scrambling processing on at least a part of image sub-blocks in the plurality of image sub-blocks according to a randomly generated scrambling parameter, so as to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining a user identity image based on the scrambled identity image;
wherein, the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to interchange the positions of the image sub-blocks to be processed according to the position interchange parameters.
In one embodiment, the direction change processing is to change the directions of a plurality of image sub-blocks to be processed in parallel according to the direction change parameters through multiple threads; and the position interchange processing is to perform position interchange on a plurality of image sub-blocks to be processed in parallel according to the position interchange parameters through multithreading.
In one embodiment, the user identity image processing device further comprises a candidate direction change parameter determination module and a direction change parameter generation module;
the candidate direction change parameter determining module is used for determining candidate direction change parameters of the image subblocks according to the shapes of the image subblocks, and performing direction change processing on the image subblocks according to any one of the candidate direction change parameters without changing the shapes and the sizes of the image subblocks;
and the direction change parameter generation module is used for randomly generating the direction change parameters corresponding to the image subblocks to be subjected to the direction change processing based on the candidate direction change parameters.
In one embodiment, the user identity image processing apparatus further includes an image sub-block shape and size determining module, configured to determine a shape and size of an image sub-block based on a minimum compressed pixel unit of the user identity image corresponding to the image file format, where the shape and size of the image sub-block is the shape and size of the minimum compressed pixel unit or the shape and size of a symmetric pattern formed by a plurality of minimum compressed pixel units.
In one embodiment, the image sub-blocks are symmetric graphs; the candidate direction change parameter determining module is further used for determining candidate direction change parameters of the image subblocks according to the symmetry types of the image subblocks, wherein the symmetry types of the image subblocks comprise at least one of a rotationally symmetric figure and an axially symmetric figure; the candidate direction change parameters of the rotational symmetry figure comprise a plurality of candidate rotation angle parameters; the candidate direction change parameters of the axisymmetric pattern include a plurality of candidate symmetry-axis parameters.
In one embodiment, the direction change parameter comprises a matrix of encoding parameters; the direction change parameter generation module comprises a candidate coding parameter determination module and a coding parameter matrix generation module;
the candidate coding parameter determining module is used for coding the candidate direction change parameters and determining candidate coding parameters corresponding to each candidate direction change parameter;
and the coding parameter matrix generating module is used for randomly generating a coding parameter matrix based on the candidate coding parameters, the position of each element in the coding parameter matrix represents the relative position of the image subblock to be subjected to the direction change processing in the user identity image, and the element value of each element is the coding parameter corresponding to the image subblock to be subjected to the direction change processing.
In one embodiment, the user identity image processing device further comprises a position parameter determining module and a position parameter scrambling module;
the position parameter determining module is used for determining a position parameter corresponding to each relative position based on the relative positions of the image subblocks to be subjected to the position interchange processing in the user identity image;
and the position parameter scrambling module is used for randomly scrambling the position parameters to obtain the position interchange parameters corresponding to the image subblocks to be subjected to the position interchange processing.
In one embodiment, the position parameters include row-column data combinations of the image subblocks to be subjected to position interchange processing in the image subblock matrix obtained by segmentation; the position interchange parameter comprises a row and column data combination matrix which is randomly generated by scrambling the row and column data combination; and the positions of the elements in the row-column data combination matrix represent the relative positions of the image sub-blocks to be subjected to the position interchange processing in the user identity image.
In one embodiment, the image sub-block scrambling module is further configured to sequentially execute or nest the direction change processing and the position interchange processing on at least a part of image sub-blocks in the plurality of image sub-blocks to obtain a scrambled identity image; the sequential execution is an execution mode which takes the output of one of the direction change processing and the position interchange processing as the input of the other processing aiming at the same image subblock; the nested execution is an execution mode in which the direction change processing is performed in the process of the position exchange processing for the same image subblock.
In one embodiment, the user identity image processing device further comprises an identity information key point recognition module and a user image cutting module;
the identity information key point identification module is used for carrying out identity information key point identification on the acquired user image and determining the position of the identity information key point in the user image;
and the user image cutting module is used for cutting the user image through key point alignment processing based on the position of the identity information key point in the user image to obtain the user identity image containing the identity information key point.
In an embodiment, the image sub-block scrambling module is further configured to select a scrambling parameter matched with the image type from a scrambling parameter set for scrambling processing when the image type corresponding to the user identity image fails to be matched with the currently selected scrambling parameter, where the scrambling parameter set includes a plurality of randomly generated scrambling parameters matched with the image type.
In one embodiment, as shown in fig. 14, there is further provided a user identity image processing apparatus 1400, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, and specifically includes a scrambled identity image extraction module 1402, an image descrambling module 1404, and a user identity recognition module 1406:
a scrambling identity image extracting module 1402, configured to extract a scrambling identity image carried by the user identity identification request, where the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to a randomly generated scrambling parameter;
an image descrambling module 1404, configured to perform descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image;
and the user identity recognition module 1406 is configured to perform user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
In one embodiment, the scrambling parameters include a direction change parameter and a position interchange parameter; the descrambling processing comprises direction recovery processing and position recovery processing; the direction recovery processing is to recover the direction of the scrambled image sub-blocks in the scrambled identity image according to the direction change parameters; and position recovery is carried out on the scrambled image sub-blocks in the scrambled identity image according to the position interchange parameters.
For specific limitations of the user identity image processing apparatus and the user identity image recognition apparatus, reference may be made to the above limitations of the user identity image processing method and the user identity image recognition method, which are not described herein again. The modules in the user identity image processing device and the user identity image recognition device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 15. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the scrambling parameter. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a user identity image recognition method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 16. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a user identity image processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configurations shown in fig. 15 and 16 are block diagrams of only some of the configurations relevant to the present application, and do not constitute a limitation on the computing devices to which the present application may be applied, and a particular computing device may include more or less components than those shown, or some of the components may be combined, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (17)

1. A user identity image processing method is characterized by comprising the following steps:
obtaining a plurality of image sub-blocks obtained by segmenting a user identity image, wherein each image sub-block has the same shape and size;
scrambling at least a part of image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
2. The method of claim 1, further comprising:
determining candidate direction change parameters of the image subblocks according to the shapes of the image subblocks, and performing direction change processing on the image subblocks according to any one of the candidate direction change parameters without changing the shapes and the sizes of the image subblocks;
and randomly generating direction change parameters corresponding to the image sub-blocks to be subjected to the direction change processing based on the candidate direction change parameters.
3. The method of claim 2, wherein the image sub-blocks are symmetric patterns;
the determining the candidate direction change parameters of the image sub-blocks according to the shapes of the image sub-blocks comprises:
determining candidate direction change parameters of the image subblocks according to the symmetry types of the image subblocks, wherein the symmetry types of the image subblocks comprise at least one of a rotation symmetry figure and an axial symmetry figure; the candidate direction change parameters of the rotational symmetry figure comprise a plurality of candidate rotation angle parameters; the candidate direction change parameters of the axisymmetric pattern include a plurality of candidate symmetry-axis parameters.
4. The method of claim 2, further comprising:
determining the shape and size of an image sub-block based on the minimum compressed pixel unit of an image file format corresponding to a user identity image, wherein the shape and size of the image sub-block are the shape and size of the minimum compressed pixel unit or the shape and size of a symmetrical graph formed by a plurality of minimum compressed pixel units.
5. The method of claim 2, wherein the direction change parameter comprises a matrix of coding parameters;
the randomly generating direction change parameters corresponding to the image sub-blocks to be subjected to the direction change processing based on the candidate direction change parameters comprises:
encoding the candidate direction change parameters, and determining candidate encoding parameters corresponding to each candidate direction change parameter;
and randomly generating an encoding parameter matrix based on the candidate encoding parameters, wherein the position of each element in the encoding parameter matrix represents the relative position of the image subblock to be subjected to the direction change processing in the user identity image, and the element value of each element is the encoding parameter corresponding to the image subblock to be subjected to the direction change processing.
6. The method of claim 1, further comprising:
determining a position parameter corresponding to each relative position based on the relative positions of the image sub-blocks to be subjected to position interchange processing in the user identity image;
and randomly scrambling the position parameters to obtain position interchange parameters corresponding to the image subblocks to be subjected to position interchange processing.
7. The method according to claim 6, wherein the position parameters include row and column data combinations of the image sub-blocks to be subjected to the position interchange processing in the split image sub-block matrix; the position interchange parameter comprises a row and column data combination matrix which is randomly generated by scrambling the row and column data combination; and the positions of the elements in the row and column data combination matrix represent the relative positions of the image sub-blocks to be subjected to the position interchange processing in the user identity image.
8. The method according to claim 1, wherein the performing scrambling processing on at least a part of the image sub-blocks in the plurality of image sub-blocks according to randomly generated scrambling parameters to obtain a scrambled identity image comprises:
sequentially executing or nesting execution direction change processing and position interchange processing aiming at least one part of image sub-blocks in the plurality of image sub-blocks to obtain a scrambling identity image;
wherein the sequential execution is an execution mode in which an output of one of the direction change processing and the position exchange processing is used as an input of the other processing for the same image subblock; the nested execution is an execution mode of performing direction change processing in the process of position interchange processing for the same image subblock.
9. The method according to claim 1, wherein the direction change processing is to change the direction of a plurality of image sub-blocks to be processed according to the direction change parameters in parallel through multiple threads; and the position interchange processing is to perform position interchange on a plurality of image sub-blocks to be processed in parallel according to the position interchange parameters through multithreading.
10. The method according to any one of claims 1 to 9, further comprising:
performing identity information key point identification on the acquired user image, and determining the position of an identity information key point in the user image;
and based on the position of the identity information key point in the user image, cutting the user image through key point alignment processing to obtain the user identity image containing the identity information key point.
11. The method according to any one of claims 1 to 9, wherein the performing the scrambling process according to the randomly generated scrambling parameter comprises:
and when the image type corresponding to the user identity image fails to be matched with the currently selected scrambling parameter, selecting the scrambling parameter matched with the image type from a scrambling parameter set to perform scrambling processing, wherein the scrambling parameter set comprises a plurality of randomly generated scrambling parameters matched with the image type.
12. A user identity image recognition method is characterized by comprising the following steps:
extracting a scrambling identity image carried by a user identity identification request, wherein the scrambling identity image is an image obtained by scrambling an image sub-block obtained by segmenting the user identity image according to randomly generated scrambling parameters;
based on the scrambling parameter, carrying out descrambling processing on the scrambled identity image to obtain a recovered user identity image;
and carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
13. The method of claim 12, wherein the scrambling parameter comprises a direction change parameter and a position interchange parameter; the descrambling processing comprises direction recovery processing and position recovery processing; the direction recovery processing is to perform direction recovery on the scrambled image sub-blocks in the scrambled identity image according to the direction change parameters; and the position recovery is to perform position recovery on the scrambled image sub-block in the scrambled identity image according to the position interchange parameter.
14. A user identity image processing apparatus, characterized in that the apparatus comprises:
the image segmentation module is used for obtaining a plurality of image sub-blocks obtained by segmenting the user identity image, and each image sub-block has the same shape and size;
the image subblock scrambling module is used for scrambling at least a part of image subblocks in the plurality of image subblocks according to randomly generated scrambling parameters to obtain a scrambling identity image; the scrambling parameter is used for recovering and obtaining the user identity image based on the scrambling identity image;
wherein the scrambling process comprises a direction change process and a position interchange process; the scrambling parameters comprise direction change parameters and position interchange parameters; the direction change processing is to change the direction of the image subblocks to be processed according to the direction change parameters; and the position interchange processing is to perform position interchange on the image subblocks to be processed according to the position interchange parameters.
15. An apparatus for recognizing a user identification image, the apparatus comprising:
the scrambling identity image extraction module is used for extracting a scrambling identity image carried by the user identity identification request, wherein the scrambling identity image is an image obtained by scrambling image subblocks obtained by segmenting the user identity image according to randomly generated scrambling parameters;
the image descrambling module is used for performing descrambling processing on the scrambled identity image based on the scrambling parameter to obtain a recovered user identity image;
and the user identity recognition module is used for carrying out user identity recognition based on the recovered user identity image to obtain a user identity recognition result corresponding to the user identity recognition request.
16. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 13 when executing the computer program.
17. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 13.
CN202110293708.0A 2021-03-19 2021-03-19 Method and device for processing and identifying user identity image Active CN112800452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110293708.0A CN112800452B (en) 2021-03-19 2021-03-19 Method and device for processing and identifying user identity image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110293708.0A CN112800452B (en) 2021-03-19 2021-03-19 Method and device for processing and identifying user identity image

Publications (2)

Publication Number Publication Date
CN112800452A true CN112800452A (en) 2021-05-14
CN112800452B CN112800452B (en) 2022-09-30

Family

ID=75817203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110293708.0A Active CN112800452B (en) 2021-03-19 2021-03-19 Method and device for processing and identifying user identity image

Country Status (1)

Country Link
CN (1) CN112800452B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541872A (en) * 2023-07-07 2023-08-04 深圳奥联信息安全技术有限公司 Data information safety transmission method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5287203A (en) * 1992-01-17 1994-02-15 Ricoh Company, Ltd. Apparatus for encoding and decoding information on recording medium
CN101540823A (en) * 2008-03-21 2009-09-23 富士通株式会社 Image processing apparatus and image processing system and method
CN201699807U (en) * 2010-07-09 2011-01-05 苏州市职业大学 Digital image scrambling device
CN103092567A (en) * 2013-01-16 2013-05-08 西安电子科技大学 True random number sequence generation method based on single image
CN104851071A (en) * 2015-05-21 2015-08-19 东北大学 Digital image encryption method based on three-dimensional chaotic system
CN106780282A (en) * 2016-12-27 2017-05-31 东北林业大学 Resume image based on piecemeal DNA encoding and uniform scramble
WO2020037937A1 (en) * 2018-08-20 2020-02-27 深圳壹账通智能科技有限公司 Facial recognition method and apparatus, terminal, and computer readable storage medium
CN111461951A (en) * 2020-03-30 2020-07-28 三维通信股份有限公司 Color image encryption method, device, computer equipment and readable storage medium
CN111553267A (en) * 2020-04-27 2020-08-18 腾讯科技(深圳)有限公司 Image processing method, image processing model training method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5287203A (en) * 1992-01-17 1994-02-15 Ricoh Company, Ltd. Apparatus for encoding and decoding information on recording medium
CN101540823A (en) * 2008-03-21 2009-09-23 富士通株式会社 Image processing apparatus and image processing system and method
CN201699807U (en) * 2010-07-09 2011-01-05 苏州市职业大学 Digital image scrambling device
CN103092567A (en) * 2013-01-16 2013-05-08 西安电子科技大学 True random number sequence generation method based on single image
CN104851071A (en) * 2015-05-21 2015-08-19 东北大学 Digital image encryption method based on three-dimensional chaotic system
CN106780282A (en) * 2016-12-27 2017-05-31 东北林业大学 Resume image based on piecemeal DNA encoding and uniform scramble
WO2020037937A1 (en) * 2018-08-20 2020-02-27 深圳壹账通智能科技有限公司 Facial recognition method and apparatus, terminal, and computer readable storage medium
CN111461951A (en) * 2020-03-30 2020-07-28 三维通信股份有限公司 Color image encryption method, device, computer equipment and readable storage medium
CN111553267A (en) * 2020-04-27 2020-08-18 腾讯科技(深圳)有限公司 Image processing method, image processing model training method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱晓升等: "基于图像分区的置乱算法", 《计算机技术与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541872A (en) * 2023-07-07 2023-08-04 深圳奥联信息安全技术有限公司 Data information safety transmission method and system
CN116541872B (en) * 2023-07-07 2024-04-09 深圳奥联信息安全技术有限公司 Data information safety transmission method and system

Also Published As

Publication number Publication date
CN112800452B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
Li et al. Celeb-df: A large-scale challenging dataset for deepfake forensics
Parkin et al. Recognizing multi-modal face spoofing with face recognition networks
Agarwal et al. Swapped! digital face presentation attack detection via weighted local magnitude pattern
Jia et al. 3D face anti-spoofing with factorized bilinear coding
CN111680672B (en) Face living body detection method, system, device, computer equipment and storage medium
US10984225B1 (en) Masked face recognition
Islam et al. A review of recent advances in 3D ear-and expression-invariant face biometrics
CN111680675B (en) Face living body detection method, system, device, computer equipment and storage medium
CN112364827A (en) Face recognition method and device, computer equipment and storage medium
CN113614731A (en) Authentication verification using soft biometrics
Yen et al. Facial feature extraction using genetic algorithm
Stokkenes et al. Multi-biometric template protection—A security analysis of binarized statistical features for bloom filters on smartphones
CN112800452B (en) Method and device for processing and identifying user identity image
Hore et al. A real time dactylology based feature extractrion for selective image encryption and artificial neural network
Papadopoulos et al. Face-GCN: A graph convolutional network for 3D dynamic face identification/recognition
KR101763011B1 (en) Coding and recognition system for finger print information, and operating method
Li et al. Celeb-df (v2): a new dataset for deepfake forensics [j]
Li et al. Generative adversarial networks-based privacy-preserving 3D reconstruction
CN113569626A (en) Face retrieval method, system, computer equipment and storage medium
JP2013218605A (en) Image recognition device, image recognition method, and program
CN114373218B (en) Method for generating convolution network for detecting living body object
Kisku et al. Multithread face recognition in cloud
Thakur et al. Design of Semantic Segmentation Algorithm to Classify Forged Pixels
Kaddar et al. Deepfake Detection Using Spatiotemporal Transformer
CN114612989A (en) Method and device for generating face recognition data set, electronic equipment and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40044573

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant