Image information encryption method, image information decryption method and related devices

By encrypting the sensitive information areas in the image, changing the arrangement order, blurring and embedding the bitstream, the contradiction between the security and legal use of sensitive information in the image is solved, and efficient information protection and privacy protection are achieved.

CN119544882AActive Publication Date: 2025-02-28AGRICULTURAL BANK OF CHINA

Patent Information

Application Number
CN202411741094.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-28
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

How to ensure the legal use of sensitive information while ensuring the security of sensitive information without affecting the normal use of images.

Method used

By determining the sensitive information area in the image, encode and encrypt the pixels in the sensitive information area using a preset encryption method, change the pixels arrangement order, and perform image blurring on the sensitive information area, and finally embed the encrypted binary bit stream into the blurred area of ​​the image.

Benefits of technology

It realizes the secure encryption and privacy protection of sensitive information, while not affecting the legal use and normal processing of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544882A_ABST
    Figure CN119544882A_ABST
Patent Text Reader

Abstract

The invention discloses an image information encryption method, an image information decryption method and related devices, and relates to the field of information encryption, and the method comprises the steps: determining a sensitive information region in a target image; performing coding encryption on each pixel in the sensitive information area by using a preset encryption mode to obtain a ciphertext segment sequence, and converting the ciphertext segment sequence into a binary bit stream; changing the arrangement sequence of a plurality of pixels in the sensitive information area; performing image blurring processing on the sensitive information area where the plurality of pixels of which the arrangement sequence is changed are located to obtain a target image containing a blurred area; and embedding the binary bit stream into the target image containing the blurred region. The security of the sensitive information is fully guaranteed, and legal use of the sensitive information is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information encryption technology, and in particular to an image information encryption method, an image information decryption method and related devices. Background Art

[0002] With the development of digital technology, more and more information is stored and disseminated in digital form.

[0003] As an important type of information, images are used more and more widely. Since images often contain a lot of sensitive information, it is necessary to encrypt the sensitive information to ensure its security. Summary of the invention

[0004] In view of the above problems, this application provides an image information encryption method, an image information decryption method and related devices to achieve the purpose of ensuring the security of sensitive information without affecting the legal use of sensitive information. The specific scheme is as follows:

[0005] The first aspect of the present application provides an image information encryption method, comprising:

[0006] Determine sensitive information areas in the target image;

[0007] Encode and encrypt each pixel in the sensitive information area using a preset encryption method to obtain a ciphertext byte sequence, and convert the ciphertext byte sequence into a binary bit stream;

[0008] Changing the arrangement order of multiple pixels in the sensitive information area;

[0009] Performing image blurring processing on the sensitive information region where the plurality of pixels after the arrangement order is changed to obtain the target image including the blurred region;

[0010] The binary bit stream is embedded into the target image including the blurred area.

[0011] In a possible implementation, performing image blurring processing on the sensitive information area where the plurality of pixels after the arrangement order is changed to obtain the target image including the blurred area includes:

[0012] Gaussian blur processing is performed on the sensitive information area where the multiple pixels after the arrangement order is changed, and target desensitization processing is performed on the pixels located at the boundary of the sensitive information area to obtain the target image including the blurred area, and the multiple pixels do not include the pixels located at the boundary of the sensitive information area, and the target desensitization processing includes: filling with preset pixel values, periodic expansion and at least one of mirror processing.

[0013] In a possible implementation, embedding the binary bit stream into the target image containing the blurred area includes:

[0014] Obtaining a binary bit stream of each pixel in a restoration auxiliary information storage area in the target image including the blurred area, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and the restoration auxiliary information storage area does not overlap with the sensitive information area;

[0015] Determine an embedding area from a plurality of candidate areas, wherein the candidate areas are other image areas except the restoration auxiliary information storage area, and the sizes and shapes of the candidate areas are the same;

[0016] Based on the position information of the embedding area and the position information of the sensitive information area, generating restoration auxiliary information, converting the restoration auxiliary information into a plurality of pixel values, and replacing the pixel value of each pixel in the restoration auxiliary information storage area with each converted pixel value;

[0017] The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted are embedded in the embedding area.

[0018] In a possible implementation, the candidate regions are rectangular regions, and each of the candidate regions includes multiple sub-regions, and determining the embedding region from the multiple candidate regions includes:

[0019] determining the complexity of each of the sub-regions;

[0020] Determining pixel value difference statistics of the sub-region whose complexity is lower than a complexity threshold;

[0021] The sub-region whose pixel value difference statistic is smaller than the difference threshold is determined as the embedded region.

[0022] In a possible implementation, the embedding area is a rectangular area, and each of the embedding areas includes a plurality of sub-areas, and the binary bit stream obtained by converting the restored binary bit stream of each pixel in the auxiliary information storage area and the ciphertext byte sequence into the embedding area includes:

[0023] Using the formula

[0024]

[0025] The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted are embedded in the embedding area, wherein i is the number of the sub-area included in the embedding area, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, b is the information bit of the binary bit stream, is the minimum pixel value of the sub-region numbered i after the information is embedded, is the maximum pixel value of the sub-region numbered i after the information is embedded, and α is a preset translation parameter.

[0026] The second aspect of the present application provides an image information decryption method, comprising:

[0027] Obtaining an encrypted image processed by any one of the image information encryption methods provided in the first aspect of the present application;

[0028] Obtaining an embedded binary bit stream from the encrypted image;

[0029] Convert the binary bit stream into a ciphertext byte sequence, and decrypt the ciphertext byte sequence using a preset decryption method corresponding to a preset encryption method to obtain each pixel in the sensitive information area;

[0030] Each pixel in the sensitive information area of ​​the encrypted image is replaced with each pixel in the sensitive information area.

[0031] In a possible implementation, obtaining the embedded binary bit stream from the encrypted image includes:

[0032] Obtaining pixel values ​​of a restoration auxiliary information storage area in the encrypted image, and obtaining restoration auxiliary information based on the pixel values, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and the restoration auxiliary information storage area does not overlap with the sensitive information area;

[0033] Determine the position information of the embedding area and the position information of the sensitive information area based on the restoration auxiliary information;

[0034] Based on the position information of the embedding area, an embedded binary bit stream is obtained from the encrypted image.

[0035] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any image information encryption method provided in the first aspect of the present application and / or any image information decryption method provided in the second aspect of the present application.

[0036] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0037] The memory is used to store computer programs;

[0038] The processor is used to execute the computer program so that the electronic device can implement any image information encryption method provided in the first aspect of the present application and / or any image information decryption method provided in the second aspect of the present application.

[0039] The fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any image information encryption method provided in the first aspect of the present application and / or any image information decryption method provided in the second aspect of the present application.

[0040] By means of the above technical scheme, the image information encryption method, image information decryption method and related devices provided by the present application first change the arrangement order of multiple pixels in the sensitive information area, and then perform image blurring processing on the sensitive information area where the multiple pixels after the arrangement order is changed. In this way, the original sensitive information in the image becomes invisible. At the same time, the present application uses a preset encryption method to encode and encrypt each pixel in the sensitive information area, obtains a ciphertext byte sequence, converts the ciphertext byte sequence into a binary bit stream, and embeds the binary bit stream into a target image containing a blurred area. By encrypting each pixel in the sensitive information area and embedding it into a target image containing a blurred area, the target image carries the encrypted sensitive information, and the relevant party with the right can legally decrypt the sensitive information carried by the target image, thereby restoring the sensitive information. It can be seen that the present application fully guarantees the security of sensitive information without affecting the legal use of sensitive information. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0042] Figure 1 A schematic diagram of a system architecture provided for this application;

[0043] Figure 2 A schematic diagram of an optional hardware structure of a terminal provided in this application;

[0044] Figure 3 A schematic diagram of the structure of the server provided for this application;

[0045] Figure 4 A schematic diagram of a flow chart of an image information encryption method provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of a flow chart of another image information encryption method provided in an embodiment of the present application;

[0047] Figure 6 A flowchart of an image information decryption method provided in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of the structure of an image information encryption device provided in an embodiment of the present application;

[0049] Figure 8 A schematic diagram of the structure of an image information decryption device provided in an embodiment of the present application;

[0050] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0052] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0053] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0054] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0055] Among them, an image processing application can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters (such as the location of the image or sensitive information area) input by the user on the interface, and send the above parameters to the server 200. The server 200 can obtain the processing results based on the received parameters and return the processing results to the terminal 100.

[0056] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.

[0057] Next describe Figure 1 The product form of the mid-terminal 100;

[0058] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0059] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0060] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0061] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0062] Among them, the input device 132 can receive input data and the like.

[0063] The display unit 140 may be used to display information input by the user or provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 may be used to display an interface for uploading a target image, an area selection interface, processing results, etc.

[0064] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0065] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0066] Among them, the memory 120 can be used to store software codes related to the image information encryption method and / or the image information decryption method, the processor 170 can execute the steps of the image information encryption method and / or the image information decryption method, and can also schedule other units (such as the above-mentioned input unit 130 and the display unit 140) to implement corresponding functions.

[0067] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0068] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0069] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0070] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0071] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0072] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0073] Next describe Figure 1 The product form of the server 200;

[0074] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0075] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0076] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0077] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).

[0078] Among them, the memory 204 can be used to store software codes related to the image information encryption method and / or the image information decryption method, the processor 202 can execute the steps of the image information encryption method and / or the image information decryption method of the chip, and can also schedule other units to implement corresponding functions.

[0079] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0080] In order to solve the above problems, the embodiment of the present application provides an image information encryption method. The image information encryption method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0081] Reference Figure 4 , Figure 4 A schematic diagram of a flow chart of an image information encryption method provided in an embodiment of the present application, such as Figure 4 As shown, a data processing method provided in an embodiment of the present application may include steps 401 to 405, and these steps are described in detail below.

[0082] 401. Determine a sensitive information area in a target image.

[0083] The target image can be any image, such as an ID card image, a text image, a photographed image, etc.

[0084] Sensitive information is information that should not be disclosed to the public or leaked to others, such as ID card number, facial image, iris, fingerprint, passport number, bank card number, transaction record, account balance, signature, etc. In practical applications, what kind of information can be set as sensitive information according to actual needs, and this application does not limit this. The sensitive information area is the area occupied by sensitive information in the target image. The sensitive information area determined in step 401 can specifically be the position information of the sensitive information area, and the position information can be the coordinates of the sensitive information area, and the coordinates can be the vertex coordinates of the sensitive information area. Specifically, when the sensitive information area is a rectangle, the position information of the sensitive information area can be the coordinates of the upper left vertex and the coordinates of the lower right vertex of the sensitive information area.

[0085] Specifically, the present application can determine the sensitive information area in the target image based on a variety of methods, such as manually selecting the sensitive information area, or identifying the sensitive information area in the target image through image recognition technology.

[0086] Optionally, the present application may utilize a convolutional neural network (CNN) based on deep learning to recognize faces and various biometric information (such as fingerprints and irises), and may utilize optical character recognition (OCR) technology to recognize and extract text information in images, thereby identifying sensitive text information in images. The present application may also utilize machine learning technology to identify sensitive information.

[0087] 402. Encode and encrypt each pixel in the sensitive information area using a preset encryption method to obtain a ciphertext byte sequence, and convert the ciphertext byte sequence into a binary bit stream.

[0088] Optionally, the above-mentioned preset encryption method may be Advanced Encryption Standard (AES) encryption technology. Specifically, the present application uses AES technology to encode and encrypt each pixel in the sensitive information area, and the specific process of obtaining the ciphertext byte sequence may include the following steps 4021 to 4026:

[0089] 4021. Key generation.

[0090] First, a strong key needs to be generated, and the length of the key can be 128 bits, 192 bits, or 256 bits, depending on the required security level. Considering the comprehensive security and encryption and decryption efficiency, the present invention uses a key with a length of 128 bits. The generation of the key can be completed by a secure random number generator to ensure that a unique key is used for each encryption.

[0091] 4022. Key expansion.

[0092] The AES key expansion algorithm is used to expand the initial key into a key sequence, which will be used in each subsequent round of encryption. The key expansion algorithm includes steps such as byte replacement, shifting, and mixing columns to ensure the diversity and complexity of the key.

[0093] 4023. Initial round key addition.

[0094] The pixel value of the sensitive information area is XORed with the first round key of the extended key, which is the starting step of each round of encryption.

[0095] 4024. Iterative round encryption.

[0096] Multiple rounds of AES encryption are performed on each pixel value in the sensitive information area, and each round includes the following steps A to D:

[0097] A. Byte Replacement (SubBytes): Use S-boxes to perform non-linear replacement of each byte, which is a lookup table based operation designed to increase the obfuscation of the data.

[0098] B. ShiftRows: Circularly shift each row of the state matrix, which helps to disperse the data.

[0099] C. Mix Columns: Except for the last round, the bytes of each column are added with a fixed multiplier, which further increases the diffusion of the data.

[0100] D. AddRoundKey: Add the corresponding part of the extended key to each byte of the state matrix.

[0101] 4025. Final round of encryption.

[0102] Perform a final round of encryption, but skip the column obfuscation step. This round uses the last part of the extended key for round key addition.

[0103] 4026. Output the encryption result.

[0104] After the above steps 4021 to 4026 are processed, the value of each pixel will be converted into an encrypted value to form a ciphertext byte sequence.

[0105] Through AES encryption, sensitive information in the image is strongly protected. Only authorized users who know the key can restore the original sensitive information through the corresponding decryption process. The security of AES has been widely verified. It resists a variety of cryptographic attacks, including brute force attacks, differential attacks, and linear attacks, and can provide reliable protection for sensitive information in images.

[0106] Of course, in addition to AES technology, this application can also use other reversible encryption algorithms, such as: Data Encryption Standard (DES), Triple Data Encryption Standard (3DES), Rivest-Shamir-Adleman (RSA), etc.

[0107] 403. Change the arrangement order of multiple pixels in the sensitive information area.

[0108] Optionally, the present application may change the arrangement order of multiple pixels in the sensitive information area through various techniques, such as random permutation, Arnold scrambling, etc. Random permutation is to swap a pixel with another random pixel determined by a random algorithm.

[0109] Since step 402 encrypts and saves each pixel in the sensitive information area, the sensitive information in the sensitive information area can be destructively eliminated without considering its reversibility. The present invention can use Arnold scrambling technology to destroy the shape of sensitive information. Arnold scrambling is an image processing technology based on chaos theory. It rearranges the pixels of an image through chaotic mapping to achieve the purpose of blurring the original shape of sensitive information. In the field of image privacy protection, Arnold scrambling can be used as a preprocessing step to lay the foundation for subsequent image blurring processing, so that the shape characteristics of sensitive information in the image are effectively eliminated.

[0110] Arnold scrambling involves a discrete chaotic map, which can be expressed as an iterative process. For a two-dimensional image, Arnold scrambling can be implemented by the following iterative formula:

[0111]

[0112] Among them, x n and n Respectively represent the position coordinates of the pixel at the nth iteration, a and b are the parameters of the chaotic mapping, usually two mutually prime positive integers, and N is the width or height of the image. The selection of parameters a and b is crucial to the chaotic behavior, and usually it is necessary to select values ​​that make the mapping have good chaotic characteristics.

[0113] The processing of Arnold scrambling is as follows: Steps 4031 to 4035:

[0114] 4031. Initialization: Determine the size N of the image and initialize the position coordinates of all pixels.

[0115] 4032. Iteration: For each pixel in the image, perform iterative calculations according to the above formula to update the new position of the pixel. The number of iterations n will affect the degree of scrambling, and usually multiple iterations are required to achieve a chaotic state.

[0116] 4033. Boundary processing: Since pixels may exceed the boundaries of the image during the iteration process, boundary condition processing, such as periodic boundary conditions or reflection boundary conditions, needs to be implemented to ensure that the pixels move within the image range.

[0117] 4034. Pixel replacement: After each iteration, the value of the current pixel is copied to the pixel at the new position. If there is already a pixel at the new position, it is necessary to decide how to handle the values ​​of the two pixels, such as by overwriting or blending. In the solution of the present invention, since the scrambling process does not need to consider reversibility, the two pixels can be directly overwritten.

[0118] 4035 Termination condition: When the number of iterations reaches a preset value or when the pixel distribution reaches a certain chaotic state, the iteration is stopped.

[0119] Arnold scrambling uses the dynamic characteristics of chaotic mapping to cause complex changes in the pixel positions in the image. This change is nonlinear and very sensitive to initial conditions. In image privacy protection, this means that the shape and features of sensitive information will be disrupted after Arnold scrambling, making it visually blurred. This blurring effect provides a basis for subsequent image blurring processing, which further eliminates the shape features of sensitive information and enhances the protection effect.

[0120] 404. Perform image blurring processing on the sensitive information area where the multiple pixels whose arrangement order is changed are located, to obtain a target image including the blurred area.

[0121] There are many types of image blurring processes, such as Gaussian blur, salt and pepper blur, motion blur, etc. The present application can use one or more of these image blurring processes to perform image blurring on the sensitive information area where multiple pixels are located after the arrangement order is changed, to obtain a target image containing a blurred area.

[0122] In an optional implementation, step 404 may specifically include:

[0123] Gaussian blur processing is performed on the sensitive information area where the multiple pixels after the arrangement order is changed, and target desensitization processing is performed on the pixels located at the boundary of the sensitive information area to obtain a target image containing the blurred area. The multiple pixels do not include the pixels located at the boundary of the sensitive information area, and the target desensitization processing includes: filling with preset pixel values, periodic expansion and at least one of mirror processing.

[0124] After Arnold scrambling, the sensitive information areas of the image have undergone changes in position and shape. The present invention can apply Gaussian blur technology to further smooth these areas, eliminate the features of sensitive information, and make it more difficult to identify visually. Gaussian blur further blurs the shape of sensitive information by reducing the high-frequency details of the image, thereby enhancing the effect of privacy protection.

[0125] The core of Gaussian blur is the Gaussian function, which is a bell-shaped probability distribution function. Its application in image processing is usually expressed as a two-dimensional Gaussian kernel. The expression of the two-dimensional Gaussian function is:

[0126]

[0127] Where x and y are the coordinates relative to the center of the kernel, and σ is the standard deviation of the Gaussian distribution, which determines the width of the kernel and the degree of blur. The larger σ is, the more obvious the blur effect is.

[0128] The Gaussian blur processing process is shown in steps 1 to 4 below:

[0129] Step 1, kernel generation: select an appropriate σ value according to the required blur level and generate the corresponding Gaussian kernel. The kernel size is usually greater than 6σ to ensure that the kernel contains the main part of the Gaussian function, and the kernel size is usually an odd number so that there is a central pixel.

[0130] Step 2: Normalization: To ensure that the sum of the weights of the Gaussian kernel is 1 (i.e. the probability is 1), all values ​​within the kernel need to be normalized.

[0131] Step 3, Convolution: Apply the Gaussian kernel to each pixel of the image and blur it through the convolution operation. The convolution operation can be expressed as:

[0132]

[0133] Among them, I(x,y) is the original image pixel, is the blurred image pixel, and G is the Gaussian kernel.

[0134] Step 4, boundary processing: At the edge of the image, due to insufficient pixels, directly applying the above convolution may result in unnatural blurred boundaries. Therefore, it is usually necessary to perform special processing on the boundary pixels, such as mirroring, padding, or periodic expansion. Similar to Arnold scrambling, since the Gaussian blur process does not need to consider reversibility, a simple periodic expansion can be performed on the boundary pixels.

[0135] After Arnold scrambling, the sensitive information in the image has been rearranged, but its shape features may still exist. Gaussian blur further weakens these features through smoothing, making the sensitive information visually more blurred. Since Gaussian blur is a linear operation, it does not introduce additional distortion, but uniformly blurs all content in the image, including the scrambled sensitive areas. Combining Arnold scrambling and Gaussian blur, this dual blurring strategy can effectively protect sensitive information in the image. Even if the image is illegally obtained, it is difficult to recover the original sensitive information from the blurred image.

[0136] 405. Embed the binary bit stream into the target image including the blurred area.

[0137] An image information encryption method provided by an embodiment of the present application first changes the arrangement order of multiple pixels in a sensitive information area, and then performs image blurring processing on the sensitive information area where the multiple pixels after the arrangement order is changed are located. In this way, the original sensitive information in the image becomes invisible. At the same time, the present application uses a preset encryption method to encode and encrypt each pixel in the sensitive information area to obtain a ciphertext byte sequence, converts the ciphertext byte sequence into a binary bit stream, and embeds the binary bit stream into a target image containing a blurred area. By encrypting each pixel in the sensitive information area and embedding it into a target image containing a blurred area, the target image carries the encrypted sensitive information, and the relevant party with the right can legally decrypt the sensitive information carried by the target image, thereby restoring the sensitive information. It can be seen that the present application fully guarantees the security of sensitive information without affecting the legal use of sensitive information.

[0138] like Figure 5 As shown, in another embodiment of an image information encryption method provided by an embodiment of the present application, step 405 may specifically include:

[0139] 4051. Obtain a binary bit stream of each pixel in a restoration auxiliary information storage area in a target image including a blurred area. The restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information. There is no overlapping area between the restoration auxiliary information storage area and the sensitive information area.

[0140] The restoration auxiliary information is information used to assist the restoration process of the encrypted sensitive information. The restoration auxiliary information may specifically include: location information of the embedding area and location information of the sensitive information area.

[0141] The position of the restoration auxiliary information storage area in the image can be pre-set. In order to make the restoration auxiliary information storage area not affect the embedding of the binary bit stream of sensitive information as much as possible, the restoration auxiliary information storage area can be set at the boundary of the image, for example, the restoration auxiliary information storage area is the first row of pixel area of ​​the image.

[0142] Since the auxiliary restoration information storage area needs to store the auxiliary restoration information, the original pixels in the auxiliary restoration information storage area can also be embedded in the image. Of course, in other embodiments, since the auxiliary restoration information storage area does not include sensitive information, the original pixels in the auxiliary restoration information storage area may not be encrypted, but the binary bit stream of each pixel in the auxiliary restoration information storage area may be directly embedded in the image.

[0143] 4052. Determine an embedding area from a plurality of candidate areas, where the candidate areas are other image areas except the restoration auxiliary information storage area, and each candidate area has the same size and shape.

[0144] Since the restoration auxiliary information storage area needs to store restoration auxiliary information, the present application does not embed binary bit streams in the restoration auxiliary information storage area. For other image areas except the restoration auxiliary information storage area, the present application can selectively determine some areas as embedding areas and embed binary bit streams.

[0145] The present application can divide the image regions other than the restoration auxiliary information storage region, obtain multiple candidate regions with the same size and shape from the other image regions, and then determine the embedding region from the multiple candidate regions.

[0146] There are many ways to determine the embedding area from multiple candidate areas, such as random selection, selection based on image features of the candidate area, etc.

[0147] 4053. Generate restoration auxiliary information based on the position information of the embedded area and the position information of the sensitive information area, convert the restoration auxiliary information into multiple pixel values, and use the converted pixel values ​​to replace the pixel values ​​of each pixel in the restoration auxiliary information storage area.

[0148] Step 4053 can directly use the location information of the embedded area and the location information of the sensitive information area as restoration auxiliary information, or can use the location information of the embedded area, the location information of the sensitive information area and other information together as restoration auxiliary information. The other information can include: the length of the binary bit stream embedded in the image.

[0149] After the restoration auxiliary information is converted into a plurality of pixel values, the converted pixel values ​​may be used to replace the pixel values ​​of each pixel in the restoration auxiliary information storage area, thereby storing the restoration auxiliary information in the restoration auxiliary information storage area.

[0150] Specifically, each converted pixel value may be embedded in the restoration auxiliary information storage area in a least significant bit (LSB) replacement manner.

[0151] 4054. The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after converting the ciphertext byte sequence are embedded in the determined embedding area.

[0152] Figure 5 The method shown can store the restoration auxiliary information in the restoration auxiliary information storage area to assist in the subsequent restoration process of the encrypted sensitive information. Figure 5 The method shown also converts the original pixels in the restored auxiliary information storage area into binary bit streams and embeds them into the image, so that the original pixels in the auxiliary information storage area can be restored based on the binary bit stream later, ensuring the integrity of the image.

[0153] Optionally, the candidate regions are rectangular regions, and each candidate region includes multiple sub-regions. Step 4052 of determining the embedding region from the multiple candidate regions may include:

[0154] Determine the complexity of each candidate area;

[0155] Determine pixel value difference statistics of candidate regions whose complexity is lower than a complexity threshold;

[0156] The candidate area whose pixel value difference statistic is less than the difference threshold is determined as the embedding area.

[0157] The process of determining the complexity of each candidate region may include:

[0158] For each sub-region: determining the median value of the pixel values ​​of each pixel included in the sub-region as the median value of the sub-region;

[0159] The maximum value and the minimum value of the intermediate values ​​of each sub-region included in each candidate region are determined, and the difference between the maximum value and the minimum value of the intermediate values ​​of each sub-region included in each candidate region is determined as the complexity of each candidate region.

[0160] The process of determining the pixel value difference statistics of the candidate area may include:

[0161] Based on the formula

[0162]

[0163] Determine the pixel value difference statistic D of the candidate area, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, is the median pixel value of the sub-region numbered i, and n is the number of sub-regions included in a candidate region.

[0164] Optionally, n can be 4.

[0165] Through the above process of determining the embedding area based on complexity and pixel value differential statistics, the present application can determine the candidate area with smaller pixel difference as the embedding area. Since the pixel difference is small, the amount of calculation during subsequent decryption is also relatively small, which can reduce the amount of data processing.

[0166] Optionally, the restoration auxiliary information may further include: a complexity threshold and a difference threshold.

[0167] Optionally, the embedded area is a rectangular area, and each embedded area includes multiple sub-areas. Step 4054 may specifically include:

[0168] Using the formula

[0169]

[0170] The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained by converting the ciphertext byte sequence are embedded in the determined embedding area, where i is the number of the sub-area included in the embedding area, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, b is the information bit of the binary bit stream, is the minimum pixel value of the sub-region numbered i after the information is embedded, is the maximum pixel value of the sub-region numbered i after the information is embedded, and α is the preset translation parameter.

[0171] The difference between the image embedded with encrypted information and the original image is almost invisible to human vision and will not affect the use of the image.

[0172] like Figure 6 As shown, corresponding to an image information encryption method provided by the present application, the present application also provides an image information decryption method, which may include:

[0173] 601. Obtain an encrypted image processed by any image information encryption method provided in this application;

[0174] 602. Obtain an embedded binary bit stream from the encrypted image;

[0175] Optionally, obtaining an embedded binary bitstream from an encrypted image may include:

[0176] Obtaining pixel values ​​of a restoration auxiliary information storage area in the encrypted image, and obtaining restoration auxiliary information based on the pixel values, wherein the restoration auxiliary information storage area is a pre-set area for storing the restoration auxiliary information, and the restoration auxiliary information storage area does not overlap with the sensitive information area;

[0177] Determine the position information of the embedding area and the position information of the sensitive information area based on the restoration auxiliary information;

[0178] Based on the position information of the embedded region, the embedded binary bit stream is obtained from the encrypted image.

[0179] Specifically, the present application can pre-divide the image areas other than the restoration auxiliary information storage area (the area division method is the same as the area division method used in the image information encryption method), obtain multiple candidate areas, and then determine the embedded area from the candidate areas according to the position information of the embedded area.

[0180] In some cases, the pixels of an image may change during storage and transmission. The present application can use the complexity of the candidate area and the pixel value differential statistics to verify the embedded area determined according to the position information of the embedded area. Specifically, the present application can calculate the complexity and pixel value differential statistics of the candidate area, and then compare the complexity with the complexity threshold, and compare the pixel value differential statistics with the differential threshold. Based on the comparison results, the above verification can be performed.

[0181] 603. Convert the binary bit stream into a ciphertext byte sequence, and decrypt the ciphertext byte sequence using a preset decryption method corresponding to the preset encryption method to obtain each pixel in the sensitive information area;

[0182] Specifically, step 603 can use the formula

[0183]

[0184] Convert the binary bit stream into a ciphertext byte sequence, wherein i is the number of the sub-region included in the embedded region, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, b is the information bit of the binary bit stream, is the minimum pixel value of the sub-region numbered i after the information is embedded, is the maximum pixel value of the sub-region numbered i after the information is embedded, and α is a preset translation parameter.

[0185] 604. Replace each pixel in the sensitive information area in the encrypted image with each pixel in the sensitive information area.

[0186] The image information decryption method provided in the embodiment of the present application can decrypt an encrypted image processed by any of the image information encryption methods provided in the present application, and restore sensitive information in the target image.

[0187] An image information encryption method and an image information decryption method provided in the embodiments of the present application are introduced above. The following will respectively introduce a device for executing the above-mentioned image information encryption method and a device for executing the above-mentioned image information decryption method.

[0188] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of an image information encryption device provided in an embodiment of the present application. Figure 7 As shown, the image information encryption device comprises:

[0189] A determination unit 701 is used to determine a sensitive information area in a target image;

[0190] The encryption unit 702 is used to encode and encrypt each pixel in the sensitive information area using a preset encryption method to obtain a ciphertext byte sequence, and convert the ciphertext byte sequence into a binary bit stream;

[0191] A sorting unit 703, used to change the arrangement order of multiple pixels in the sensitive information area;

[0192] A blurring unit 704 is used to perform image blurring processing on the sensitive information area where the plurality of pixels after the arrangement order is changed are located, so as to obtain the target image including the blurred area;

[0193] The embedding unit 705 is used to embed the binary bit stream into the target image containing the blurred area.

[0194] Optionally, the fuzzy unit 704 is specifically used for:

[0195] Gaussian blur processing is performed on the sensitive information area where the multiple pixels after the arrangement order is changed, and target desensitization processing is performed on the pixels located at the boundary of the sensitive information area to obtain the target image including the blurred area, and the multiple pixels do not include the pixels located at the boundary of the sensitive information area, and the target desensitization processing includes: filling with preset pixel values, periodic expansion and at least one of mirror processing.

[0196] Optionally, the embedding unit 705 includes:

[0197] a bit rate acquisition subunit, used to obtain a binary bit stream of each pixel in a restoration auxiliary information storage area in the target image including the blurred area, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and there is no overlapping area between the restoration auxiliary information storage area and the sensitive information area;

[0198] an embedding region determining subunit, configured to determine an embedding region from a plurality of candidate regions, wherein the candidate regions are other image regions except the restoration auxiliary information storage region, and the sizes and shapes of the candidate regions are the same;

[0199] an information generating subunit, configured to generate restoration auxiliary information based on the position information of the embedding area and the position information of the sensitive information area, convert the restoration auxiliary information into a plurality of pixel values, and replace the pixel value of each pixel in the restoration auxiliary information storage area with each converted pixel value;

[0200] The embedding subunit is used to embed the binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted into the embedding area.

[0201] Optionally, the candidate area is a rectangular area, and each of the candidate areas includes a plurality of sub-areas, and the embedding area determination subunit is specifically used to include:

[0202] determining the complexity of each of the sub-regions;

[0203] Determining pixel value difference statistics of the sub-region whose complexity is lower than a complexity threshold;

[0204] The sub-region whose pixel value difference statistic is smaller than the difference threshold is determined as the embedding region.

[0205] Optionally, the embedded area is a rectangular area, and each of the embedded areas includes a plurality of sub-areas, and the embedded sub-units are specifically used for:

[0206] Using the formula

[0207]

[0208] The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted are embedded in the embedding area, wherein i is the number of the sub-area included in the embedding area, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, b is the information bit of the binary bit stream, is the minimum pixel value of the sub-region numbered i after the information is embedded, is the maximum pixel value of the sub-region numbered i after the information is embedded, and α is a preset translation parameter.

[0209] An image information encryption device provided by an embodiment of the present application first changes the arrangement order of multiple pixels in a sensitive information area, and then performs image blurring processing on the sensitive information area where the multiple pixels after the arrangement order is changed are located. In this way, the original sensitive information in the image becomes invisible. At the same time, the present application uses a preset encryption method to encode and encrypt each pixel in the sensitive information area to obtain a ciphertext byte sequence, convert the ciphertext byte sequence into a binary bit stream, and embed the binary bit stream into a target image containing a blurred area. By encrypting each pixel in the sensitive information area and embedding it into a target image containing a blurred area, the target image carries the encrypted sensitive information, and the relevant party with the right can legally decrypt the sensitive information carried by the target image, thereby restoring the sensitive information. It can be seen that the present application fully guarantees the security of sensitive information without affecting the legal use of sensitive information.

[0210] See also Figure 8 , Figure 8This is a schematic diagram of the structure of an image information decryption device provided in an embodiment of the present application. Figure 8 As shown, the image information decryption device comprises:

[0211] An image obtaining unit 801 is used to obtain an encrypted image processed by the image information encryption device provided by any embodiment of the present application;

[0212] A bit rate obtaining unit 802, configured to obtain an embedded binary bit stream from the encrypted image;

[0213] A decryption unit 803 is used to convert the binary bit stream into a ciphertext byte sequence, and decrypt the ciphertext byte sequence using a preset decryption method corresponding to a preset encryption method to obtain each pixel in the sensitive information area;

[0214] The restoration unit 804 is used to replace each pixel in the sensitive information area in the encrypted image with each pixel in the sensitive information area.

[0215] Optionally, the bit rate obtaining unit 802 includes:

[0216] a pixel value obtaining subunit, used to obtain pixel values ​​of a restoration auxiliary information storage area in the encrypted image, and obtain restoration auxiliary information based on the pixel values, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and there is no overlapping area between the restoration auxiliary information storage area and the sensitive information area;

[0217] A position determination subunit, configured to determine position information of the embedding area and position information of the sensitive information area based on the restoration auxiliary information;

[0218] The embedded information obtaining subunit is used to obtain the embedded binary bit stream from the encrypted image based on the position information of the embedded area.

[0219] The image information decryption device provided in the embodiment of the present application can decrypt an encrypted image processed by any image information encryption device provided in the present application, and restore sensitive information in the target image.

[0220] The present application also provides an electronic device in an embodiment. Fig. 9 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig. 9 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0221] like Fig. 9 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0222] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a memory card, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0223] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any image information encryption method and / or any image information decryption method provided in the embodiment of the present application.

[0224] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any image information encryption method and / or any image information decryption method provided in the embodiment of the present application.

[0225] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0226] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0227] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A method for encrypting image information, characterized in that: include: Determine sensitive information areas in the target image; Encode and encrypt each pixel in the sensitive information area using a preset encryption method to obtain a ciphertext byte sequence, and convert the ciphertext byte sequence into a binary bit stream; Changing the arrangement order of multiple pixels in the sensitive information area; Performing image blurring processing on the sensitive information region where the plurality of pixels after the arrangement order is changed to obtain the target image including the blurred region; The binary bit stream is embedded into the target image including the blurred area.

2. The image information encryption method according to claim 1, characterized in that: The step of performing image blurring processing on the sensitive information area where the plurality of pixels after the arrangement order is changed to obtain the target image including the blurred area includes: Gaussian blur processing is performed on the sensitive information area where the multiple pixels after the arrangement order is changed, and target desensitization processing is performed on the pixels located at the boundary of the sensitive information area to obtain the target image including the blurred area, and the multiple pixels do not include the pixels located at the boundary of the sensitive information area, and the target desensitization processing includes: filling with preset pixel values, periodic expansion and at least one of mirror processing.

3. The image information encryption method according to claim 1, characterized in that: The step of embedding the binary bit stream into the target image containing the blurred area comprises: Obtaining a binary bit stream of each pixel in a restoration auxiliary information storage area in the target image including the blurred area, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and the restoration auxiliary information storage area does not overlap with the sensitive information area; Determine an embedding area from a plurality of candidate areas, wherein the candidate areas are other image areas except the restoration auxiliary information storage area, and the sizes and shapes of the candidate areas are the same; Based on the position information of the embedding area and the position information of the sensitive information area, generating restoration auxiliary information, converting the restoration auxiliary information into a plurality of pixel values, and replacing the pixel value of each pixel in the restoration auxiliary information storage area with each converted pixel value; The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted are embedded in the embedding area.

4. The image information encryption method according to claim 3, characterized in that: The candidate regions are rectangular regions, and each of the candidate regions includes a plurality of sub-regions. The step of determining the embedding region from the plurality of candidate regions includes: determining the complexity of each of the sub-regions; Determining pixel value difference statistics of the sub-region whose complexity is lower than a complexity threshold; The sub-region whose pixel value difference statistic is smaller than the difference threshold is determined as the embedded region.

5. The image information encryption method according to claim 3, characterized in that: The embedding area is a rectangular area, and each of the embedding areas includes a plurality of sub-areas, and the binary bit stream obtained by converting the binary bit stream of each pixel in the auxiliary information storage area and the ciphertext byte sequence is embedded in the embedding area, including: Using the formula The binary bit stream of each pixel in the restored auxiliary information storage area and the binary bit stream obtained after the ciphertext byte sequence is converted are embedded in the embedding area, wherein i is the number of the sub-area included in the embedding area, is the maximum pixel value of the sub-region numbered i, is the minimum pixel value of the sub-region numbered i, b is the information bit of the binary bit stream, is the minimum pixel value of the sub-region numbered i after the information is embedded, is the maximum pixel value of the sub-region numbered i after the information is embedded, and α is a preset translation parameter.

6. A method for decrypting image information, characterized in that: include: Obtaining an encrypted image processed by the image information encryption method according to any one of claims 1 to 5; Obtaining an embedded binary bit stream from the encrypted image; Convert the binary bit stream into a ciphertext byte sequence, and decrypt the ciphertext byte sequence using a preset decryption method corresponding to a preset encryption method to obtain each pixel in the sensitive information area; Each pixel in the sensitive information area of ​​the encrypted image is replaced with each pixel in the sensitive information area.

7. The image information decryption method according to claim 6, characterized in that: The step of obtaining an embedded binary bit stream from the encrypted image comprises: Obtaining pixel values ​​of a restoration auxiliary information storage area in the encrypted image, and obtaining restoration auxiliary information based on the pixel values, wherein the restoration auxiliary information storage area is a pre-set area for storing restoration auxiliary information, and the restoration auxiliary information storage area does not overlap with the sensitive information area; Determine the position information of the embedding area and the position information of the sensitive information area based on the restoration auxiliary information; Based on the position information of the embedding area, an embedded binary bit stream is obtained from the encrypted image.

8. A computer program product, characterized in that It includes computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the image information encryption method as described in any one of claims 1 to 5 and / or the image information decryption method as described in any one of claims 6 to 7.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the image information encryption method as described in any one of claims 1 to 5 and / or the image information decryption method as described in any one of claims 6 to 7.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the image information encryption method as described in any one of claims 1 to 5 and / or the image information decryption method as described in any one of claims 6 to 7.

Citation Information

Patent Citations

  • Reversible data hiding method based on Huffman coding rule and position graph compression

    CN115297218A

  • Medical image sensitive information processing method and device, computer equipment and medium

    CN115510488A

  • Reversible information hiding method and system based on LPVO and sorting

    CN117596343A

  • Image encryption method and device based on two-dimensional chaotic mapping, equipment and medium

    CN118133249A

  • Coding method for notion-image data, decoding method, terminal equipment executing these, and two-way interactive system

    US20050237380A1

Cited By

  • Encryption method and decryption method of Internet of Vehicles data

    CN121462701A

  • An encryption method and decryption method for vehicle networking data

    CN121462701B

  • Functional security information display processing method and device, equipment and storage medium

    CN122333557A