Low-power-consumption image encryption method, device and equipment

By using layer segmentation and stream cipher encryption, only a portion of the layers are encrypted. Combined with the current key stream generated by the key stream generator, this solves the problems of slow speed, high energy consumption, and low security of existing encryption technologies, achieving low-power and high-efficiency encryption.

CN119299582APending Publication Date: 2025-01-10GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411503475.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing encryption technologies are slow, consume a lot of energy, and have low security, making them particularly difficult to meet the low power consumption requirements in outdoor camera surveillance.

Method used

By segmenting and extracting layers, the image is divided into multiple initial layers using color features. Only a portion of the layers are extracted for encryption, and a key stream generator is used to generate the current key stream for stream cipher encryption. The transmitted data packets are generated by combining the image ciphertext and non-target layers.

Benefits of technology

It achieves low-power encryption, improves encryption speed, enhances security and confidentiality, and meets the encryption requirements of low-power devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299582A_ABST
    Figure CN119299582A_ABST
Patent Text Reader

Abstract

The invention discloses a low-power-consumption image encryption method, device and equipment, and the method comprises the steps: carrying out the layer segmentation and extraction processing of a to-be-encrypted image according to color features, and obtaining target layer information which comprises a to-be-encrypted layer and a layer serial number; generating a current key stream through a key stream generator according to a preset empirical key, wherein the preset empirical key is determined based on the feature information of the last round of to-be-encrypted image; performing stream cipher encryption processing on the target layer information by using the current key stream to obtain an image ciphertext; and generating a transmission data packet in combination with the image ciphertext and the non-target layer. According to the invention, the technical problems of low speed, high energy consumption and low security of the existing encryption technology can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image encryption technology, and in particular to a low-power image encryption method, device and equipment. Background Art

[0002] Low-power encryption of transmitted image data is a technology that uses encryption algorithms to protect data security in an environment where device power consumption is limited. When performing camera monitoring outdoors, solar power is often used due to wiring difficulties, which requires the use of low-power encryption.

[0003] Symmetric encryption is a low-power encryption method compared to asymmetric encryption. Symmetric encryption and decryption speeds are relatively fast and suitable for processing large amounts of data. Asymmetric encryption involves complex mathematical calculations in the encryption and decryption process, so its encryption and decryption speeds are relatively slow and consume more resources. However, the security of traditional symmetric encryption is not high enough, so the actual application effect is poor. Summary of the invention

[0004] The present application provides a low-power image encryption method, device and equipment, which are used to solve the technical problems of existing encryption technology, such as slow speed, high energy consumption and low security.

[0005] In view of this, the first aspect of the present application provides a low-power image encryption method, comprising:

[0006] The image to be encrypted is subjected to layer segmentation and extraction processing according to color features to obtain target layer information, wherein the target layer information includes the layer to be encrypted and the layer sequence number;

[0007] Generate a current key stream by a key stream generator according to a preset experience key, wherein the preset experience key is determined based on feature information of the image to be encrypted in the previous round;

[0008] Using the current key stream to perform stream cipher encryption on the target layer information to obtain image ciphertext;

[0009] The image ciphertext and the non-target layer are combined to generate a transmission data packet.

[0010] Preferably, the step of performing layer segmentation and extraction processing on the image to be encrypted according to color features to obtain target layer information includes:

[0011] The image to be encrypted is segmented into layers according to the number of categories of color features to obtain multiple initial layer images;

[0012] A target layer image is extracted from the initial layer image based on the encryption level and the preset ratio, and target layer information is generated.

[0013] Preferably, the step of segmenting the image to be encrypted into layers according to the number of categories of color features to obtain a plurality of initial layer images further comprises:

[0014] Convert the color space of the initially captured RGB image to obtain an HSV image;

[0015] A Gaussian filter is used to perform noise reduction processing on the HSV image to obtain an image to be encrypted.

[0016] Preferably, the step of segmenting the image to be encrypted into layers according to the number of categories of color features to obtain a plurality of initial layer images further comprises:

[0017] Based on the preset color feature library, the HSV value of the image to be encrypted is compared and analyzed according to the HSV threshold in a pixel traversal manner to obtain the color feature corresponding to each pixel.

[0018] Preferably, the step of extracting the target layer image from the initial layer image based on the encryption level and the preset ratio and generating the target layer information further includes:

[0019] Determining an encryption level according to the photographing code of the image to be encrypted;

[0020] A level information library is constructed based on the encryption level, and the level information library includes the encryption level, the number of layers and the preset ratio.

[0021] A second aspect of the present application provides a low-power image encryption device, comprising:

[0022] A layer extraction unit, used for performing layer segmentation and extraction processing on the image to be encrypted according to color features to obtain target layer information, wherein the target layer information includes the layer to be encrypted and the layer sequence number;

[0023] A key generation unit, configured to generate a current key stream according to a preset experience key through a key stream generator, wherein the preset experience key is determined based on feature information of a previous round of an image to be encrypted;

[0024] An image encryption unit, used for performing stream cipher encryption processing on the target layer information using the current key stream to obtain an image ciphertext;

[0025] The data generation unit is used to generate a transmission data packet by combining the image ciphertext and the non-target layer.

[0026] Preferably, the layer extraction unit comprises:

[0027] A segmentation subunit is used to perform layer segmentation on the image to be encrypted according to the number of categories of color features to obtain multiple initial layer images;

[0028] The extraction subunit is used to extract the target layer image from the initial layer image based on the encryption level and the preset ratio, and generate the target layer information.

[0029] Preferably, it also includes an image preprocessing unit, which is specifically used for:

[0030] Convert the color space of the initially captured RGB image to obtain an HSV image;

[0031] A Gaussian filter is used to perform noise reduction processing on the HSV image to obtain an image to be encrypted.

[0032] Preferably, it also includes a level construction unit, which is specifically used to:

[0033] Determining an encryption level according to the photographing code of the image to be encrypted;

[0034] A level information library is constructed based on the encryption level, and the level information library includes the encryption level, the number of layers and the preset ratio.

[0035] A third aspect of the present application provides a low-power image encryption device, the device comprising a processor and a memory;

[0036] The memory is used to store program code and transmit the program code to the processor;

[0037] The processor is used to execute the low-power image encryption method described in the first aspect according to the instructions in the program code.

[0038] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0039] In the present application, a low-power image encryption method is provided, including: dividing and extracting the image to be encrypted into layers according to color features to obtain target layer information, the target layer information includes the layer to be encrypted and the layer sequence number; generating a current key stream by a key stream generator according to a preset empirical key, the preset empirical key is determined based on the feature information of the image to be encrypted in the previous round; using the current key stream to perform stream cipher encryption on the target layer information to obtain image ciphertext; combining the image ciphertext and the non-target layer to generate a transmission data packet.

[0040] The low-power image encryption method provided by the present application can reduce the resources consumed by encryption and improve the encryption speed by extracting only part of the layers through layer segmentation. In addition, the current key stream can be generated by using the preset experience key determined by the feature information of the image to be encrypted in the previous round, which can also ensure the randomness and unpredictability of the current key stream, and has higher security and stronger confidentiality. Moreover, the encryption speed of the stream cipher encryption operation is fast, and the whole process can achieve low-power encryption. Therefore, the present application can solve the technical problems of slow speed, high energy consumption and low security of the existing encryption technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a process flow of a low-power image encryption method provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of the structure of a low-power image encryption device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] For easier understanding, see Figure 1 , an embodiment of a low-power image encryption method provided by the present application includes:

[0045] Step 101: perform layer segmentation and extraction processing on the image to be encrypted according to color features to obtain target layer information, which includes the layer to be encrypted and the layer sequence number.

[0046] Furthermore, step 101 includes:

[0047] The image to be encrypted is segmented into layers according to the number of categories of color features to obtain multiple initial layer images;

[0048] The target layer image is extracted from the initial layer image based on the encryption level and the preset ratio, and the target layer information is generated.

[0049] Furthermore, the image to be encrypted is segmented into layers according to the number of categories of color features to obtain multiple initial layer images, which also includes:

[0050] Convert the color space of the initially captured RGB image to obtain an HSV image;

[0051] The Gaussian filter is used to perform noise reduction on the HSV image to obtain the image to be encrypted.

[0052] Furthermore, the image to be encrypted is segmented into layers according to the number of categories of color features to obtain multiple initial layer images, which also includes:

[0053] Based on the preset color feature library, the HSV value of the encrypted image is compared and analyzed according to the HSV threshold by pixel traversal to obtain the color feature corresponding to each pixel.

[0054] Further, based on the encryption level and the preset ratio, the target layer image is extracted from the initial layer image, and the target layer information is generated, which also includes:

[0055] Determine the encryption level according to the shooting code of the image to be encrypted;

[0056] A hierarchical information library is constructed based on the encryption level, and the hierarchical information library includes the encryption level, the number of layers and the preset ratio.

[0057] It should be noted that a camera can be used to capture multiple initial images in real time or non-real time. The initially acquired image is an RGB image, that is, an initially captured RGB image. Since the image can achieve more effective color recognition and segmentation in the HSV color space, the present embodiment can perform a color space conversion operation on the initial RGB image to obtain an HSV image. In order to ensure more accurate color segmentation and the reliability of subsequent image processing, the present embodiment can also use a filter to remove image noise. In addition to the Gaussian filter, other filters can be selected as needed. This is only an example and is not limited. After the initially captured RGB image is converted in color space and subjected to noise reduction processing, the image to be encrypted can be obtained.

[0058] Before performing layer segmentation on the image to be encrypted, the image encryption level needs to be determined first. Since each image to be encrypted will leave a shooting mark, i.e., a code, when it is shot, the encryption level of the image can be determined based on the shooting code. If the shooting codes of a large number of images are obtained to determine the image encryption level, a level information library can be constructed; in the level information library, the encryption level, number of layers, and configuration ratio of the current image are all one-to-one corresponding, which is convenient for query and use.

[0059] The layer segmentation of the image to be encrypted is achieved based on color features, and the color features are obtained by comparing and analyzing the HSV values ​​of the image to be encrypted based on the preset color feature library by traversing pixels according to the HSV threshold. Specifically, each pixel in the image to be encrypted is traversed, and the H value, S value, and V value of each pixel in the HSV color space are read; then, the HSV data threshold of each type of color feature, that is, the HSV threshold, is retrieved from the preset color feature library; then, the H value, S value, and V value of the image to be encrypted are compared and analyzed with the HSV threshold to determine the color features of each pixel. It can be understood that the preset color feature library is a pre-established database, which includes many categories of color features, and each type of color feature corresponds to an HSV data threshold.

[0060] Based on the color features corresponding to each pixel obtained, the image to be encrypted can be divided into several layers, denoted as N. Each layer has layer information and a sequential number; the layer serial number can indicate the sequential relationship of the numbers. The segmentation operation will obtain multiple N initial layer images, but this embodiment will only extract part of the layer images for encryption operation, so that the encryption speed is faster and consumes less resources. Specifically, based on the encryption level, a preset proportion of the target layer image is extracted from the initial layer image to obtain the target layer information, and the remaining layer image that has not been extracted is the non-target layer, which is used to generate the encrypted data. The preset proportion K can be set according to the actual situation and is not limited here; the target layer information includes the layer to be encrypted and the layer serial number corresponding to the layer.

[0061] It should be noted that the higher the encryption level, the larger the number of layers N, and the larger the preset ratio K of the extraction. In the process of layer segmentation and extraction, the color features of each pixel in the image to be encrypted will be automatically identified, and the number of color feature categories M will be determined; then N layer information will be established, and each pixel will be allocated according to the category of the color feature, so that all pixels are filled in the N layer information, and each layer information contains M categories of color features. In this way, each color in the image will be split into N layers, and the dispersion effect of the image to be encrypted will be better. Each layer cannot display valid information. Finally, N×K layer information is randomly extracted as the layer to be encrypted.

[0062] In addition, in the pixel allocation process, the pixels corresponding to the color features of each category must be determined in turn, and the determined pixels are divided into N parts according to the pixel position information, and no two pixels in each part are adjacent; then the N parts of pixels are filled into the N layer information until the N parts of pixels corresponding to each color feature are filled. The N parts are not absolute. If it is not possible to divide them completely, a relative division is also possible without affecting the effect; it only needs to be that the difference in the number of pixels in each part is not greater than 1; in addition, no two pixels in each part are adjacent, making the pixel allocation more dispersed.

[0063] Step 102: Generate a current key stream using a key stream generator according to a preset experience key, where the preset experience key is determined based on feature information of the image to be encrypted in the previous round.

[0064] It should be noted that the preset experience key is determined based on the feature information of the image to be encrypted that was transmitted last time. Therefore, if the image to be encrypted is a real-time changing image, the preset experience key is also a real-time changing key; in this way, the key has strong randomness and unpredictability, high security, and stronger confidentiality, which can ensure the reliability of encryption. The current key stream generated by the key stream generator is the key stream relative to the image to be encrypted processed at the current moment.

[0065] Specifically, the histogram of the last transmitted image to be encrypted is first determined, and the information statistics of the histogram are performed to determine the number of occurrences of each pixel value / grayscale level; then the number of occurrences of each pixel value is hashed based on the SHA-3 algorithm to generate a preset experience key of fixed length. In addition, when generating a key through a key stream generator, it is necessary to initialize the LFSR and use the key to set the initial state of the LFSR; in each clock cycle, the lowest bit of the LFSR is output as a bit of the key stream, and the LFSR is shifted to the left by one bit; at the same time, the new highest bit is calculated according to the current state of the LFSR and the feedback function, and added to the rightmost side of the LFSR; the steps in the LFSR processing unit are repeated continuously to generate continuous key stream bits and obtain the current key stream. This method combines the histogram characteristics and the security of the SHA-3 algorithm to ensure the reliability of key generation.

[0066] Step 103: Use the current key stream to perform stream cipher encryption on the target layer information to obtain image ciphertext.

[0067] The target layer information is encrypted by stream cipher, which has faster encryption speed, simpler implementation, and lower power consumption, and is very suitable for encrypted transmission of images. In addition, encrypting the target layer information means that not only the encrypted layer needs to be encrypted, but also the layer sequence number needs to be encrypted to obtain the image ciphertext.

[0068] It should be noted that after the target layer information is converted into binary information, the binary information is XORed with the current key stream bit by bit. For each bit in the binary information, the bit at the corresponding position in the current key stream is XORed. Then all bits in the binary information are XORed until the entire binary information is encrypted. Finally, all ciphertext bits that have undergone XOR operations are combined together to form the final encrypted ciphertext, i.e., the image ciphertext.

[0069] Step 104: Generate a transmission data packet by combining the image ciphertext and the non-target layer.

[0070] By combining the image ciphertext generated by the encrypted layer information with the non-target layer that has not been extracted, a transmission data packet can be generated, and then data can be transmitted based on the 5G network. It can be seen that the receiving end will get the transmission data packet, and then the receiving end needs to decrypt the image ciphertext in the transmission data packet. Before decryption, it is necessary to obtain the key based on the feature information of the image to be encrypted in the last transmission, generate the key stream based on the key and the key stream generator, and then decrypt to obtain the layer to be encrypted and the layer sequence information. Finally, the image can be restored based on the layer to be encrypted, the layer sequence information and the unencrypted layer.

[0071] The low-power image encryption method provided by the embodiment of the present application can reduce the resources consumed by encryption and improve the encryption speed by extracting only part of the layers through layer segmentation. In addition, the current key stream can be generated by using the preset experience key determined by the feature information of the image to be encrypted in the previous round, which can also ensure the randomness and unpredictability of the current key stream, and has higher security and stronger confidentiality. Moreover, the encryption speed of the stream cipher encryption operation is fast, and the whole process can achieve low-power encryption. Therefore, the embodiment of the present application can solve the technical problems of slow speed, high energy consumption and low security of the existing encryption technology.

[0072] For easier understanding, see Figure 2 The present application provides an embodiment of a low-power image encryption device, comprising:

[0073] The layer extraction unit 201 is used to perform layer segmentation and extraction processing on the image to be encrypted according to color features to obtain target layer information, where the target layer information includes the layer to be encrypted and the layer sequence number;

[0074] The key generation unit 202 is used to generate a current key stream according to a preset experience key through a key stream generator, where the preset experience key is determined based on feature information of the image to be encrypted in the previous round;

[0075] The image encryption unit 203 is used to perform stream cipher encryption processing on the target layer information using the current key stream to obtain the image ciphertext;

[0076] The data generating unit 204 is used to generate a transmission data packet by combining the image ciphertext and the non-target layer.

[0077] Furthermore, the layer extraction unit 201 includes:

[0078] The segmentation subunit 2011 is used to perform layer segmentation on the image to be encrypted according to the number of categories of color features to obtain multiple initial layer images;

[0079] The extraction subunit 2012 is used to extract the target layer image from the initial layer image based on the encryption level and the preset ratio, and generate the target layer information.

[0080] Furthermore, it also includes an image preprocessing unit 205, which is specifically used for:

[0081] Convert the color space of the initially captured RGB image to obtain an HSV image;

[0082] The Gaussian filter is used to perform noise reduction on the HSV image to obtain the image to be encrypted.

[0083] Furthermore, it also includes a level construction unit 206, which is specifically used to:

[0084] Determine the encryption level according to the shooting code of the image to be encrypted;

[0085] A hierarchical information library is constructed based on the encryption level, and the hierarchical information library includes the encryption level, the number of layers and the preset ratio.

[0086] The present application also provides a low-power image encryption device, the device comprising a processor and a memory;

[0087] The memory is used to store the program code and transmit the program code to the processor;

[0088] The processor is used to execute the low-power image encryption method in the above method embodiment according to the instructions in the program code.

[0089] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.

[0093] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A low-power image encryption method, characterized in that: include: The image to be encrypted is subjected to layer segmentation and extraction processing according to color features to obtain target layer information, wherein the target layer information includes the layer to be encrypted and the layer sequence number; Generate a current key stream by a key stream generator according to a preset experience key, wherein the preset experience key is determined based on feature information of the image to be encrypted in the previous round; Using the current key stream to perform stream cipher encryption on the target layer information to obtain image ciphertext; The image ciphertext and the non-target layer are combined to generate a transmission data packet.

2. The low-power image encryption method according to claim 1, characterized in that: The image to be encrypted is segmented and extracted according to the color features to obtain target layer information, including: The image to be encrypted is segmented into layers according to the number of categories of color features to obtain multiple initial layer images; A target layer image is extracted from the initial layer image based on the encryption level and the preset ratio, and target layer information is generated.

3. The low-power image encryption method according to claim 2, characterized in that: The method further includes: performing layer segmentation on the image to be encrypted according to the number of categories of color features to obtain a plurality of initial layer images; Convert the color space of the initially captured RGB image to obtain an HSV image; A Gaussian filter is used to perform noise reduction processing on the HSV image to obtain an image to be encrypted.

4. The low-power image encryption method according to claim 3, characterized in that: The method further includes: performing layer segmentation on the image to be encrypted according to the number of categories of color features to obtain a plurality of initial layer images; Based on the preset color feature library, the HSV value of the image to be encrypted is compared and analyzed according to the HSV threshold in a pixel traversal manner to obtain the color feature corresponding to each pixel.

5. The low-power image encryption method according to claim 2, characterized in that: The step of extracting the target layer image from the initial layer image based on the encryption level and the preset ratio and generating the target layer information also includes: Determining an encryption level according to the photographing code of the image to be encrypted; A level information library is constructed based on the encryption level, and the level information library includes the encryption level, the number of layers and the preset ratio.

6. A low-power image encryption device, characterized in that: include: A layer extraction unit, used for performing layer segmentation and extraction processing on the image to be encrypted according to color features to obtain target layer information, wherein the target layer information includes the layer to be encrypted and the layer sequence number; A key generation unit, configured to generate a current key stream according to a preset experience key through a key stream generator, wherein the preset experience key is determined based on feature information of a previous round of an image to be encrypted; An image encryption unit, used for performing stream cipher encryption processing on the target layer information using the current key stream to obtain an image ciphertext; The data generation unit is used to generate a transmission data packet by combining the image ciphertext and the non-target layer.

7. The low-power image encryption device according to claim 6, characterized in that: The layer extraction unit comprises: A segmentation subunit is used to perform layer segmentation on the image to be encrypted according to the number of categories of color features to obtain multiple initial layer images; The extraction subunit is used to extract the target layer image from the initial layer image based on the encryption level and the preset ratio, and generate the target layer information.

8. The low-power image encryption device according to claim 7, characterized in that: It also includes an image preprocessing unit, which is specifically used for: Convert the color space of the initially captured RGB image to obtain an HSV image; A Gaussian filter is used to perform noise reduction processing on the HSV image to obtain an image to be encrypted.

9. The low-power image encryption device according to claim 7, characterized in that: Also included are hierarchical building blocks, specifically for: Determining an encryption level according to the photographing code of the image to be encrypted; A level information library is constructed based on the encryption level, and the level information library includes the encryption level, the number of layers and the preset ratio.

10. A low-power image encryption device, characterized in that: The device comprises a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the low-power image encryption method according to any one of claims 1-5 according to the instructions in the program code.