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

By blocking the port inspection images and generating chaotic system keys, the problem of insufficient efficiency and security in port inspection images is solved, and efficient and secure image encryption effect is achieved.

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

Patent Information

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

AI Technical Summary

Technical Problem

Traditional image encryption methods are difficult to meet the efficient and secure encryption requirements when processing large and detailed port inspection images, especially in the problems of insufficient unified average change intensity and uneven encryption intensity.

Method used

Using an encryption method based on image chunking, through grayscale conversion, bit image layering, block processing and chaotic system key generation, bit operation encryption is performed block by block, and the encrypted image is recompressed.

Benefits of technology

The unified average change intensity of image encryption is improved, the security and efficiency of encryption are enhanced, and the impact of encryption operations on image quality is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854505A_ABST
    Figure CN119854505A_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 image partitioning, a terminal and a medium, and the method comprises the steps: carrying out the gray conversion of a port inspection image with the size of # imgabs0 #, and converting the gray value of the image into a binary number; converting the image converted into the binary number into a # imgabs 1 # layer image by using a bit image layering method; partitioning each layer of image, wherein the size of each block of image is # imgabs2; constructing a chaotic system and generating # imgabs3 keys; performing bit operation encryption on each block of image by using the generated # imgabs4 # keys; and re-compressing the encrypted image of each layer and each block into one layer to realize the encryption of the port inspection image. The unified average change intensity of image encryption is improved, the image encryption effect is further improved, and the encryption safety of port inspection images is guaranteed.
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 image segmentation. 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] In the current image processing technology, although there are some image encryption methods, such as the encryption method based on the Lorenz chaotic system, which uses the chaotic system to generate a key for pixel scrambling to achieve encryption, this encryption method is prone to insufficient encryption strength and low uniform average change intensity. Especially in the processing of port inspection images, due to the large amount of image data and rich details, traditional encryption methods are difficult to meet the needs of efficient and secure encryption. 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 image segmentation, which improves the uniform average change intensity of image encryption, thereby improving the image encryption effect and ensuring the encryption security of port inspection images.

[0005] In a first aspect, the technical solution of the present invention provides a port inspection image encryption method based on image segmentation, comprising the following steps: The size is The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image converted into binary number is converted into Layer image; The images of each layer are divided into blocks, and the size of each block is ; Build a chaotic system and generate keys; Use the generated A key is used to encrypt each image block by bit operation; The encrypted layers and blocks of the images are recompressed into one layer to achieve encryption of the port inspection image.

[0006] In an optional embodiment, a chaotic system is constructed and generated The keys include: Use random functions to generate random arrays and arrays , array and arrays The size of ; Construct a chaotic system with the following formula,

[0007]

[0008] in, ; Using a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

[0009] In an alternative embodiment, using the generated The key is used to perform bitwise encryption on each image block, including: Take the first image of each layer, The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; Take the second image of each layer image and The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; And so on, until all image blocks are encrypted.

[0010] In an alternative embodiment, and Can be Divisible.

[0011] In a second aspect, the technical solution of the present invention provides a port inspection image encryption system based on image segmentation, comprising: Binary conversion module, used to convert The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image layering module is used to convert the image after being transformed into a binary number into Layer image; The image segmentation module is used to segment each layer of images into blocks. The size of each block is ; Key generation module, used to build chaotic systems and generate keys; Image encryption module for using the generated A key is used to encrypt each image block by bit operation; The image recompression module is used to recompress the encrypted layers and blocks of the image into one layer to achieve encryption of the port inspection image.

[0012] In an optional embodiment, the key generation module constructs a chaotic system and generates The keys include: Use random functions to generate random arrays and arrays , array and arrays The size of ; Construct a chaotic system with the following formula,

[0013]

[0014] in, ; Using a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

[0015] In an optional embodiment, the image encryption module uses the generated The key is used to perform bitwise encryption on each image block, including: Take the first image of each layer, The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; Take the second image of each layer image and The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; And so on, until all image blocks are encrypted.

[0016] In an alternative embodiment, and Can be Divisible.

[0017] 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 image segmentation; A processor is used to implement the steps of the port inspection image encryption method based on image blocking as described in any one of the above items when executing the port inspection image encryption program based on image blocking.

[0018] 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 image segmentation, and when the port inspection image encryption program based on image segmentation is executed by a processor, the steps of the port inspection image encryption method based on image segmentation as described in any one of the above items are implemented.

[0019] The invention provides a port inspection image encryption method, system, terminal and medium based on image segmentation, which have the following beneficial effects compared with the prior art: firstly, the port inspection image is converted into binary numbers, and then layered and segmented to achieve fast and efficient encryption of image data, improve the uniform average change intensity of image encryption, and improve encryption efficiency. By constructing a chaotic system and generating multiple keys, and using these keys to encrypt each block of the image, the difficulty of cracking can be greatly increased and the security of encryption can be improved. At the same time, during the encryption process, the method can reduce the impact of the encryption operation on the overall image quality by segmenting the image, and ensure that the quality of the encrypted image can still meet the needs of port inspection. 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.

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

[0021] Figure 2 It is a schematic diagram of image segmentation.

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

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

[0024] 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.

[0025] 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.

[0026] Figure 1 The figure is a flow chart of a port inspection image encryption method based on image segmentation provided by an embodiment of the present invention. Figure 1 The execution subject may be a port inspection image encryption system based on image segmentation. The port inspection image encryption method based on image segmentation provided in the embodiment of the present invention is executed by a computer device, and accordingly, the port inspection image encryption system based on image segmentation 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.

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

[0028] S1, the size is The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number.

[0029] This embodiment first converts the pixel grayscale values ​​of the image into binary numbers for subsequent bit image layering.

[0030] S2, using the bit image layering method to convert the image converted into binary numbers Layer image.

[0031] The grayscale value (or color value, in color images) of each pixel is converted into binary form. Since binary numbers only contain two states, 0 and 1, each level of the image, if only considering a specific bit (such as the least significant bit LSB), can be regarded as a two-dimensional matrix, in which each element of the matrix is ​​0 or 1.

[0032] S3, divide each layer of image into blocks, the size of each block is .

[0033] It should be noted that and Can be Divide the image into piece, .

[0034] Taking a 256*256 image as an example, first create a 16*16 cell array. Each cell array contains a 16*16 array. Use the following formula to divide the image into blocks:

[0035] at this time , the image segmentation effect is as follows Figure 2 shown.

[0036] S4, build a chaotic system and generate A key.

[0037] Step 1: Use random functions to randomly generate arrays and arrays , array and arrays The size of .

[0038] First, use the rand function to randomly generate arrays and , whose sizes are , together with the iteration initial value, is used as the key for the first encryption and saved as text.

[0039] Step 2, construct a chaotic system with the following formula,

[0040]

[0041] in, .

[0042] Step 3: Use a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

[0043] The chaotic system of step 2 of this embodiment is constructed. The two arrays generated by the random function ensure that the initial conditions of each encryption process are unpredictable, thereby increasing the security of encryption. At the same time, the chaotic system has the characteristic of being extremely sensitive to the initial conditions. Even if the initial conditions have slight changes, the iteration results will diverge rapidly. This characteristic makes it difficult for an attacker to predict or crack the key through reverse engineering even if he knows the formula of the chaotic system. Through the cyclic iteration of the chaotic system, a large number of keys can be generated, providing abundant key resources for the encryption process, increasing the difficulty of the attacker to crack the key. In addition, different keys can be used for each encryption, which further improves the security of the encryption system, because the attacker needs to crack each key to decrypt the data.

[0044] S5, using the generated A key is used to encrypt each image block by bit operation.

[0045] This embodiment loops iterates Sub-chaotic system, we get indivual , expand it by multiples and take the remainder and round it up, then XOR it with the encrypted image after it is divided into blocks. This continues, encrypting all blocks of the image, The specific steps include: taking the first block of each layer image, The key expansion multiples are taken modulo and integer, and then each pixel of the image is bitwise XORed; the second block of each layer image is taken, and The key is expanded by multiples, the modulus is rounded, and then bitwise XORed with each pixel of the image; and so on, until all image blocks are encrypted.

[0046] This embodiment uses key expansion multiples and modulo rounding operations to generate different key sequences for each image block even if the number of original keys is limited, thereby increasing the diversity of keys, making the encryption of each image block unique, and improving the security of encryption.

[0047] Bitwise XOR is a simple but effective encryption method that can closely combine the original image data with the key to produce an encrypted image that is difficult to predict and restore. In this embodiment, since each pixel is XORed, even if part of the image data is leaked, it is difficult for an attacker to recover the original image from it. Bitwise XOR operation is a reversible encryption method that does not change the amount or format of the image data. Therefore, during the decryption process, the original image data can be completely restored without causing any data loss.

[0048] This embodiment divides the image into blocks for processing, which not only facilitates encryption of image data block by block, but also maintains the integrity of the image. Each image block can still maintain its original structure and characteristics after encryption, which is convenient for subsequent decryption and image reconstruction.

[0049] At the same time, since the image is divided into multiple blocks for processing, the multi-core processing power of modern computers can be fully utilized to achieve parallel encryption, which can improve the efficiency of encryption and make the encryption process faster and more efficient.

[0050] S6, compressing the encrypted layers and blocks of the image into one layer again, thus realizing encryption of the port inspection image.

[0051] Finally, the blocks of images in each layer are combined and the layers are recompressed into one layer to realize the encryption of port inspection images.

[0052] The uniform average variation intensity (UACI) is used to verify the key sensitivity of the chaotic system. After many experiments, this embodiment performs block operation based on the multi-dimensional chaotic system image encryption, so that the uniform average variation intensity reaches an average value of 33.4.

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

[0054] Figure 3 is a schematic block diagram of the structure of a port inspection image encryption system based on image segmentation provided by an embodiment of the present invention. In this embodiment, the port inspection image encryption system based on image segmentation 300 can be divided into multiple functional modules according to the functions performed by it, such as Figure 3 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, and is stored in a memory.

[0055] The binary conversion module 310 is used to convert the size The port inspection image is converted into grayscale and the image grayscale value is transformed into a binary number.

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

[0057] The image segmentation module 330 is used to segment each layer of the image into blocks, and the size of each block of the image is .

[0058] Key generation module 340, used to build a chaotic system and generate A key.

[0059] The image encryption module 350 is used to use the generated A key is used to encrypt each image block by bit operation.

[0060] The image recompression module 360 ​​is used to recompress the encrypted layers and blocks of the image into one layer to achieve encryption of the port inspection image.

[0061] In an optional embodiment, the key generation module constructs a chaotic system and generates The keys include: Use random functions to generate random arrays and arrays , array and arrays The size of ; Construct a chaotic system with the following formula,

[0062]

[0063] in, ; Using a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

[0064] In an optional embodiment, the image encryption module uses the generated The key is used to perform bitwise encryption on each image block, including: Take the first image of each layer, The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; Take the second image of each layer image and The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; And so on, until all image blocks are encrypted.

[0065] In an alternative embodiment, and Can be Divisible.

[0066] The port inspection image encryption system based on image segmentation in this embodiment is used to implement the aforementioned port inspection image encryption method based on image segmentation. Therefore, the specific implementation method of this system can be seen in the embodiment part of the port inspection image encryption method based on image segmentation 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.

[0067] In addition, since the port inspection image encryption system based on image blocking of this embodiment is used to implement the aforementioned port inspection image encryption method based on image blocking, its function corresponds to that of the aforementioned method and will not be described in detail here.

[0068] 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 image segmentation stored in the memory 420: The size is The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image converted into binary number is converted into Layer image; The images of each layer are divided into blocks, and the size of each block is ; Build a chaotic system and generate keys; Use the generated A key is used to encrypt each image block by bit operation; The encrypted layers and blocks of the images are recompressed into one layer to achieve encryption of the port inspection image.

[0069] 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).

[0070] The computer storage medium stores a port inspection image encryption program based on image segmentation, and the port inspection image encryption program based on image segmentation implements the following steps when executed by a processor: The size is The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image converted into binary number is converted into Layer image; The images of each layer are divided into blocks, and the size of each block is ; Build a chaotic system and generate keys; Use the generated A key is used to encrypt each image block by bit operation; The encrypted layers and blocks of the images are recompressed into one layer to achieve encryption of the port inspection image.

[0071] 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 image segmentation, characterized in that: The following steps are involved: The size is The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image converted into binary number is converted into Layer image; The images of each layer are divided into blocks, and the size of each block is ; Build a chaotic system and generate keys; Use the generated A key is used to encrypt each image block by bit operation; The encrypted layers and blocks of the images are recompressed into one layer to achieve encryption of the port inspection image.

2. The port inspection image encryption method based on image segmentation according to claim 1 is characterized in that: Build a chaotic system and generate The keys include: Use random functions to generate random arrays and arrays , array and arrays The size of ; Construct a chaotic system with the following formula, in, ; Using a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

3. The port inspection image encryption method based on image segmentation according to claim 2 is characterized in that: Use the generated The key is used to perform bitwise encryption on each image block, including: Take the first image of each layer, The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; Take the second image of each layer image and The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; And so on, until all image blocks are encrypted.

4. The port inspection image encryption method based on image segmentation according to any one of claims 1 to 3, characterized in that: and Can be Divisible.

5. A port inspection image encryption system based on image segmentation, characterized in that: include: Binary conversion module, used to convert The port inspection image is converted into grayscale and the image grayscale value is converted into a binary number; The image layering module is used to convert the image after being transformed into a binary number into Layer image; The image segmentation module is used to segment each layer of images into blocks. The size of each block is ; Key generation module, used to build chaotic systems and generate keys; Image encryption module for using the generated A key is used to encrypt each image block by bit operation; The image recompression module is used to recompress the encrypted layers and blocks of the image into one layer to achieve encryption of the port inspection image.

6. The port inspection image encryption system based on image segmentation according to claim 5 is characterized in that: The key generation module builds a chaotic system and generates The keys include: Use random functions to generate random arrays and arrays , array and arrays The size of ; Construct a chaotic system with the following formula, in, ; Using a randomly generated array and arrays , using the chaotic system formula to iterate ,generate Keys .

7. The port inspection image encryption system based on image segmentation according to claim 6 is characterized in that: The image encryption module uses the generated The key is used to perform bitwise encryption on each image block, including: Take the first image of each layer, The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; Take the second image of each layer image and The key expansion multiple is modulo and rounded up and then bitwise XORed with each pixel of the image; And so on, until all image blocks are encrypted.

8. The port inspection image encryption system based on image segmentation according to any one of claims 5 to 7, characterized in that: and Can be Divisible.

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

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