A social platform-oriented image grading privacy protection method

By combining reversible information hiding and cryptographic techniques, JPEG images are subjected to hierarchical encryption, which solves the reversibility and hierarchical requirements of image privacy protection on social platforms, and achieves flexible privacy protection and secure display.

CN115375783BActive Publication Date: 2026-11-27HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211010254.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2026-11-27
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

Existing image privacy protection technologies struggle to achieve reversible image recovery and tiered protection on social media platforms, and cannot effectively address the needs of users with varying levels of trust.

Method used

By combining reversible information hiding technology with cryptographic methods, JPEG images are subjected to multiple encryptions. By adjusting the DCT coefficients and embedding keys, the encryption and recovery of different regions are controlled, thereby achieving hierarchical protection of the image.

Benefits of technology

It enables the display of images with different privacy levels based on the user's level of trust, improving the flexibility and security of privacy protection, reducing the risk of privacy information leakage, and reducing computing power and processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375783B_ABST
    Figure CN115375783B_ABST
Patent Text Reader

Abstract

The application discloses a social platform-oriented image hierarchical privacy protection method, comprising the following steps: S1-1, for the original JPEG image uploaded by a user, selecting a region to be protected, and recording the total number and position information of the selected region as a binary bit stream; S1-2, adjusting the brightness information and chrominance components of the JPEG image by adjusting the DCT coefficients of the JPEG image, and converting the numerical values into corresponding binary codes; S1-3, after the binary codes are encrypted by the corresponding key of the region, the binary codes are embedded into the alternating current coefficients of the corresponding DCT block; S1-4, the regions are spliced, and the position information is embedded into the whole image; S2-1, the position information is extracted to realize subsequent hierarchical recovery; S2-2, the scrambled DCT block is recovered; S2-3, the original DCT coefficient is recovered to realize image recovery. The method combines reversible information hiding technology and related cryptography to meet the demand for personal privacy protection of images uploaded to a social platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of reversible information hiding and cryptography, specifically to a method for image-level privacy protection on social platforms. Background Technology

[0002] With the rapid development of internet technology and the widespread use of social media, people are increasingly accustomed to recording their lives and real-time moods through posting text and images. However, this has led to the frequent occurrence of various image privacy leaks, including facial and body privacy issues. Domestically and internationally, there have been frequent cases of users discovering that photos they uploaded to a platform have been stolen by other illegal websites. In some cases, users' personal information has even been extracted from their images without their permission through image manipulation, causing serious privacy breaches. Today, people are increasingly aware of the importance of protecting their privacy, and protecting images containing users' private information that are widely circulated on social media has become an urgent need.

[0003] Due to its high compression ratio, the JPEG standard is widely used in image storage to save bandwidth and storage space. In current social platforms, JPEG format images have become the main format for transmission and storage. Therefore, many image privacy protection methods for practical application scenarios are designed for processing JPEG format images. An excellent JPEG image privacy protection algorithm usually needs to meet the following requirements: (1) Excellent blurring effect, that is, it is difficult to identify the protected area, mainly reflected in the visual effect of the human eye and the effect of machine recognition. (2) Reversibility, that is, the original JPEG image can be obtained when needed, and whether the original image can be restored without loss and the quality of the restored original image are important criteria. (3) Security, that is, only the authorized party can restore the original image, and the image will not leak privacy information after being attacked.

[0004] Currently, methods for privacy protection of JPEG images can be mainly divided into neural network-based methods and traditional image processing-based methods. Neural network-based methods generally use feature modification to de-identify privacy information, generating images with protection for specific privacy details. Traditional image processing-based methods primarily employ obfuscation, adversarial techniques, and synthesis to protect privacy.

[0005] The method of modifying the DCT coefficients of JPEG images to achieve privacy protection is unique to JPEG images. Existing methods similar to this invention typically use block scrambling or randomization to adjust the DCT coefficients to achieve privacy protection in JPEG images. This adjustment method is a type of obfuscation technique, which achieves privacy protection by blurring the protected area.

[0006] Most existing image privacy protection technologies do not simultaneously address both perfect image restoration and tiered recovery. Many image processing-based privacy protection technologies cannot reversibly restore an image after processing. If such technologies are to be applied to protect images on social media platforms, the only solution is to store both the encrypted and original images on a server and then display them as needed. However, this approach relies on the assumption of a completely trustworthy server. While most social media platform servers are currently trustworthy, the possibility of data leaks cannot be completely ruled out. Furthermore, existing technologies largely fail to meet users' tiered privacy protection needs; they can only perform encryption / decryption on the entire image or only specific private areas. Summary of the Invention

[0007] This invention addresses the shortcomings of existing technologies by proposing a hierarchical image privacy protection method for social media platforms. It combines reversible information hiding technology with relevant cryptographic methods to meet the need for personal privacy protection in images uploaded to social media platforms. Specifically, the entire image is multi-layered encrypted when uploaded to the server. Users with high trust in the image publisher (high-privilege users) can fully recover the image; while users with low trust (low-privilege users) can choose to recover only a portion of the image, with other parts involving critical privacy (such as facial areas) remaining encrypted.

[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0009] A method for image-based privacy protection on social media platforms includes the following steps:

[0010] S1. Generation of Protected Images

[0011] S1-1. For the original JPEG image uploaded by the user, select the area to be protected, and record the total number and location information of the selected area as a binary bit stream;

[0012] S1-2. Adjust the luminance and chrominance components of the JPEG image by adjusting the DCT coefficients, and convert their values ​​into corresponding binary codes.

[0013] S1-3. After encrypting the binary code generated in S1-2 with the key corresponding to the region, embed it into the AC coefficient of the corresponding DCT block using the method of reversible information hiding.

[0014] S1-4. The regions processed in S1-3 are stitched together, and the position information generated in S1-1 is embedded into the whole image using a reversible information hiding method.

[0015] S2, Image Restoration

[0016] S2-1. Extracting location information allows us to determine the location of the selected area, enabling us to identify the selected block and achieve subsequent hierarchical recovery.

[0017] S2-2, Restore the scrambled DCT block by reordering the scrambled AC coefficients according to the sequences generated by different keys;

[0018] S2-3. Restore the original DCT coefficients. Restore the luminance and chrominance components that were modified when the protected image was generated, and realize the image restoration.

[0019] Preferably, the method for adjusting the DCT coefficients in step S1-2 is as follows:

[0020] Adjusting the luminance component of a JPEG image involves setting the first six coefficients arranged in a zigzag order in the DCT block to zero.

[0021] The value of each coefficient α is quantized into α′, as shown below:

[0022]

[0023] Among them, round(·) and These are the rounding function and the downward fetching function, respectively.

[0024] In step S1-2, the generated value of |α′| is converted into binary code. The length of the bit stream for each value in the binary code is fixed at 9 bits. The value of α is between 0 and 511, and is represented by 9 bits.

[0025] The adjustment of the chroma components in a JPEG image only sets the first coefficient in the selected area, i.e., the DC coefficient, to zero.

[0026] Preferably, the key is a sequence of a specified length generated using a pseudo-random number generator, i.e., a random order of a sequence of a specified length.

[0027] Preferably, the encryption binary code embedding algorithm in steps S1-4 is as follows: For each AC coefficient a j And a bit s, where s is 0 or 1, using a j '=a j Embedded in the manner of ×2+s, where a j'(j=6,7,8,…59) represents the j-th modified AC coefficient, while a j It is the j-th original coefficient.

[0028] Preferably, in steps S1-3, the key encryption method is as follows: scrambling the AC coefficients in each DCT block mainly includes two parts: flipping the sign of the AC coefficients in the selected block, and then scrambling the AC coefficients in all components of the JPEG image. For each selected region, a random sequence represented by R1 is generated using a pseudo-random number generator, and the sign of the AC coefficients in the selected block is flipped according to R1. In addition, the AC coefficients in each selected block are then reordered according to the order of R1.

[0029] Preferably, the location information embedding algorithm in steps S1-4 is as follows:

[0030]

[0031] Where a' represents the modified AC coefficient, a is the original value, i is the bit value to be embedded, i is 0 or 1, sign(·) represents the sign function, and the number of modified AC coefficients is determined by the length of the position information.

[0032] Preferably, the method for extracting location information in step S2-1 is as follows:

[0033] As shown by the location information embedding algorithm in steps S1-4, only AC coefficients with values ​​of ±1 or ±2 contain embedded data. Therefore, the location information can be extracted according to the following formula:

[0034]

[0035] Then, the AC coefficient at the corresponding position is restored using the following formula:

[0036]

[0037] Where a' is the adjusted AC coefficient, and a is the restored AC coefficient.

[0038] Preferably, the method for restoring the scrambled DCT blocks in step S2-2 is as follows: First, for each DCT block in the protected area, a random sequence R1 and R2 for visual transformation is generated using the corresponding key as the seed of the PRG. The permuted AC coefficients are reordered by restoring the scrambled run-length code through R2. Then, the signs of all AC coefficients are flipped using R1 to restore the modified AC coefficients.

[0039] Preferably, the method for restoring the original DCT coefficients in steps S2-3 is as follows:

[0040] To recover the luminance component, first use the formula s = a' j mod2 extracts embedded data from the 6th to the 59th AC coefficients and according to the formula Restore the original AC coefficient a j Where s is the extracted bit value, and a j '(j=6,7,8,…59) is the j-th AC coefficient. Then, the extracted binary stream is restored to the processed value |α'| of each corresponding coefficient, and then restored to the actual coefficient α according to the following formula:

[0041]

[0042] The α at each position is restored to the first six positions of the corresponding position in the DCT coefficient, that is, the j-th DCT coefficient when j = 1, 2, 3, 4, 5, 6;

[0043] To recover the chromaticity component, only the DC coefficient needs to be recovered, and the recovery process is the same as that for the luminance component.

[0044] This invention has the following characteristics and beneficial effects:

[0045] By adopting the above technical solution, users can display images with different privacy levels to viewers of different trust levels on social platforms. Instead of only having two states, encrypted and original images, users can choose to encrypt specific areas according to different needs, which can better meet the different privacy protection requirements of users when posting images on social platforms.

[0046] Meanwhile, the encryption and recovery achieved by the traditional image processing methods and reversible information hiding techniques used in this invention require less performance and are less time-consuming compared to image privacy protection methods using deep neural networks. The blurring method employed in this invention can also visually and effectively hide important privacy information, resulting in high security.

[0047] This invention avoids allowing untrusted strangers to access the privacy of image owners while simultaneously satisfying users' desire for trusted acquaintances to see the complete image. Furthermore, for those with lower trust levels, the image is shown with key private information hidden, thus fulfilling users' desire for self-expression while protecting their privacy, achieving a balance between practicality and security. In conclusion, this invention has broad practical value in addressing user privacy issues on social media platforms.

[0048] This invention uses a method that embeds the test information into the image itself using reversible steganography, ensuring that the encrypted image can be fully recovered if the key is correct. This allows the encrypted image to be stored only on the server, greatly reducing the risk of privacy information leakage from the image.

[0049] The encryption method proposed in this invention, which controls different areas based on different keys, can better meet users' diverse needs for image display. Specifically, users can choose to allow only certain parts or the entirety of the image to be seen, based on the viewer's identity, greatly improving the flexibility and practical usability of image privacy protection methods.

[0050] Finally, the method of the present invention requires less computing power and processing time, and can be better applied to some lightweight use cases, so that users do not need to wait too long for processing time in actual use. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.

[0053] Figure 2 This is a flowchart illustrating the encryption process in an embodiment of the present invention.

[0054] Figure 3 This is a flowchart illustrating the complete recovery process in an embodiment of the present invention.

[0055] Figure 4 This is a partial recovery flowchart in an embodiment of the present invention. Detailed Implementation

[0056] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0057] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0058] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0059] This invention provides a method for image-based privacy protection on social media platforms, such as... Figure 1 As shown, it includes the following steps:

[0060] S1. Generation of Protected Images

[0061] S1-1. For the original JPEG image uploaded by the user, select the area to be protected and record the total number and location information of the selected area as a binary bit stream.

[0062] Understandably, the selection of the protected area can either use existing face detection modules and other interfaces to identify the area that needs to be protected, or allow users to make their own selections.

[0063] It should be noted that since each DCT block in a JPEG image is 8*8 pixels, the chroma information is halved during compression. Therefore, the width and height of the area to be protected should both be integer multiples of 16. The location of each key protected area can be uniquely determined by the coordinates of the top-left pixel of the area and the width and height of the area. This information, along with the total number of face areas, is converted into a binary stream and embedded into the image in the final step of the algorithm.

[0064] The above technical solution lays the foundation for a method to achieve graded image privacy protection by selecting different regions and controlling the encryption and recovery of different regions with multiple keys, as well as a graded recovery mode based on region for social platforms.

[0065] S1-2. Adjust the luminance and chrominance components of the JPEG image by adjusting the DCT coefficients, and convert their values ​​into corresponding binary codes.

[0066] Specifically, the adjustment method for the DCT coefficients is as follows:

[0067] Adjusting the luminance component of a JPEG image involves setting the first six coefficients arranged in a zigzag order in the DCT block to zero.

[0068] Understandably, the first six coefficients specifically refer to the first six coefficients arranged in a zigzag pattern starting from the top left corner, namely the first three in the first row, the first two in the second row, and the first in the third row.

[0069] The value of each coefficient α is quantized into α′, as shown below:

[0070]

[0071] Among them, round(·) and These are the rounding function and the downward fetching function, respectively.

[0072] In the above technical solution, the luminance and chrominance components of the JPEG image are modified in different ways to protect privacy information. To minimize detectable personal information in the protected image and better achieve graded restoration, we choose to set the first six coefficients of the luminance information DCT coefficients to zero, which gives the encrypted image a better blurring effect.

[0073] In JPEG images, the chroma component adjustment only sets the first coefficient (DC coefficient) in the selected area to zero. Understandably, the chroma component adjustment method is the same as the luma component adjustment method.

[0074] For the chroma component, only the first coefficient in the selected block, the DC coefficient, is set to zero. Since the human eye is sensitive to luminance information but not to chroma, this simplified operation on the chroma component helps reduce the increase in image size without significantly affecting the protected area.

[0075] Furthermore, the generated |α′| value is converted into binary code and embedded into the remaining AC coefficients in the same block using a reversible information hiding algorithm. Therefore, the generated |α′| value is converted into binary code, with each value having a fixed bitstream length of 9 bits. This is because each DCT coefficient ranges from -1023 to 1023, and α's value is between 0 and 511, represented by 9 bits. Since a total of 6 DCT coefficients are modified in each block, a total of 54 bits of information need to be embedded. This information is XORed with the key for the corresponding region generated earlier and then embedded into the 6th to 59th AC coefficients. During recovery, the sign of α can be determined by the parity of |α′|.

[0076] In the above technical solution, the mosaic effect of JPEG images is achieved by adjusting the low-frequency coefficients of DCT, and the encryption method combined with DCT block scrambling can achieve a very good visual blurring effect.

[0077] S1-3. After encrypting the binary code generated in S1-2 with the key corresponding to the region, embed it into the AC coefficients of the corresponding DCT block using a reversible information hiding method.

[0078] It should be noted that the AC coefficient refers to the 64 DCT coefficients in each DCT block, the first of which is the DC coefficient, and the rest are AC coefficients.

[0079] Specifically, such as Figure 2 As shown, the key is generated by using a pseudo-random number generator to generate a sequence of a specified length, that is, to generate a random order of a sequence of a specified length (e.g., if the length is 4, it may generate 4231 or 4123, etc.).

[0080] Understandably, in the above technical solution, the entire image protection algorithm uses a key to control the generation and restoration of encrypted images. By processing different regions with different keys, hierarchical image restoration can be achieved. The key is mainly used for XORing with auxiliary information during DCT coefficient adjustment, and for controlling the order of DCT block coefficient scrambling. To enhance security, a key-controlled pseudo-random number generator (PRNG) is used to generate a sequence of specified length to control the encryption process. For uniqueness, the key for each image is generated by calculating the SHA-256 hash value of the user's password and the characteristics of the JPEG image.

[0081] In addition, the key control method, which XORs the key with auxiliary information and controls the order of DCT coefficients and sign flipping, has excellent security.

[0082] Furthermore, the encrypted binary code embedding algorithm is as follows: for each AC coefficient a jAnd a bit s, where s is 0 or 1, using a j '=a j Embedded in the manner of ×2+s, where a j '(j=6,7,8,…59) represents the j-th modified AC coefficient, while a j It is the j-th original coefficient.

[0083] S1-4. The regions processed in S1-3 are stitched together, and the position information generated in S1-1 is embedded into the entire image using a reversible information hiding method.

[0084] Furthermore, the encryption method for the key is as follows: XORing it with auxiliary information of the corresponding length and then embedding it; and controlling the order of the AC coefficients in each DCT block.

[0085] Specifically, scrambling the AC coefficients in each DCT block mainly involves two parts: flipping the sign of the AC coefficients in the selected block, and then scrambling the AC coefficients in all components of the JPEG image. For each selected region, a random sequence represented by R1 is generated using a pseudo-random number generator, and the sign of the AC coefficients in the selected block is flipped according to R1. In addition, the AC coefficients in each selected block are then reordered according to the order of R1.

[0086] Specifically, a histogram-based algorithm is used to embed the previously generated location information into the entire image. The embedding formula is as follows:

[0087]

[0088] Where a' represents the modified AC coefficient, a is the original value, i is the bit value to be embedded (0 or 1), sign(·) represents the sign function, and the number of modified AC coefficients is determined by the length of the position information. Assuming there are n bits of position information to hide, the first n AC coefficients in the entire image are selected for modification.

[0089] In steps S1-3 and S1-4 above, auxiliary information from the image processing process is embedded into the image itself using reversible information hiding technology to achieve a reversible recovery process that does not require assistance from other media, which is used for encryption and recovery of the protected area.

[0090] S2. Image Restoration: The protected image is stored in encrypted form on the server. When needed for display, it can be restored according to different protection levels based on user requirements. The method of this invention uses different keys to achieve different levels of restoration. When all keys are available, the image can be completely restored, perfectly matching the compressed version of the original image. The specific restoration process is as follows: First, location information is extracted to determine the location of the selected area. Then, the scrambled AC coefficients are reordered according to sequences generated by different keys. Next, the information embedded in the high-frequency coefficients is extracted and decrypted using the key, then restored to the corresponding first six coefficients. Finally, the images from different areas are stitched together in their original positions to achieve image restoration. Figure 3 and Figure 4 As shown, the specific steps include the following:

[0091] S2-1. Extracting location information allows us to determine the location of the selected area, enabling us to identify the selected block and achieve subsequent hierarchical recovery.

[0092] Specifically, as shown by the location information embedding algorithm in steps S1-4, only AC coefficients with values ​​of ±1 or ±2 contain embedded data. Therefore, the location information can be extracted according to the following formula:

[0093]

[0094] Then, the AC coefficient at the corresponding position is restored using the following formula:

[0095]

[0096] Where a' is the adjusted AC coefficient, and a is the restored AC coefficient.

[0097] In the above technical solution, the location of different areas is extracted hierarchically, thereby achieving subsequent hierarchical restoration. That is, users can choose to allow only certain parts or all of the image to be seen based on the viewer's identity, which greatly improves the flexibility and practical usability of the image privacy protection method.

[0098] S2-2. Restore the scrambled DCT block by reordering the scrambled AC coefficients according to the sequences generated by different keys.

[0099] Understandably, DCT coefficients are the carriers used to record image information in JPEG format images. A DCT block is an 8*8 DCT coefficient block, which is obtained by performing DCT transformation on corresponding 8*8 pixel blocks.

[0100] First, for each DCT block in the protected area, the corresponding key is used as the seed of the PRG to generate random sequences R1 and R2 for visual transformation. The permuted AC coefficients are reordered by restoring the scrambled run-length code through R2, and then the signs of all AC coefficients are flipped using R1 to restore the modified AC coefficients.

[0101] S2-3. Restore the original DCT coefficients. Restore the luminance and chrominance components that were modified when the protected image was generated, and realize the image restoration.

[0102] To recover the luminance component, first use the formula s = a' j mod2 extracts embedded data from the 6th to the 59th AC coefficients and according to the formula Restore the original AC coefficient a j Where s is the extracted bit value, and a j '(j=6,7,8,…59) is the j-th AC coefficient. Then, the extracted binary stream is restored to the processed value |α'| of each corresponding coefficient, and then restored to the actual coefficient α according to the following formula:

[0103]

[0104] The α at each position is restored to the first six positions of the corresponding position in the DCT coefficient, that is, the j-th DCT coefficient when j = 1, 2, 3, 4, 5, 6;

[0105] To recover the chromaticity component, only the DC coefficient needs to be recovered, and the recovery process is the same as that for the luminance component.

[0106] In practical applications, image restoration can be summarized into three scenarios. First, the highest level of privacy protection, where the encrypted image can be directly retrieved from the server without decryption. Second, partial restoration, where a portion of the image is restored by distributing keys for the corresponding areas, while areas containing critical privacy information remain encrypted. Third, complete restoration, where the original image can be restored without loss of quality by obtaining all keys.

[0107] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments, including components, without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A method for graded privacy protection of images on social media platforms, characterized in that, Includes the following steps: S1. Generation of Protected Images S1-1. For the original JPEG image uploaded by the user, select the area to be protected, and record the total number and location information of the selected area as a binary bit stream; S1-2. Adjust the luminance and chrominance components of the JPEG image by adjusting the DCT coefficients, and convert their values ​​into corresponding binary codes. In step S1-2, the method for adjusting the DCT coefficients is as follows: Adjusting the luminance component of a JPEG image involves setting the first six coefficients arranged in a zigzag order in the DCT block to zero. Value of each coefficient Quantified as The expression is as follows: in and These are the rounding function and the downward fetching function, respectively. In step S1-2, the generated The value is converted into binary code, and the bit stream of each binary value has a fixed length of 9 bits. Its value is between 0 and 511, represented by 9 bits; The adjustment of the chroma components in a JPEG image only sets the first coefficient in the selected area, i.e., the DC coefficient, to zero. S1-3. After encrypting the binary code generated in S1-2 with the key corresponding to the region, embed it into the AC coefficient of the corresponding DCT block using the method of reversible information hiding. The encrypted binary code embedding algorithm in steps S1-3 is as follows: For each AC coefficient and one bit The For 0 or 1, use Embedded in a manner where Indicates the first The modified communication coefficient, and It is the first One original coefficient; In steps S1-3, the key encryption method is as follows: scrambling the AC coefficients in each DCT block mainly includes two parts: flipping the sign of the AC coefficients in the selected block, and then scrambling the AC coefficients in all components of the JPEG image. For each selected region, a pseudo-random number generator is used to generate a random sequence represented by R1, and the sign of the AC coefficients in the selected block is flipped according to R1. In addition, the AC coefficients in each selected block are then reordered according to the order of R1. S1-4. The regions processed in S1-3 are stitched together, and the position information generated in S1-1 is embedded into the whole image using a reversible information hiding method. S2, Image Restoration S2-1. Extracting location information allows us to determine the location of the selected area, enabling us to identify the selected block and achieve subsequent hierarchical recovery. S2-2, Restore the scrambled DCT block by reordering the scrambled AC coefficients according to the sequences generated by different keys; S2-3. Restore the original DCT coefficients. Restore the luminance and chrominance components that were modified when the protected image was generated, and realize the image restoration.

2. The image-based graded privacy protection method for social platforms according to claim 1, characterized in that, The key is a sequence of a specified length generated using a pseudo-random number generator, that is, a random order of a sequence of a specified length.

3. The image-based graded privacy protection method for social platforms according to claim 1, characterized in that, The location information embedding algorithm in steps S1-4 is as follows: in This represents the modified AC coefficient. It is the original value. The bit value to be embedded. It is 0 or 1. The number of modified AC coefficients, representing the symbolic function, is determined by the length of the location information.

4. The image-based graded privacy protection method for social platforms according to claim 1, characterized in that, The method for extracting location information in step S2-1 is as follows: As can be seen from the location information embedding algorithm in steps S1-3, only values ​​of or The communication coefficients contain embedded data, therefore the location information can be extracted using the following formula: Then, the AC coefficient at the corresponding position is restored using the following formula: in It is an adjusted AC coefficient. It is the restored exchange coefficient.

5. The image-based graded privacy protection method for social platforms according to claim 4, characterized in that, The method for restoring the scrambled DCT blocks in step S2-2 is as follows: First, for each DCT block in the protected area, the corresponding key is used as the seed of the PRG to generate random sequences R1 and R2 for visual transformation. The permuted AC coefficients are reordered by restoring the scrambled run-length code through R2. Then, the signs of all AC coefficients are flipped using R1 to restore the modified AC coefficients.

6. The image-based graded privacy protection method for social platforms according to claim 5, characterized in that, The method for restoring the original DCT coefficients in step S2-3 is as follows: To recover the luminance component, firstly, using the formula... Embedded data were extracted from the 6th to the 59th AC coefficients and then processed according to the formula. Restore the original communication coefficient ,in It is the extracted bit value, and It is the first Each coefficient is used for interaction, and then the extracted binary stream is restored to the processed value of each corresponding coefficient. Then, restore the actual coefficients using the following formula. : For each position Restore the first six positions of the corresponding positions in the DCT coefficients, i.e. The first time One DCT coefficient; To recover the chromaticity component, only the DC coefficient needs to be recovered, and the recovery process is the same as that for the luminance component.

Citation Information

Patent Citations

  • JPEG image information hiding based private information communication method and system

    CN105426709A

  • Content protection method and recovery method for sensitive area in JPEG image

    CN111432216A