Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
First, terms that may be used herein are explained as follows:
the terms "comprising," "including," "containing," "having," or other similar terms of meaning should be construed as non-exclusive inclusions. For example: including a feature (e.g., material, component, ingredient, carrier, formulation, material, dimension, part, component, mechanism, device, process, procedure, method, reaction condition, processing condition, parameter, algorithm, signal, data, product, or article of manufacture), is to be construed as including not only the particular feature explicitly listed but also other features not explicitly listed as such which are known in the art.
The following describes a hierarchical encryption method for image compression encoding according to the present invention in detail. Details which are not described in detail in the embodiments of the invention belong to the prior art which is known to the person skilled in the art. Those not specifically mentioned in the examples of the present invention were carried out according to the conventional conditions in the art or conditions suggested by the manufacturer. The reagents or instruments used in the examples of the present invention are not specified by manufacturers, and are all conventional products available by commercial purchase.
As shown in fig. 1, which is an overall framework of a hierarchical encryption method for image compression and encoding, when not encrypted, an encoding flow includes: for an input image (i.e. x)
t) The compressed features (i.e., y) are extracted by the encoder and semantically partitioned based on semantic information (e.g., location information, category information, attribute information, etc.) to obtain eachObject compression characteristics (i.e. characteristics of object compression) to which an object corresponds
At this time, attribute region position information can be obtained according to the attribute information; the compression characteristics of each object are extracted from the entropy prior encoder to guide the prior information (namely, the prior information for guiding the decoding of the entropy prior decoder)
) (ii) a The object compression characteristics and the corresponding prior information are respectively quantized and structurally coded to obtain corresponding structured code streams (namely, the corresponding structured code streams
) (ii) a The solution process comprises the following steps: the structured code stream of the prior information is restored through an entropy prior decoder (namely the quantized prior information), the decoder guides entropy decoding of object compression characteristics by using the restored prior information, and pixel-level information is restored and obtained through the object compression characteristics after entropy decoding.
As will be understood by those skilled in the art, objects in an image refer to various types of target objects set by a user, such as a person, a car, an animal, and so forth. The recovered information of the three pixel levels is given in fig. 1

Respectively, location information, category information, and attribute information. Position information: the area occupied by each type of object in the image is generally represented by an upper left coordinate point and an area length and width; category information: the class to which each subject belongs, e.g., human, car, cat, dog, etc.; attribute information: the related attributes of the object are defined, and the content of the attributes can be set by itself, for example: for a person, the attribute may be a pose or face information; for a car, the attribute may be a license plate; the attribute may also be global information, such as color information, high frequency (structural) information, texture information, etc.; in deep learning, color information, high and low frequency information, texture information, etc. may be dissociated into individual channels of the compressed features; thus, the obtained genus was recoveredSexual information may be certain characteristics or areas of the subject, such as a person's face, a cat's face, a vehicle's license plate, and so forth. The operations of compression feature extraction, semantic division, decoding and the like related to the above processes can be realized by the existing coding framework.
Based on the above compression encoding process, different from the conventional encryption method, the present invention sets three levels of encryption: a first level of encryption, encrypting decoder parameters; second-stage encryption, namely scrambling elements of prior information or object compression characteristics; the third-level encryption is carried out aiming at the structured code stream of the prior information; in the device comprising the entropy prior decoder and the decoder, the corresponding decoding operation is carried out by the entropy prior decoder and the decoder according to the decryption authorization level which is locally provided.
In the embodiment of the invention, three levels of encryption modes are designed, and fig. 1 mainly shows the principle of second-level and third-level encryption, wherein a parameter 1 and a parameter 2, and an iteration number 1 and an iteration number 2 are mainly used for distinguishing when introducing two types of encryption levels, and the related specific parameter and the iteration number can be set by a person skilled in the art according to experience; the specific implementation of each encryption level is as follows:
1) and (4) first-level encryption.
In the embodiment of the invention, the first-stage encryption is set for information about whether the pixel level can be recovered (namely whether the information can be watched by human eyes), and in a specific implementation stage, decoder parameters corresponding to an encoder can be encrypted, and the decoder parameters need to be decrypted by additionally transmitting a key during authorization.
After the encryption of the same level, if the decoder authority does not exist, the pixel level recovery cannot be realized, but all compression characteristics are possessed, and the machine intelligent analysis task can be realized.
2) And (5) second-stage encryption.
In the embodiment of the invention, the second-stage encryption is set for whether a machine intelligent analysis task can be realized or not.
The second level of encryption includes two sub-levels:
in the first sub-level (namely 2-1 level encryption), the elements of the prior information are scrambled by adopting a scrambling encryption method, the scrambling parameters are transmitted after being encrypted by adopting an asymmetric encryption method, the scrambling parameters need to be decrypted by a private key during authorization, and extra information such as a secret key does not need to be transmitted in the process. The prior information contains at least 192 × 4 elements, so that the encryption space is large, and the security performance is good.
The second sub-level (i.e., level 2-2 encryption) scrambles its elements using a scrambling encryption method for a specified region of the object compression characteristics. In the embodiment of the present invention, the designated area mainly refers to an area that needs to be encrypted, for example, a sensitive area related to personal privacy or a partial object compression feature (for example, a plurality of channels representing high-frequency information in the compression feature) and the like, the designated area is determined by attribute information during semantic division, the scrambling parameter is transmitted after being encrypted by using an asymmetric encryption method, the scrambling parameter needs to be decrypted by using a private key during authorization, and no additional information such as a secret key needs to be transmitted in the process.
After 2-1 level encryption, if decryption authorization is not obtained, correct object compression characteristics cannot be obtained, namely, machine intelligent analysis tasks cannot be realized. Moreover, even if the first-level decryption authority exists, the pixel-level recovery cannot be correctly realized, and human eyes cannot recognize the image content; after 2-2 level encryption, sensitive attribute information (for example, the information of the human face region introduced above) in the sensitive object is encrypted, and even if 2-1 level and the first level of decryption authority exist, most image content related to the sensitive object can be correctly recovered, and the sensitive attribute information of the sensitive object cannot be recovered.
3) And (4) third-level encryption.
In the embodiment of the invention, the third-level encryption is set for the structured code stream of whether the prior information can be decoded or not. The structured code stream of the prior information is encrypted by adopting an asymmetric encryption method
Similarly, the prior information code stream part needs to be decrypted by a private key during authorization, extra information such as a transmission key and the like is not needed in the process, and meanwhile, the encryption security performance is higherHigh.
After the level encryption, if the corresponding decryption authority is not obtained, any information related to the sensitive area cannot be obtained, and even the decoding operation related to the sensitive area cannot be completed.
In the encryption introduction, the scrambling encryption can adopt image scrambling encryption technologies such as cat face transform encryption, radiation transform encryption, magic square transform encryption and the like, the asymmetric encryption method can adopt algorithms such as RSA, DSA, ECC and the like, the priori information code stream and the scrambling parameter code stream are spliced and encrypted by the asymmetric encryption method during encryption, so that the encryption security can be improved, otherwise, the scrambling parameter code stream needs to be filled with useless zero elements due to the fact that the length of a plaintext is too short, and thus too much coding redundancy is introduced.
As shown in the left part of fig. 2, for a structured code stream that is hierarchically encrypted, a hierarchical authorization decryption process is provided, and after receiving a structured code stream that is encrypted at three levels, a device including an entropy prior decoder and a decoder performs a corresponding decoding operation according to a locally possessed decryption authorization level, where the process is as follows:
firstly, whether the authorization of the third-level decryption (namely, the 3-level authorization in the figure) is locally provided is judged, and if so, the scrambled and encrypted prior information can be decoded
And recovering the structured code stream of the prior information through an entropy prior decoder. If there is no authorization for third level decryption, then no a priori information and hence no decoding operation can be performed.
Then, judging whether the authorization of the second-level decryption is provided; wherein the second level of encryption comprises two sub-levels: the first sub-level scrambles the elements of the prior information, the second sub-level scrambles the elements of the object compression characteristics of the specified area, and the authorization of the second-level decryption comprises decryption authorization corresponding to each sub-level; if local authorization is available for decryption at the first sub-level (i.e., level 2-1 authorization in the figure), the object compression feature may be restored

Specifically, the obtained scrambling parameters are utilized to recover correct prior information and guide entropy decoding of object compression characteristics, so that the compression characteristics are correctly decoded, and can be directly used for machine intelligent analysis tasks but cannot be viewed by human vision; if there is no corresponding decryption authority, the wrong compression characteristics can be obtained by using the wrong a priori information. If local authorization is available for decryption at a second sub-level (i.e., level 2-2 authorization in the figure), the object compression feature may be restored

The hidden attribute data is specifically used for decrypting object compression characteristics of the designated area by using the obtained scrambling parameters, specifically, a sensitive attribute part can be decrypted, and if no corresponding decryption authorization exists, sensitive attribute information cannot be correctly identified by a machine intelligent analysis task, so that only part of the machine intelligent analysis tasks can be supported.
Finally, whether the local area has the authorization of the first-level decryption (namely, the level 1 authorization in the figure) is judged, if yes, the decoder parameters are decrypted, the compression characteristics of the decoding object of the decoder parameters obtained by decryption are utilized, and the pixel-level information is recovered and obtained
For human visual viewing; if there is no associated decryption authority, the pixel level information cannot be recovered.
As shown in the right part of fig. 2, if there is a first level of decryption authorization but no level 2-1 decryption authorization, the recovered image is confusing and cannot be recognized by human eyes, i.e., (C) part of the image; if there is level 2-1 decryption authority but no level 2-2 decryption authority, the attribute region is confusing and cannot be recognized by the human eye, i.e., the image of part (B). If the right of 2-2 level and 2-1 level is provided, the right compression characteristic is obtained by decryption, the image content can be correctly recovered, and the recovered image can be recognized by human eyes, namely, the image of the part (A).
The above scheme of the embodiment of the invention has the following main beneficial effects:
1) a hierarchical encryption scheme is designed by combining a task-driven code stream structured coding frame, an original high-level semantic information extraction module (for obtaining position information, category information and attribute information) in the task-driven code stream structured coding frame is directly utilized, a sensitive area does not need to be detected independently, and the encryption efficiency is improved.
2) The aim of encrypting the image content can be achieved by encrypting and transmitting the prior information (the code stream length of which is about one tenth of the code stream length of the compression characteristic) for guiding the entropy coding and decoding, and the length of the plaintext to be encrypted is reduced while the safety is ensured, so that the memory required by storing the key is reduced, and the encryption efficiency is improved.
3) A hierarchical encryption scheme is designed for machine intelligent analysis tasks and human vision, and under the application scene of compression coding driven by the machine intelligent analysis tasks, the machine intelligent analysis tasks can be realized while privacy data desensitization is realized, and the data security is ensured.
4) Different encryption levels are set for the sensitive attribute area and the rest areas of a specific sensitive object, so that part of important attribute information can be flexibly protected, and meanwhile, the safety of an encryption scheme is improved;
another embodiment of the present invention further provides a hierarchical encryption system for image compression encoding, which mainly includes:
an encoder for extracting compression characteristics of an input image;
the semantic division unit is used for carrying out semantic division on the compression characteristics based on the semantic information to obtain object compression characteristics corresponding to each object;
the entropy prior encoder is used for extracting prior information for guiding the entropy prior decoder to decode by utilizing the compression characteristics of each object;
the quantization and structural coding unit is used for respectively performing quantization and structural coding on the object compression characteristics and the corresponding prior information to obtain corresponding structural code streams;
the encryption unit is used for setting any one or more levels of encryption according to the set encryption requirements: a first level of encryption, encrypting decoder parameters; second-stage encryption, namely scrambling elements of prior information or object compression characteristics; and the third-level encryption is carried out aiming at the structured code stream of the prior information.
The system further comprises: a decoding device, comprising: an entropy prior decoder and decoder; and after receiving the structured code stream subjected to the three-level encryption, the decoding equipment performs corresponding decoding operation according to a decryption authorization level locally possessed.
The system part set corresponds to the framework shown in fig. 1, and the semantic division unit and the encryption unit are not directly shown.
Another embodiment of the present invention further provides a processing apparatus, as shown in fig. 3, which mainly includes: one or more processors; a memory for storing one or more programs; wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods provided by the foregoing embodiments.
Further, the processing device further comprises at least one input device and at least one output device; in the processing device, a processor, a memory, an input device and an output device are connected through a bus.
In the embodiment of the present invention, the specific types of the memory, the input device, and the output device are not limited; for example:
the input device can be a touch screen, an image acquisition device, a physical button or a mouse and the like;
the output device may be a display terminal;
the Memory may be a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as a disk Memory.
Another embodiment of the present invention further provides a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method provided by the foregoing embodiment.
The readable storage medium in the embodiment of the present invention may be provided in the foregoing processing device as a computer readable storage medium, for example, as a memory in the processing device. The readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.