Port inspection image encryption method and system based on bit image layering, terminal and medium

Through the grayscale conversion of images, bit image layering and chaotic system key generation, the drone patrol images are encrypted, solving the problems of low efficiency and weak attack resistance of traditional encryption methods, and achieving more efficient and secure image data transmission.

CN119815045APending Publication Date: 2025-04-11QINGDAO PORT INT CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411753998.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

While improving the security of image data, traditional image encryption methods have problems such as low encryption efficiency and weak attack resistance. Especially during the image transmission process of drone patrols, image data is easily illegally acquired or tampered with.

Method used

Using the encryption method based on bit image layering, the image is divided into multiple layers by performing grayscale conversion and binary transformation of the image, the image is split into multiple layers by using bit image layering, the key sequence is generated using a chaotic system, and the bit value permutation is encrypted on each layer of images, and finally the encrypted image is recompressed into one layer.

Benefits of technology

It improves encryption complexity, reduces the correlation between adjacent pixels, significantly improves encryption efficiency and attack resistance, and makes image data more secure during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815045A_ABST
    Figure CN119815045A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of image encryption, and particularly relates to a port inspection image encryption method and system based on bit image layering, a terminal and a medium, and the method comprises the steps: carrying out the gray conversion of a port inspection image, and converting an image gray value into a binary number; converting the image which is converted into the binary number into a # imgabs0 # layer image by using a bit image layering method; generating a key sequence by using a chaotic system; performing bit value permutation encryption on each layer of image in the # imgabs 1 # layer image by using the generated key; and re-compressing each layer of encrypted image into one layer to realize encryption of the port inspection image. According to the method, bit image layering is firstly carried out, then bit value replacement encryption is carried out, the encryption complexity is improved, the correlation between adjacent pixels is reduced, and then the encryption efficiency and the anti-attack capability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image encryption, and in particular relates to a port inspection image encryption method, system, terminal and medium based on bit image layering. Background Art

[0002] Port safety management is an important part of ensuring the smooth operation of port operations, and port inspection is an important means of port safety management. The traditional port inspection method is manual regular inspection, which is inefficient and leaves hidden dangers for port safety management. With the development of technology, in order to improve inspection efficiency and ensure the effectiveness of port safety management, drone inspection has become an important method of port inspection. Drones take images of ports and transmit them to the background, which analyzes the images to find safety hazards. This process involves the transmission of images to the background via the network. In order to prevent the image data from being illegally obtained or tampered with, the port inspection images need to be encrypted before transmission.

[0003] Although traditional image encryption methods can protect the security of image data to a certain extent, they use simple pixel value replacement strategies or simple XOR operations, which results in the correlation between adjacent pixels of the encrypted image not being weak enough, which in turn leads to low encryption efficiency and weak anti-attack capabilities. Summary of the invention

[0004] To solve the above problems, the present invention provides a port inspection image encryption method, system, terminal and medium based on bit image layering, which first performs bit image layering and then performs bit value replacement encryption to increase encryption complexity and reduce the correlation between adjacent pixels, thereby improving encryption efficiency and anti-attack capability.

[0005] In a first aspect, the technical solution of the present invention provides a port inspection image encryption method based on bit image layering, comprising the following steps: The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number; The image converted into binary number is converted into Layer image; Generate key sequences using chaotic systems; Use the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The encrypted layers of images are recompressed into one layer to realize the encryption of port inspection images.

[0006] In an optional implementation, a Logistic map chaotic system is used to generate a key sequence.

[0007] In an optional implementation, a Logistic map chaotic system is used to generate a key sequence, specifically including: Step 1: Configure system parameters ; Step 2: Configure the initial value of the key ; Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ;

[0008] In the formula, , , is the key sequence length.

[0009] In an optional embodiment, the generated key pair is used Each layer image in the layer image is encrypted by bit value replacement, specifically including: make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

[0010] In a second aspect, the technical solution of the present invention provides a port inspection image encryption system based on bit image layering, comprising: The binary conversion module is used to convert the port inspection image into grayscale and transform the image grayscale value into a binary number; The image layering module is used to convert the image after being transformed into a binary number into Layer image; A key sequence generation module, used for generating a key sequence using a chaotic system; Image encryption module for using the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The image recompression module is used to recompress the encrypted layers of images into one layer to achieve encryption of port inspection images.

[0011] In an optional implementation, the key sequence generation module generates the key sequence using a Logistic mapping chaotic system.

[0012] In an optional implementation, a Logistic map chaotic system is used to generate a key sequence, specifically including: Step 1: Configure system parameters ; Step 2: Configure the initial value of the key ; Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ;

[0013] In the formula, , , is the key sequence length.

[0014] In an optional embodiment, the image encryption module uses the generated key pair Each layer image in the layer image is encrypted, including: make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

[0015] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory, used for storing a port inspection image encryption program based on bit image layering; A processor is used to implement the steps of the port inspection image encryption method based on bit image layering as described in any one of the above items when executing the port inspection image encryption program based on bit image layering.

[0016] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which is stored a port inspection image encryption program based on bit image layering, and when the port inspection image encryption program based on bit image layering is executed by a processor, the steps of the port inspection image encryption method based on bit image layering as described in any one of the above items are implemented.

[0017] The invention provides a port inspection image encryption method, system, terminal and medium based on bit image layering, which has the following beneficial effects compared with the prior art: grayscale processing is performed on the image, and the grayscale value is converted into a binary number, thereby realizing bit image layering, and a key sequence is generated by a chaotic system, and the key sequence is used to permutate and encrypt the bit values ​​of each layer. The invention first performs bit image layering, and then performs bit value permutation encryption, thereby increasing the encryption complexity, reducing the correlation between adjacent pixels, and thereby improving the encryption efficiency and anti-attack capability. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of a port inspection image encryption method based on bit image layering provided by an embodiment of the present invention.

[0019] Figure 2 It is the data of the correlation coefficient of plain text adjacent pixels based on the method of this embodiment.

[0020] Figure 3 The present invention provides a schematic block diagram of a port inspection image encryption system based on bit image layering.

[0021] Figure 4 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0024] Figure 1 The following is a flow chart of a method for encrypting port inspection images based on bit image layering provided by an embodiment of the present invention. Figure 1 The execution subject may be a port inspection image encryption system based on bit image layering. The port inspection image encryption method based on bit image layering provided in the embodiment of the present invention is executed by a computer device, and accordingly, the port inspection image encryption system based on bit image layering runs in the computer device. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0025] like Figure 1 As shown, the method includes the following steps.

[0026] S1, convert the port inspection image into grayscale and transform the image grayscale value into a binary number.

[0027] This step converts the port inspection image into grayscale and transforms the image grayscale value into a binary number to achieve the bit value conversion of the image data, providing a basis for subsequent bit image layering processing.

[0028] S2, using the bit image layering method to convert the image after being transformed into a binary number Layer image.

[0029] First of all, the pictures are composed of images, and the image values ​​are composed of bits. For the usual 256*256 grayscale picture, each grayscale value is composed of eight bits. The bit image layering method splits the read image into eight-bit images. Each bit picture is composed of 8 1-bit planes.

[0030] Bit image layering is a method to convert grayscale images into bit plane images. In the bit image layering theory, the pixel value of each pixel is divided into 8 bits, and each bit corresponds to a layer of bit plane image. A bit plane image is a black and white image, in which each pixel has only two colors, black and white, indicating that the value of the pixel at that bit is 0 or 1.

[0031] S3, Generate key sequence using chaotic system.

[0032] This embodiment uses a Logistic mapping chaotic system to generate a key sequence. Logistic mapping is used to illustrate how a simple nonlinear dynamics equation generates a complex chaotic phenomenon. The generation of a chaotic sequence is generally generated by iterating the Logistic equation. Specifically, the following steps are included.

[0033] Step 1: Configure system parameters .

[0034] Step 2: Configure the initial value of the key .

[0035] Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ;

[0036] In the formula, , , is the key sequence length.

[0037] In general, the Lyapunov exponent of a one-dimensional Logistic chaotic map is After 3.57, it enters a chaotic state.

[0038] S4, use the generated key pair Each layer image in the layer image is encrypted by bit value replacement.

[0039] make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

[0040] For example, When , the value of the current pixel in each layer is changed to 0. , change the current pixel value of 0 in each layer to 1.

[0041] This embodiment introduces conditional judgment and key cycle on the basis of bit layering, so that the encryption process is no longer a simple bit flip or permutation, which increases the difficulty of cracking. At the same time, different keys will lead to completely different encryption results, and due to the introduction of conditions, even if the key has only a slight change, the encrypted image will be significantly different. Since the encryption process only involves the permutation of bit values ​​(i.e., 0 becomes 1, 1 becomes 0), the number and position of pixels are not changed, so the original image can be completely restored after decryption to ensure the integrity of the data. Since the encrypted image is random in pixel values, it is difficult to analyze the characteristics of the original image through statistical methods.

[0042] S5, re-compressing the encrypted layers of images into one layer to achieve encryption of the port inspection image.

[0043] Since there is a high correlation between two adjacent pixels in an image, any pixel can easily expose the relevant information of the adjacent pixels through its own characteristics. Adjacent pixel correlation analysis is used to measure the degree of correlation between pixels. This embodiment uses 4 pictures as experimental targets for verification. Figure 2 The data of the correlation coefficient of plaintext adjacent pixels based on the method of this embodiment represent the horizontal direction, vertical direction and diagonal direction from left to right. It can be seen from the data table that the correlation of adjacent pixels of the image before and after encryption is reduced from close to 1 to close to 0, and the correlation between adjacent pixels of the encrypted image is very weak.

[0044] An embodiment of a port inspection image encryption method based on bit image layering is described in detail above. Based on the port inspection image encryption method based on bit image layering described in the above embodiment, an embodiment of the present invention also provides a port inspection image encryption system based on bit image layering corresponding to the method.

[0045] Figure 3 It is a schematic block diagram of the structure of a port inspection image encryption system based on bit image layering provided by an embodiment of the present invention. In this embodiment, the port inspection image encryption system based on bit image layering 300 can be divided into multiple functional modules according to the functions performed by them. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.

[0046] The binary conversion module 310 is used to perform grayscale conversion on the port inspection image and transform the image grayscale value into a binary number.

[0047] The image layering module 320 is used to convert the image after being converted into a binary number into Layer image.

[0048] The key sequence generation module 330 is used to generate a key sequence using a chaotic system.

[0049] The image encryption module 340 is used to use the generated key pair Each layer image in the layer image is encrypted by bit value replacement.

[0050] The image recompression module 350 is used to recompress the encrypted layers of images into one layer to achieve encryption of the port inspection image.

[0051] In an optional implementation, the key sequence generation module 330 generates the key sequence using a Logistic mapping chaotic system.

[0052] In an optional implementation, a Logistic map chaotic system is used to generate a key sequence, specifically including: Step 1: Configure system parameters ; Step 2: Configure the initial value of the key ; Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ;

[0053] In the formula, , , is the key sequence length.

[0054] In an optional embodiment, the image encryption module 340 uses the generated key pair Each layer image in the layer image is encrypted, including: make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

[0055] The port inspection image encryption system based on bit image layering of the present embodiment is used to implement the aforementioned port inspection image encryption method based on bit image layering. Therefore, the specific implementation method of the system can be seen in the embodiment part of the port inspection image encryption method based on bit image layering in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be elaborated here.

[0056] In addition, since the port inspection image encryption system based on bit image layering of this embodiment is used to implement the aforementioned port inspection image encryption method based on bit image layering, its function corresponds to that of the above method and will not be repeated here.

[0057] Figure 4 A schematic diagram of the structure of a terminal 400 provided in an embodiment of the present invention includes: a processor 410, a memory 420 and a communication unit 430. The processor 410 is used to implement the following steps when implementing the port inspection image encryption program based on bit image layering stored in the memory 420: The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number; The image converted into binary number is converted into Layer image; Generate key sequences using chaotic systems; Use the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The encrypted layers of images are recompressed into one layer to realize the encryption of port inspection images.

[0058] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0059] The computer storage medium stores a port inspection image encryption program based on bit image layering, and the port inspection image encryption program based on bit image layering implements the following steps when executed by a processor: The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number; The image converted into binary number is converted into Layer image; Generate key sequences using chaotic systems; Use the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The encrypted layers of images are recompressed into one layer to realize the encryption of port inspection images.

[0060] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A port inspection image encryption method based on bit image layering, characterized in that: The following steps are involved: The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number; The image converted into binary number is converted into Layer image; Generate key sequences using chaotic systems; Use the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The encrypted layers of images are recompressed into one layer to realize the encryption of port inspection images.

2. The port inspection image encryption method based on bit image layering according to claim 1 is characterized in that: The key sequence is generated using the Logistic map chaotic system.

3. The port inspection image encryption method based on bit image layering according to claim 2 is characterized in that: The key sequence is generated using the Logistic mapping chaotic system, including: Step 1: Configure system parameters ; Step 2: Configure the initial value of the key ; Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ; In the formula, , , is the key sequence length.

4. The port inspection image encryption method based on bit image layering according to claim 3 is characterized in that: Use the generated key pair Each layer image in the layer image is encrypted by bit value replacement, specifically including: make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

5. A port inspection image encryption system based on bit image layering, characterized in that: include: The binary conversion module is used to convert the port inspection image into grayscale and transform the image grayscale value into a binary number; The image layering module is used to convert the image after being transformed into a binary number into Layer image; A key sequence generation module, used for generating a key sequence using a chaotic system; Image encryption module for using the generated key pair Each layer image in the layer image is encrypted by bit value replacement; The image recompression module is used to recompress the encrypted layers of images into one layer to achieve encryption of port inspection images.

6. The port inspection image encryption system based on bit image layering according to claim 5 is characterized in that: The key sequence generation module uses the Logistic map chaotic system to generate the key sequence.

7. The port inspection image encryption system based on bit image layering according to claim 6 is characterized in that: The key sequence is generated using the Logistic mapping chaotic system, including: Step 1: Configure system parameters ; Step 2: Configure the initial value of the key ; Step 3: Based on the initial value of the key, iterate through the following formula to obtain the key sequence ,in ; In the formula, , , is the key sequence length.

8. The port inspection image encryption system based on bit image layering according to claim 7 is characterized in that: The image encryption module uses the generated key pair Each layer image in the layer image is encrypted, including: make From 0 to Cycle, for each layer The pixels are encrypted separately, and each layer has pixels, a total of Second encryption, assuming that the key element used for the current encryption is ,like If the first condition is met, the value of the current pixel in each layer that is 1 is changed to 0. If the second condition is met, the value of the current pixel in each layer that is 0 is changed to 1.

9. A terminal, characterized in that: include: A memory, used for storing a port inspection image encryption program based on bit image layering; A processor is used to implement the steps of the port inspection image encryption method based on bit image layering as described in any one of claims 1 to 4 when executing the port inspection image encryption program based on bit image layering.

10. A computer-readable storage medium, characterized in that: The readable storage medium stores a port inspection image encryption program based on bit image layering, and when the port inspection image encryption program based on bit image layering is executed by a processor, the steps of the port inspection image encryption method based on bit image layering as described in any one of claims 1-4 are implemented.