JPEG (Joint Photographic Experts Group) compressed image encryption and decoding method, device, equipment and medium

By chunking JPEG compressed images and generating share images to multiple receivers, the complex problem of key management in the traditional JPEG compressed image encryption mechanism is solved, image security protection is achieved in the absence of keys, and compression efficiency and image quality are taken into account.

CN119583727APending Publication Date: 2025-03-07JIANGXI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411831880.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The traditional JPEG compressed image encryption mechanism faces problems such as complex key management, increased ciphertext file size, and heavy computing burden.

Method used

By converting the specified JPEG compressed images into the brightness-chromatic aberration space and chunked them, multiple image chunks are generated, and each chunk is then encoded to form multiple share images to distribute to different target receivers. When it is necessary to obtain the compressed image, only some target receiving ends need to feedback the corresponding share image and decode it through the Lagrangian polynomial to obtain the target image.

Benefits of technology

It realizes effective protection of image security without a key, while taking into account the requirements of compression efficiency and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583727A_ABST
    Figure CN119583727A_ABST
Patent Text Reader

Abstract

The invention provides a JPEG (Joint Photographic Experts Group) compressed image encryption and decoding method, device, equipment and medium, and the method comprises the steps: partitioning a specified JPEG compressed image, coding to form a plurality of share images, and distributing the share images to different target receiving ends; and only part of the target receiving ends are required to feed back the corresponding share images and decode the share images to obtain the target image. The method has the beneficial effects that the security of the image can be effectively protected under the condition of no key, and the requirements of compression efficiency and image quality can also be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a JPEG compressed image encryption and decoding method, device, equipment and medium. Background Art

[0002] The key is an important part of the protection scheme. If the key is stolen or lost, sensitive data will be unrecoverable. Especially when it comes to multi-user privacy, protecting multi-user data becomes an important challenge. The traditional JPEG compression image encryption mechanism faces problems such as complex key management, increased ciphertext file size, and heavy computational burden. Summary of the invention

[0003] The main purpose of the present invention is to provide a JPEG compressed image encryption and decoding method, device, equipment and medium, aiming to solve the problem of complex key management faced by traditional JPEG compressed image encryption mechanism.

[0004] The present invention provides a JPEG compressed image encryption and decoding method, comprising: Convert the specified JPEG compressed image into a brightness-color difference space, and divide it into blocks to obtain multiple image blocks; Encode each image block to generate a share image corresponding to each image block; Distributing each of the share images to a corresponding number of target receiving terminals; Sending an acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; When the number of the target receiving terminals that respond to the acquisition instruction exceeds a preset value, acquiring the share images of the target receiving terminals that respond to the acquisition instruction; The acquired share images are decoded through Lagrange polynomials to obtain the target image.

[0005] Furthermore, the step of decoding the acquired share image through Lagrange polynomials to obtain the target image includes: Reconstructing the polynomial through Lagrangian polynomial based on the acquired share image to solve the original bit stream; Based on the original bit stream, a temporary image is obtained through Huffman decoding, inverse quantization, IDCT transformation, and conversion from frequency domain to space domain; The temporary image is subjected to color inversion transformation to obtain the target image.

[0006] Furthermore, the DC coefficient of the share image consists of a bit length and an amplitude, and the AC coefficient of the share image consists of a run length, a bit length and an amplitude.

[0007] Furthermore, the step of encoding each image block to generate a share image corresponding to each image block includes: Performing discrete cosine transformation on the image blocks, and quantizing the temporary blocks after the discrete cosine transformation; The quantized DCT coefficients are stored in each temporary block in a zigzag scanning order through zigzag scanning; Each temporary block is encoded by entropy coding to generate a share image corresponding to each image block.

[0008] Furthermore, the step of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: The DC coefficients of the image blocks are encoded by differential pulse modulation, and the AC coefficients of the image blocks are encoded by run-length coding to obtain a temporary component image; A block end marker is assigned to the end of the temporary share image to obtain the corresponding share image.

[0009] Furthermore, the step of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: The DC coefficients of the image blocks are encoded by differential pulse modulation, and the AC coefficients of the image blocks are encoded by run-length coding to obtain a temporary component image; Encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image to obtain an intermediate share image; Encrypting the run length of the AC coefficient in the intermediate share image to obtain a temporary share image; A block end marker is assigned to the end of the temporary share image to obtain the corresponding share image.

[0010] Furthermore, the step of encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image comprises: The amplitudes of the AC coefficient and the DC coefficient in the temporary component image are encrypted by Lagrange polynomials.

[0011] The present invention also provides a JPEG compressed image encryption and decoding device, comprising: A conversion module, used for converting a specified JPEG compressed image into a brightness-color difference space, and performing block division to obtain a plurality of image blocks; An encoding module, used for encoding each image block to generate a share image corresponding to each image block; A distribution module, used for distributing each of the share images to a corresponding number of target receiving terminals; A sending module, used for sending an acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; An acquisition module, configured to acquire the share images of the target receiving terminals that respond to the acquisition instruction when the number of the target receiving terminals that respond to the acquisition instruction exceeds a preset value; The decoding module is used to decode the acquired share image through Lagrange polynomial to obtain a target image.

[0012] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0013] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0014] The beneficial effects of the present invention are as follows: by dividing a specified JPEG compressed image into blocks and encoding them to form multiple share images which are distributed to different target receiving ends, when the compressed image needs to be obtained, only part of the target receiving ends need to feed back the corresponding share images and perform decoding to obtain the target image. This can effectively protect the security of the image without a key, and can also take into account the requirements of compression efficiency and image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of a JPEG compressed image encryption and decoding method according to an embodiment of the present invention; Figure 2 It is a schematic block diagram of the structure of a JPEG compressed image encryption and decoding device according to an embodiment of the present invention; Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0016] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.

[0019] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0020] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0021] Reference Figure 1 The present invention proposes a JPEG compressed image encryption and decoding method, comprising: S1: convert the specified JPEG compressed image into a brightness-color difference space, and divide it into blocks to obtain multiple image blocks; S2: Encode each image block to generate a share image corresponding to each image block; S3: Distributing each of the share images to a corresponding number of target receiving terminals; S4: Sending an acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; S5: when the number of the target receiving ends responding to the acquisition instruction exceeds a preset value; S5: Acquire the share image of the target receiving end that responds to the acquisition instruction; S6: Decode the acquired share image using Lagrange polynomials to obtain a target image.

[0022] As described in S1 above, the specified JPEG compressed image is converted to the brightness-color difference space and divided into multiple image blocks. That is, the image is converted from the RGB space to the YCrCb space (brightness-color difference space), the Y channel represents the brightness information, and the Cr and Cb channels represent the chrominance information, which can help to perform more efficient block division and encryption in further processing. Dividing the image into small blocks (usually 8x8 or 16x16 blocks) for subsequent independent processing and encryption can improve processing efficiency and thus increase flexibility in encryption.

[0023] As described in step S2 above, each image block is encoded to generate a corresponding share image for each image block. Encoding each block can be implemented by DCT transformation and quantization. The share image generated by each block should contain sufficient information to be decoded at the receiving end. The generation of the share image is to use encryption and encoding technology (such as key-based encryption) to convert the block data into information that cannot be directly recognized.

[0024] As described in step S3 above, each of the share images is distributed to a corresponding number of target receiving terminals. Each share image is distributed to multiple receiving terminals to ensure that no single receiving terminal can completely restore the original image. Even if some data is intercepted, the corresponding personnel cannot restore the JPEG compressed image.

[0025] As described in step S4 above, the acquisition instruction of the designated JPEG compressed image is sent to each of the target receiving ends. The control module sends instructions to all receiving ends to request them to acquire and process the share images held by each of them.

[0026] As described in the above step S5, when the number of the target receiving ends that respond to the acquisition instruction exceeds the preset value, the share image of the target receiving ends that respond to the acquisition instruction is acquired; that is, a threshold is set in advance, and only when the response to the threshold is reached or exceeded, the receiving party can start decoding and collect the share images of the receiving ends that reach the preset value for subsequent decoding.

[0027] As described in step S6 above, the target image is obtained by decoding the acquired share images through Lagrangian polynomials. The original image is restored by interpolating the collected share images using Lagrangian polynomials. The information contained in each share image is utilized to ensure that the image can be reliably reconstructed even if only part of the data is available.

[0028] In one embodiment, the step S6 of decoding the acquired share images by Lagrange polynomials to obtain the target image comprises: S601: reconstructing a polynomial through a Lagrangian polynomial based on the acquired share image to solve the original bit stream; S602: Based on the original bit stream, obtain a temporary image through Huffman decoding, inverse quantization, IDCT transformation, and conversion from frequency domain to space domain; S603: Perform color inversion transformation on the temporary image to obtain the target image.

[0029] As described in the above steps S601-S603, decoding of the share image is realized, and the polynomial is reconstructed using the Lagrange polynomial interpolation method based on the share images obtained from multiple target receiving ends. The share images respectively provide a part of the original image data, and the complete original bit stream can be effectively reconstructed through the Lagrange polynomial. Huffman coding is a method of image compression. First, the compressed bit stream is decoded through Huffman decoding to restore the DCT coefficients before compression. In JPEG image compression, the quantization step will lose some information. Therefore, in the inverse quantization stage, the DCT coefficients will be restored according to the quantization matrix to restore the quantized data to data closer to the original data. Then an inverse discrete cosine transform (IDCT) is performed to convert the DCT coefficients in the frequency domain to the spatial domain. This step is to recover from the frequency domain to the spatial representation of the image, usually a series of inverse transformation operations to obtain a temporary image. Since the original color image is converted from the RGB space to the YCrCb space, the temporary image needs to be converted from the YCrCb color space back to the RGB color space in the last step. After the inverse color transformation operation, the final image presented is the target image required by the user, and this image can effectively reflect the original image.

[0030] In one embodiment, the DC coefficient of the share image consists of a bit length and an amplitude, and the AC coefficient of the share image consists of a run length, a bit length, and an amplitude.

[0031] In one embodiment, the step S2 of encoding each image block to generate a share image corresponding to each image block includes: S201: performing discrete cosine transform on the image blocks, and quantizing the temporary blocks after the discrete cosine transform; S202: storing the quantized DCT coefficients in each temporary block in a zigzag scanning order through zigzag scanning; S203: Encode each temporary block by entropy coding to generate a share image corresponding to each image block.

[0032] As in the above steps S201-S203, DCT transformation is performed on each image block (such as 8×8 or 16×16 pixel blocks). DCT transforms the image from the spatial domain to the frequency domain, and can separate the visually more important low-frequency components from the less important high-frequency components, which is convenient for subsequent data processing. DCT transformation can convert the data in this image block from the value of each pixel into a frequency domain representation. The quantization process will reduce the DCT coefficients according to the quantization table, remove those less important high-frequency components, resulting in information loss, but this loss is largely acceptable because the human eye is less sensitive to high-frequency components. The quantized DCT coefficients retain the visual information of the image, but reduce the amount of data, so they need to be quantized. The purpose of the zigzag scanning method is to store low-frequency components (usually contributing more to the visual quality of the image) first, and high-frequency components (contributing less to the visual quality) later. Entropy coding is a variable length coding method that aims to compress data using the frequency of symbols in the data. In JPEG, Huffman coding is usually used, which is the most common entropy coding method. For each temporal block, entropy coding encodes the quantized DCT coefficients into a shorter binary stream, thereby generating data of a "share image" and reducing redundant information.

[0033] In one embodiment, the step S203 of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: S20301: using differential pulse modulation encoding for the DC coefficients of the image blocks, and using run-length encoding for the AC coefficients of the image blocks, to obtain a temporary share image; S20302: assigning a block end marker to the end of the temporary share image to obtain a corresponding share image.

[0034] As described in the above steps S20301-S20302, differential coding is an effective coding method for reducing the variation range of DC coefficients. In JPEG compression, the DC coefficient represents the average brightness value of the image block. Since the DC coefficients of adjacent blocks often do not vary much, the amount of information is reduced by encoding the difference between adjacent blocks (DC coefficient of the current block minus DC coefficient of the previous block). Differential pulse modulation coding (DPCM) encodes these differences, and usually uses entropy coding methods such as Huffman coding to further compress the difference, thereby generating a compact coding result. In JPEG compression, AC coefficients usually produce many zero values ​​after Zigzag scanning, so run-length coding can effectively encode these zeros. Run-length coding uses a running number that can effectively represent "zero" and subsequent non-zero coefficients to make the data more compact. For each encoded temporary share image, a block end marker (for example, a specific identifier or codeword) is added at the end to indicate the end of the data packet. The block end marker can help the decoder accurately locate the end of the data and avoid miscoding when processing multiple blocks of data.

[0035] In one embodiment, the step S203 of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: S20311: using differential pulse modulation encoding for the DC coefficients of the image blocks, and using run-length encoding for the AC coefficients of the image blocks, to obtain a temporary share image; S20312: Encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image to obtain an intermediate share image; S20313: Encrypting the run length of the AC coefficient in the intermediate share image to obtain a temporary share image; S20314: assigning a block end marker to the end of the temporary share image to obtain a corresponding share image.

[0036] As described in the above steps S20311-S30314, the amplitudes of the DC coefficients and AC coefficients in the temporary share image are encrypted, and the amplitude information is encrypted into another form to protect these important data from being obtained by unauthorized users. The run length of the AC coefficient in the intermediate share image is encrypted. This step is intended to protect the privacy of the run information and prevent attackers from predicting the distribution of the original data based on the run length. By encrypting the run length, even if part of the data is obtained, it is difficult for attackers to infer the content of the original image from it. The efficiency and security of the image encoding and encryption process are ensured, and the amplitude and run length of the DC coefficient and AC coefficient are protected. This process ensures that the obtained share image not only has a significant compression effect, but also has improved security, which helps to protect sensitive information and prevent unauthorized access.

[0037] In one embodiment, the step S20312 of encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image includes: S203121: Encrypt the amplitudes of the AC coefficient and the DC coefficient in the temporary share image by using Lagrange polynomials.

[0038] As described in the above step S203121, the amplitudes of the AC coefficient and the DC coefficient are combined with a plurality of predetermined secret points to generate new data points (ie, ciphertexts), so that an attacker without the corresponding key or point cannot recover the original data.

[0039] In a specific embodiment, any k ≥2 and n The threshold is used to encrypt and distribute the image to n The present invention is applied in the entropy coding stage of the JPEG coding stage ( k,n ) secret sharing scheme is used to encrypt each segmented 8×8 pixel block. Specifically, the zigzag scan in the conventional JPEG encoding step stores the quantized DCT coefficients in each block in a zigzag scan order, and in the subsequent Huffman coding stage, the DC coefficients are encoded using differential pulse modulation (DCPM) and the AC coefficients are compressed using run-length coding (RLC) to form multiple minimum coding units MCU (Minimum Coded Units). Each MCU block contains a DC coefficient (DC), multiple non-zero AC coefficients (AC), and a block end marker (EOB).

[0040] The DC coefficient in each MCU block consists of two parts: bit length (Size) and amplitude (Amplitude), while the AC coefficient consists of three parts: run length (Run), bit length (Size) and amplitude (Amplitude). The end of block marker EOB is represented by [0, 0]. The Shamir secret sharing scheme is used to encrypt the DC coefficient Amplitude and AC coefficient Amplitude. At the same time, the AC coefficient run length is encrypted based on this encryption, thereby disrupting the position of non-zero AC coefficients in the 8×8 block, further improving the encryption level.

[0041] Specifically, the corresponding binary word is obtained according to the bit of the DC / AC coefficient related bit stream in each MCU block. M The Galois Field is introduced to ensure that the length of the encrypted bit stream is the same as the original bit stream. M Galois Domain GF ( 2 M ), each encrypted shared amplitude bit stream replaces the amplitude bit stream corresponding to the original image to generate an encrypted shared image.

[0042] The specific process of applying the Shamir secret sharing scheme in the encoding stage is to encrypt the Amplitude of the DC coefficient and AC coefficient in each MCU block in the image using Lagrange interpolation polynomials.

[0043] For the first c MCU Blocks B c Sharing process, the AC coefficient of each frequency block is generated by its amplitude to generate the corresponding binary stream A i , where 0< i ≤ m , m is the number of non-zero AC coefficients in the block. Assume A i The decimal value of is S i , each receiving end has a unique identifier IDx j , where 1≤ j ≤ n .but: , for i = 1,2,…, m . If | A i |≥log2( n +1) (where |.| is the size operator, i.e. |A i |For A i The binary code stream length) generates a a l A sequence of random values, where 1≤ l ≤ k ,make a l ∈ . When | A i |<log2( n +1), the code is padded to meet the conditions, and then these values ​​are used in the Galois field. Define a ( k -1) order polynomial, in Galois Field Internal sharing.

[0044] Similarly, the DC coefficient is processed in the same way as the AC coefficient. f i ( x j ), you can get multiple corresponding shared values S ij It is worth noting that each S ij The same number of bits as the original bit stream are used for encoding, and the original amplitude values ​​are replaced one by one. A i , thereby obtaining the blocks in the shared JPEG image SI B c A shared version of .

[0045] Replace the DC and AC amplitude values ​​in each 8×8 frequency block in the original image with the amplitude of the shared version one by one, generating n Shared JPEG encrypted images SI 1, SI 2, ..., SI n , and distribute to the corresponding n Receiver IDx 1 , IDx 2, ..., IDx n .

[0046] Run-length coded data can be selectively encrypted based on actual encryption requirements. JPEG uses a Huffman coding table to represent the run length and amplitude of AC coefficients, where the run length value is 0 to 15.

[0047] Galois Field GF (2 4 ) and apply the Shamir secret sharing scheme to the run-length coding result of each AC coefficient in the block. When the number of participants reaches the threshold of the sharing scheme k When the interpolation polynomial is applied to the amplitude and run-length coding results at the same time, the original secret JPEG image can be reconstructed.

[0048] The decoding stage consists of k Different shared JPEG images SI j Reconstruct the secret JPEG image (where 1≤ j ≤ k ). First, for each JPEG share image participating in the shared decryption SI j Block B c , the amplitude of each coefficient will correspond to the reconstruction of a binary bit stream. When | A i |≥log2( n +1), the relevant shared value can be calculated by the magnitude of the coefficient S ij = f i ( x j ). This process is similar to the method performed in the encoding stage. It should be noted that when the polynomial k When the calculated value is known, the block B c The coefficients of can be fully restored. Secret value A i Corresponds to Upper polynomial f i (.) is the constant term.

[0049] According to the Lagrange interpolation polynomial, we get f ( x ) coefficients, and substitute them into the calculation S i = f i (0), repeat this process to recover the amplitude data of DC and AC coefficients in each frequency block until all pixels of the secret image are completed. k When a participant provides his / her share, at least k Group( IDx j ,fi (x j ) ) data, the Lagrange interpolation polynomial can be used to reconstruct the polynomial f ( x ). When the original bit stream is known to be recovered, the block images are reassembled and inversely transformed through Huffman decoding, inverse quantization, IDCT transformation, and conversion from frequency domain to spatial domain. YC b C r Convert image to RGB space, you can reconstruct a clear RGB Image domain, completing the decompression process.

[0050] Reference Figure 2 The present invention also provides a JPEG compressed image encryption and decoding device, comprising: The conversion module 10 is used to convert the specified JPEG compressed image into a brightness-color difference space, and divide the image into blocks to obtain a plurality of image blocks; The encoding module 20 is used to encode each image block to generate a share image corresponding to each image block; A distribution module 30, used for distributing each of the share images to a corresponding number of target receiving terminals; The sending module 40 is used to send the acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; An acquisition module 50, configured to acquire a share image of the target receiving end that responds to the acquisition instruction when the number of the target receiving end that responds to the acquisition instruction exceeds a preset value; The decoding module 60 is used to decode the acquired share image through Lagrange polynomials to obtain a target image.

[0051] In one embodiment, the decoding module 60 includes: A polynomial reconstruction submodule, used for reconstructing a polynomial through a Lagrange polynomial based on the acquired share image to solve an original bit stream; A conversion submodule, used for obtaining a temporary image based on the original bit stream through Huffman decoding, inverse quantization, IDCT transformation and conversion from frequency domain to space domain; The transformation submodule is used to perform color inversion transformation on the temporary image to obtain the target image.

[0052] In one embodiment, the DC coefficient of the share image consists of a bit length and an amplitude, and the AC coefficient of the share image consists of a run length, a bit length, and an amplitude.

[0053] In one embodiment, the encoding module 20 includes: A discrete cosine transform submodule, used for performing discrete cosine transform on the image blocks, and quantizing the temporary blocks after the discrete cosine transform; A storage submodule, used for storing the quantized DCT coefficients in each temporary block in a zigzag scanning order through zigzag scanning; The encoding submodule is used to encode each temporary block by entropy coding to generate a share image corresponding to each image block.

[0054] In one embodiment, the encoding submodule includes: A run-length coding unit, used for adopting differential pulse modulation coding to the DC coefficients of the image blocks, and adopting run-length coding to the AC coefficients of the image blocks, to obtain a temporary share image; The assigning unit is used to assign a block end mark to the end of the temporary share image to obtain the corresponding share image.

[0055] In one embodiment, the encoding submodule includes: An encoding unit, used for encoding the DC coefficients of the image blocks by differential pulse modulation, and for encoding the AC coefficients of the image blocks by run-length encoding, to obtain a temporary component image; an amplitude encryption unit, used for encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image to obtain an intermediate share image; A length encryption unit, used for encrypting the run length of the AC coefficient in the intermediate share image to obtain a temporary share image; The identifier assigning module is used to assign a block end identifier to the end of the temporary share image to obtain the corresponding share image.

[0056] In one embodiment, the amplitude encryption unit comprises: The amplitude encryption subunit is used to encrypt the amplitudes of the AC coefficient and the DC coefficient in the temporary share image through Lagrange polynomials.

[0057] The beneficial effects of the present invention are as follows: by dividing a specified JPEG compressed image into blocks and encoding them to form multiple share images which are distributed to different target receiving ends, when the compressed image needs to be obtained, only part of the target receiving ends need to feed back the corresponding share images and perform decoding to obtain the target image. This can effectively protect the security of the image without a key, and can also take into account the requirements of compression efficiency and image quality.

[0058] Reference Figure 3In the embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store various share images, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the JPEG compressed image encryption and decoding method described in any of the above embodiments can be implemented.

[0059] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0060] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the JPEG compressed image encryption and decoding method described in any of the above embodiments can be implemented.

[0061] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0062] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0063] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0064] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims

1. A JPEG compressed image encryption and decoding method, characterized in that: include: Convert the specified JPEG compressed image into a brightness-color difference space, and divide it into blocks to obtain multiple image blocks; Encode each image block to generate a share image corresponding to each image block; Distributing each of the share images to a corresponding number of target receiving terminals; Sending an acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; When the number of the target receiving terminals that respond to the acquisition instruction exceeds a preset value, acquiring the share images of the target receiving terminals that respond to the acquisition instruction; The acquired share images are decoded through Lagrange polynomials to obtain the target image.

2. The JPEG compressed image encryption and decoding method according to claim 1, characterized in that: The step of decoding the acquired share image through Lagrange polynomials to obtain the target image includes: Reconstructing the polynomial through Lagrangian polynomial based on the acquired share image to solve the original bit stream; Based on the original bit stream, a temporary image is obtained through Huffman decoding, inverse quantization, IDCT transformation, and conversion from frequency domain to space domain; The temporary image is subjected to color inversion transformation to obtain the target image.

3. The JPEG compressed image encryption and decoding method according to claim 1, characterized in that: The DC coefficient of the share image consists of a bit length and an amplitude, and the AC coefficient of the share image consists of a run length, a bit length and an amplitude.

4. The JPEG compressed image encryption and decoding method according to claim 1, wherein: The step of encoding each image block to generate a share image corresponding to each image block includes: Performing discrete cosine transformation on the image blocks, and quantizing the temporary blocks after the discrete cosine transformation; The quantized DCT coefficients are stored in each temporary block in a zigzag scanning order through zigzag scanning; Each temporary block is encoded by entropy coding to generate a share image corresponding to each image block.

5. The JPEG compressed image encryption and decoding method as claimed in claim 4, characterized in that: The step of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: The DC coefficients of the image blocks are encoded by differential pulse modulation, and the AC coefficients of the image blocks are encoded by run-length coding to obtain a temporary component image; A block end marker is assigned to the end of the temporary share image to obtain the corresponding share image.

6. The JPEG compressed image encryption and decoding method as claimed in claim 4, characterized in that: The step of encoding each temporary block by entropy coding to generate a share image corresponding to each image block includes: The DC coefficients of the image blocks are encoded by differential pulse modulation, and the AC coefficients of the image blocks are encoded by run-length coding to obtain a temporary component image; Encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image to obtain an intermediate share image; Encrypting the run length of the AC coefficient in the intermediate share image to obtain a temporary share image; A block end marker is assigned to the end of the temporary share image to obtain the corresponding share image.

7. The JPEG compressed image encryption and decoding method according to claim 6, characterized in that: The step of encrypting the amplitudes of the AC coefficient and the DC coefficient in the temporary share image comprises: The amplitudes of the AC coefficient and the DC coefficient in the temporary component image are encrypted by Lagrange polynomials.

8. A JPEG compressed image encryption and decoding device, characterized in that: include: A conversion module, used for converting a specified JPEG compressed image into a brightness-color difference space, and performing block division to obtain a plurality of image blocks; An encoding module, used for encoding each image block to generate a share image corresponding to each image block; A distribution module, used for distributing each of the share images to a corresponding number of target receiving terminals; A sending module, used for sending an acquisition instruction of the specified JPEG compressed image to each of the target receiving ends; An acquisition module, configured to acquire the share images of the target receiving terminals that respond to the acquisition instruction when the number of the target receiving terminals that respond to the acquisition instruction exceeds a preset value; The decoding module is used to decode the acquired share image through Lagrange polynomial to obtain a target image.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.