A data security storage method for an artificial intelligence data platform
By performing bit plane decomposition and chaotic sequence processing on the image, uniform ciphertext images are generated, which solves the problem that image encryption in the prior art cannot resist statistical analysis attacks, and effectively protects the image data of the artificial intelligence data platform.
Patent Information
- Application Number
- CN202411337832.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing image encryption method based on chaotic mapping cannot effectively resist the attacker's statistical analysis attacks, because the gray-scale histogram of the encrypted image is similar to the histogram of the plaintext image and does not have uniformity.
By performing bit plane decomposition of plaintext images, a ciphertext collection sequence is generated using two-dimensional chaotic sequences and statistical feature sequences, and encryption is performed through random sampling without retrieval, ensuring that the grayscale histogram of the ciphertext image is uniform and different from the plaintext image. .
It realizes efficient encryption of image data, ensures that the grayscale histogram of ciphertext images is uniform and chaotic, can resist the attacks of attackers to the greatest extent, and protect the image data security of the artificial intelligence data platform.
Smart Images

Figure CN118862175B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security storage, and in particular to a data security storage method for an artificial intelligence data platform. Background Art
[0002] The artificial intelligence data platform of the present invention provides users with a one-stop data service for data storage, processing, and use. Since user data contains user product information, business data, research results, etc., some of which involve commercial confidential data, user data needs to be stored securely.
[0003] In order to ensure the security of the data security storage method, the data needs to be encrypted and stored. For text data, the conventional RSA encryption algorithm can be used; for image data, the conventional image encryption method based on chaotic mapping has a large key space, but does not change the statistical characteristics of the image. The attacker can decipher the password by analyzing the statistical laws of the ciphertext and plaintext, that is, the conventional image encryption method based on chaotic mapping cannot resist the attacker's statistical analysis attack. In order to ensure that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, the grayscale histogram of the encrypted image needs to be completely different from the histogram of the plaintext image and is uniform. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a data security storage method for an artificial intelligence data platform, the method comprising:
[0005] Obtain a plaintext image in the user data, and perform bit plane decomposition on the plaintext image to obtain four plaintext plane images of the plaintext image;
[0006] A first chaotic sequence and a second chaotic sequence are obtained according to a security key and a two-dimensional chaotic mapping model; a starting position of each plaintext plane image is obtained according to the first chaotic sequence, and a bit value pair sequence of each plaintext plane image is obtained according to the second chaotic sequence; a statistical feature sequence of each plaintext plane image is obtained according to the bit value pair sequence of each plaintext plane image, and a quantized value sequence of each plaintext plane image is obtained according to the starting position and statistical feature sequence of each plaintext plane image;
[0007] Obtain a ciphertext set sequence of each plaintext plane image according to the bit value pair sequence and the quantization value sequence of each plaintext plane image; obtain the ciphertext of each plaintext pixel of each plaintext plane image by performing random sampling without replacement on the ciphertext set in the ciphertext set sequence of each plaintext plane image, set the grayscale value of each plaintext pixel of each plaintext plane image to the ciphertext, and record the plaintext pixel after the grayscale value is reset as the ciphertext pixel of the plaintext pixel;
[0008] The image composed of the ciphertext pixels of all plaintext pixels of each plaintext plane image is recorded as the ciphertext plane image of the plaintext plane image, and the image composed of the ciphertext plane images of four plaintext plane images of the plaintext image is recorded as the ciphertext image of the plaintext image.
[0009] Furthermore, the step of performing bit plane decomposition on the plaintext image to obtain four plaintext plane images of the plaintext image includes:
[0010] The grayscale value of each plaintext pixel of the plaintext image is converted into an 8-bit binary number, and two adjacent bits in the 8-bit binary number are combined into a bit value pair to obtain four groups of bit value pairs for each plaintext pixel; all plaintext pixels corresponding to the same group of bit value pairs are constructed into a plaintext plane image, each plaintext pixel in the plaintext plane image corresponds to a group of bit value pairs, and the bit value pairs are used as the pixel values of the plaintext pixel points of the plaintext plane image, and a total of four plaintext plane images of the plaintext image are obtained.
[0011] Furthermore, the step of obtaining the starting position of each plaintext plane image according to the first chaotic sequence includes:
[0012] According to the sequence number of the plaintext plane image Get the first chaotic sequence Values , the value As the starting position of the plaintext plane image, the sequence number of the plaintext plane image It means that the text plane image is the first Zhang Mingwen's image A plaintext plane image.
[0013] Furthermore, the step of obtaining a bit value pair sequence of each plaintext plane image according to the second chaotic sequence includes:
[0014] For any plaintext plane image, each bit value pair of plaintext pixels has four possible values, namely 00, 01, 10, and 11. The sequence obtained by arranging the four possible values is recorded as a bit value pair sequence. The set of all bit value pair sequences is recorded as a bit value pair sequence set, and all bit value pair sequences in the bit value pair sequence set are assigned serial numbers using integers, where different bit value pair sequences are assigned different serial numbers.
[0015] According to the sequence number of the plaintext plane image Get the first Values , in the bit value pair sequence set, the sequence number is The bit value pair sequence of is recorded as the bit value pair sequence of the plaintext plane image.
[0016] Furthermore, the step of obtaining a statistical feature sequence of each plaintext plane image according to the bit value pair sequence of each plaintext plane image comprises:
[0017] Obtaining a first statistical feature of the plaintext plane image according to a first bit value pair in a bit value pair sequence of the plaintext plane image, specifically: obtaining a first bit value pair in a bit value pair sequence of the plaintext plane image, counting the total number of plaintext pixel points whose pixel values are equal to the first bit value pair among all plaintext pixel points of the plaintext plane image, and recording a ratio of the total number to M×N as the first statistical feature of the plaintext plane image, wherein M×N is a size of the plaintext image;
[0018] Similarly, according to the second bit value pair, the third bit value pair, and the fourth bit value pair in the bit value pair sequence of the plaintext plane image, the second statistical feature, the third statistical feature, and the fourth statistical feature of the plaintext plane image are respectively obtained, and the sequence composed of the four statistical features of the plaintext plane image is recorded as the statistical feature sequence of the plaintext plane image.
[0019] Furthermore, the step of obtaining a quantization value sequence of each plaintext plane image according to a starting position and a statistical feature sequence of each plaintext plane image comprises:
[0020] Will The grayscale values between form a grayscale value ring sequence, and according to the starting position of the plaintext plane image, the grayscale value ring sequence is divided from the starting position and expanded into a grayscale value sequence, the first statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the starting position of the plaintext plane image is recorded as the first quantized value of the plaintext plane image; the second statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the first quantized value of the plaintext plane image is recorded as the second quantized value of the plaintext plane image; the third statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the second quantized value of the plaintext plane image is recorded as the third quantized value of the plaintext plane image; the sequence composed of the three quantized values is recorded as the quantized value sequence of the plaintext plane image.
[0021] Furthermore, the step of obtaining the ciphertext set sequence of each plaintext plane image according to the bit value pair sequence and the quantization value sequence of each plaintext plane image comprises:
[0022] According to the quantization value sequence of the plaintext plane image and the starting position and ending position of the plaintext plane image, four ranges are obtained, which are ,in, is the starting position of the plaintext plane image, is the end position of the plaintext plane image, are respectively a first quantization value, a second quantization value and a third quantization value in a quantization value sequence of a plaintext plane image;
[0023] According to the first range Get the first ciphertext set, specifically: set the first range Repeat to get all integers in The obtained set of all integers is recorded as the first ciphertext set, where Indicates rounding up; similarly, according to the second range , the second range The third range The second ciphertext set, the third ciphertext set, and the fourth ciphertext set are obtained respectively, and the sequence composed of the four ciphertext sets is recorded as the ciphertext set sequence of the plaintext plane image.
[0024] Furthermore, the step of obtaining the ciphertext of each plaintext pixel of each plaintext plane image by performing random sampling without replacement on the ciphertext set in the ciphertext set sequence of each plaintext plane image comprises:
[0025] For all plaintext pixel points in the plaintext plane image whose pixel values are equal to the first bit value pair in the bit value pair sequence, the ciphertext of each plaintext pixel point is obtained by performing random sampling without replacement on the first ciphertext set in the ciphertext set sequence of the plaintext plane image; similarly, the ciphertext of all plaintext pixel points whose pixel values are equal to the second bit value pair in the bit value pair sequence, all plaintext pixel points whose pixel values are equal to the third bit value pair in the bit value pair sequence, and all plaintext pixel points whose pixel values are equal to the fourth bit value pair in the bit value pair sequence are obtained respectively by performing random sampling without replacement on the second ciphertext set, the third ciphertext set, and the fourth ciphertext set in the ciphertext set sequence of the plaintext plane image.
[0026] The embodiments of the present invention have at least the following beneficial effects:
[0027] The present invention performs bit plane decomposition on a plaintext image to obtain four plaintext plane images of the plaintext image, obtains a quantization value sequence of the plaintext plane image according to a statistical feature sequence of the plaintext plane image, obtains a ciphertext set sequence of the plaintext plane image according to a bit value pair sequence and a quantization value sequence of the plaintext plane image, the number of each ciphertext in the ciphertext set sequence is the same, therefore, the ciphertext of the plaintext pixel points is obtained by performing random sampling without replacement on the ciphertext set, the plaintext pixel points after the grayscale value is reset are recorded as the ciphertext pixel points of the plaintext pixel points, the ciphertext image composed of all the ciphertext pixel points has a uniform grayscale histogram, and the random sampling without replacement can increase the degree of confusion of the ciphertext image, even if the same plaintext image is encrypted twice, the obtained ciphertext images are different. According to the encryption method of the present invention, any plaintext image is encrypted, and the grayscale histogram of the obtained ciphertext image is uniform, and the ciphertext image is sufficiently chaotic. Therefore, the image encryption method of the present invention changes the statistical characteristics of the ciphertext image, ensuring that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, so as to achieve the purpose of protecting the image data of the artificial intelligence data platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.
[0029] Figure 1 A flowchart of a method for securely storing data on an artificial intelligence data platform provided by one embodiment of the present invention;
[0030] Figure 2 A plaintext image provided by an embodiment of the present invention;
[0031] Figure 3 A grayscale histogram of a plaintext image provided by an embodiment of the present invention;
[0032] Figure 4 A ciphertext image provided by an embodiment of the present invention;
[0033] Figure 5 A grayscale histogram of a ciphertext image provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data security storage method of an artificial intelligence data platform proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0036] The following is a detailed description of a specific scheme of a data security storage method for an artificial intelligence data platform provided by the present invention in conjunction with the accompanying drawings.
[0037] See also Figure 1 , which shows a flowchart of a method for secure data storage of an artificial intelligence data platform provided by an embodiment of the present invention, the method comprising the following steps:
[0038] S001, obtaining a plaintext image, performing bit plane decomposition on the plaintext image to obtain all plaintext plane images of the plaintext image.
[0039] (1) Obtain the plaintext image.
[0040] The specific method is as follows: the data platform of the present invention encrypts and stores user data to ensure the security of the user data, and the user data includes the user's product information, business data, research results and other information. Among them, for the text data in the user data, it is encrypted by the conventional AES encryption algorithm and then securely stored; for the image data in the user data, the present invention records it as a plaintext image, and encrypts the plaintext image according to the image encryption method of the present invention, and then securely stores it.
[0041] (2) Perform bit-plane decomposition on the plaintext image to obtain all plaintext plane images of the plaintext image.
[0042] The pixel values of the plaintext pixel points of the plaintext image and the ciphertext pixel points of the ciphertext image are both Therefore, it is impossible to obtain ciphertext by randomly extracting the ciphertext set without replacement, and thus it is impossible to encrypt the plaintext image; only when the possibilities of the pixel values of the plaintext pixels of the plaintext image are less than 256, can the corresponding ciphertext set be assigned to the pixel values of the plaintext pixels. Therefore, the present invention obtains the plaintext plane image of the plaintext image by performing bit plane decomposition on the plaintext image. There are only 4 possibilities of the pixel values of the plaintext pixels of the plaintext plane image. Therefore, the corresponding ciphertext set can be assigned to the pixel values of the plaintext pixels of the plaintext plane image, and the ciphertext is obtained by randomly extracting the ciphertext set without replacement, thereby encrypting the plaintext image.
[0043] The specific method is as follows: For a grayscale image, the grayscale value of a pixel is a number consisting of 8 bits. Therefore, the grayscale values of all plaintext pixels in the plaintext image are converted into 8-bit binary numbers, which are recorded as , is the first plaintext pixel The bit value of a bit can only be 0 or 1. By performing bit plane decomposition on the 8-bit binary number of the plaintext pixel, two adjacent bits in the 8-bit binary number form a bit value pair, and four groups of bit value pairs are obtained for each plaintext pixel. The four groups of bit value pairs are , , , , each group of bit value pairs has four possible values, which are 00, 01, 10, and 11 respectively; all plaintext pixel points corresponding to the same group of bit value pairs are constructed into a plaintext plane image, each plaintext pixel point in the plaintext plane image corresponds to a group of bit value pairs, and the bit value pairs are used as the pixel values of the plaintext pixel points of the plaintext plane image, and a total of four plaintext plane images of the plaintext image are obtained.
[0044] S002, obtaining a first chaotic sequence and a second chaotic sequence according to a security key and a two-dimensional chaotic mapping model; obtaining a starting position of a plaintext plane image according to the first chaotic sequence; and obtaining a bit value pair sequence of the plaintext plane image according to the second chaotic sequence.
[0045] Different starting positions and bit value pair sequences are assigned to different plaintext plane images of different plaintext images through chaotic sequences, thereby increasing the degree of confusion of the obtained ciphertext image and thus increasing the security of the ciphertext image.
[0046] The plaintext image has four plaintext plane images. The specific method of obtaining a quantization value sequence of a plaintext plane image of the plaintext image according to a statistical feature sequence of a plaintext plane image of the plaintext image is:
[0047] (1) Obtain two chaotic sequences.
[0048] The formula of two-dimensional Logistic chaos mapping is as follows:
[0049]
[0050]
[0051] in, is the chaos parameter, when When , the two-dimensional Logistic system is logically mapped to a chaotic state, and the resulting sequence is non-periodic, non-convergent, and very sensitive to the initial value, showing strong chaotic characteristics. Randomly generate security keys within the range . According to the security key, the two-dimensional Logistic chaos mapping model is iterated To avoid interference from initial values, two sets of sequences are generated. values, and the remaining Multiply each value by And round it off to get the length The first chaotic sequence of is the number of plaintext images stored; the remaining Multiply each value by And round it off to get the length The second chaotic sequence.
[0052] (2) Obtain a set of bit value pair sequences.
[0053] For each bit plane of the plaintext image, the bit value pair has four possible values, namely 00, 01, 10, and 11. The bit value pair sequence composed of the four possible values has a total of The set of 24 bit value pair sequences is recorded as the bit value pair sequence set. The integer between is used to assign serial numbers to all bit value pair sequences in the bit value pair sequence set, wherein different bit value pair sequences are assigned different serial numbers. The bit value pair sequence set is obtained only once during the entire encryption process, and the obtained bit value pair sequence set is stored.
[0054] (3) Obtain the starting position of the plaintext plane image according to the first chaotic sequence.
[0055] For Zhang Mingwen's image plaintext plane image, obtain the first chaotic sequence Values , as the first Zhang Mingwen's image The starting position of the plaintext plane image.
[0056] (4) Obtain a bit value pair sequence of the plaintext plane image according to the second chaotic sequence.
[0057] For Zhang Mingwen's image plaintext plane image, obtain the first Values , in the bit value pair sequence set, the sequence number is The bit value pair sequence of the plaintext plane image is recorded as the bit value pair sequence of the plaintext plane image ,in Represents a sequence of bit-value pairs The first bit-value pair of Represents a sequence of bit-value pairs The second bit value pair of , and so on; the subscripts 1, 2, 3, and 4 are the sequence numbers of the four bit value pairs respectively.
[0058] S003, obtaining a statistical feature sequence of the plaintext plane image according to the bit value pair sequence of the plaintext plane image; obtaining a quantized value sequence of the plaintext plane image according to the starting position of the plaintext plane image and the statistical feature sequence.
[0059] In order to ensure that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, it is necessary to make the grayscale histogram of the ciphertext image uniform and completely different from the plaintext image. Therefore, the present invention obtains the quantization value sequence of the plaintext plane image according to the statistical feature sequence of the plaintext plane image, and then obtains the ciphertext set sequence of the plaintext plane image according to the quantization value sequence. Only by assigning values based on such a ciphertext set sequence can the grayscale histogram of the ciphertext image be uniform and completely different from the plaintext image, thereby ensuring that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent.
[0060] The specific steps include:
[0061] (1) Obtain the statistical feature sequence of the plaintext plane image based on the bit value pair sequence of the plaintext plane image.
[0062] Obtaining a first statistical feature of the plaintext plane image according to a first bit value pair in a bit value pair sequence of the plaintext plane image, specifically: obtaining a first bit value pair in a bit value pair sequence of the plaintext plane image, counting the total number of plaintext pixel points whose pixel values are equal to the first bit value pair among all plaintext pixel points of the plaintext plane image, and recording a ratio of the total number to M×N as the first statistical feature of the plaintext plane image, wherein M×N is a size of the plaintext image;
[0063] Similarly, according to the second bit value pair, the third bit value pair, and the fourth bit value pair in the bit value pair sequence of the plaintext plane image, the second statistical feature, the third statistical feature, and the fourth statistical feature of the plaintext plane image are respectively obtained, and the sequence composed of the four statistical features of the plaintext plane image is recorded as the statistical feature sequence of the plaintext plane image.
[0064] (2) Obtain the quantization value sequence of the plaintext plane image based on the statistical feature sequence of the plaintext plane image.
[0065] Will The grayscale values between form a grayscale value ring sequence. According to the starting position of the plaintext plane image, the grayscale value ring sequence is divided and expanded from the starting position into a grayscale value sequence, where represents the starting position of the plane image, then Indicates the end position of the plane image;
[0066] Multiply the first statistical feature in the statistical feature sequence by 256 and round it to the nearest integer. The sum of the rounded value and the starting position of the plaintext plane image is recorded as the first quantized value of the plaintext plane image. ; Multiply the second statistical feature in the statistical feature sequence by 256 and round it to the nearest integer, and record the sum of the rounded value and the first quantized value of the plaintext plane image as the second quantized value of the plaintext plane image ; Multiply the third statistical feature in the statistical feature sequence by 256 and round it to the nearest integer. The sum of the rounded value and the second quantized value of the plaintext plane image is recorded as the third quantized value of the plaintext plane image. ; The sequence of three quantized values Denoted as the quantized value sequence of the plaintext plane image.
[0067] S004, obtaining a ciphertext set sequence of a plaintext plane image according to a bit value pair sequence and a quantization value sequence of the plaintext plane image, and obtaining a ciphertext of each plaintext pixel of each plaintext plane image by performing random sampling without replacement on the ciphertext sets in the ciphertext set sequence of each plaintext plane image, thereby obtaining a ciphertext image.
[0068] The specific steps include:
[0069] (1) Obtain the ciphertext set sequence of the plaintext plane image according to the bit value pair sequence and the quantization value sequence of the plaintext plane image. Obtain four ranges according to the quantization value sequence of the plaintext plane image and the starting position and ending position of the plaintext plane image. The four ranges are ,in, is the starting position of the plaintext plane image, is the end position of the plaintext plane image, are respectively a first quantization value, a second quantization value and a third quantization value in a quantization value sequence of a plaintext plane image;
[0070] According to the first range Get the first ciphertext set, specifically: set the first range Repeat to get all integers in The obtained set of all integers is recorded as the first ciphertext set, where Indicates rounding up; similarly, according to the second range , the second range The third range The second ciphertext set, the third ciphertext set, and the fourth ciphertext set are obtained respectively, and the sequence composed of the four ciphertext sets is recorded as the ciphertext set sequence of the plaintext plane image.
[0071] (2) By performing random sampling without replacement on the ciphertext set in the ciphertext set sequence of the plaintext plane image, the ciphertext of each plaintext pixel of the plaintext plane image is obtained, and then the ciphertext image is obtained.
[0072] For all plaintext pixel points in the plaintext plane image whose pixel values are equal to the first bit value pair in the bit value pair sequence, the ciphertext of each plaintext pixel point is obtained by performing random sampling without replacement on the first ciphertext set in the ciphertext set sequence of the plaintext plane image; similarly, the ciphertext of all plaintext pixel points whose pixel values are equal to the second bit value pair in the bit value pair sequence, all plaintext pixel points whose pixel values are equal to the third bit value pair in the bit value pair sequence, and all plaintext pixel points whose pixel values are equal to the fourth bit value pair in the bit value pair sequence are obtained respectively by performing random sampling without replacement on the second ciphertext set, the third ciphertext set, and the fourth ciphertext set in the ciphertext set sequence of the plaintext plane image.
[0073] Among them, the present invention obtains the ciphertext of the plaintext pixel points by performing random sampling without replacement on the corresponding ciphertext set for all plaintext pixel points whose pixel values are equal to the same bit value pair. Since the ciphertext plaintext pixel points have the same bit value pair and are randomly sampled and assigned values according to the corresponding ciphertext set without replacement, when restoring the ciphertext pixel points, it is only necessary to encode all the ciphertext pixel points belonging to the ciphertext set into the same bit value pair to decrypt the ciphertext pixel points and obtain the restored plaintext pixel points.
[0074] The ciphertext of each plaintext pixel of each plaintext plane image is obtained by randomly sampling the ciphertext set in the ciphertext set sequence of each plaintext plane image without replacement, the grayscale value of each plaintext pixel of each plaintext plane image is set as the ciphertext, and the plaintext pixel after the grayscale value is reset is recorded as the ciphertext pixel of the plaintext pixel, so as to encrypt the plaintext pixel of the plaintext plane image; the image composed of the ciphertext pixel after each plaintext pixel of each plaintext plane image is encrypted is recorded as the ciphertext plane image of the plaintext plane image, the ciphertext plane images of the four plaintext plane images of the plaintext image are used as the upper left corner, upper right corner, lower left corner and lower right corner of the image respectively, and the image composed of the ciphertext plane images of the four plaintext plane images is recorded as the ciphertext image of the plaintext image.
[0075] Since the ciphertext set of the plaintext plane image is obtained according to the size of the statistical characteristics of the plaintext plane image, in the ciphertext set, the number of any numerical values is equal, and at the same time, the ciphertext is obtained by random sampling without replacement according to the ciphertext set of the plaintext plane image, therefore, the grayscale histogram of the ciphertext plane image finally obtained is uniform and completely different from that of the plaintext plane image, and the random sampling without replacement increases the degree of confusion of the ciphertext image, even if the same plaintext image is encrypted twice, the obtained ciphertext images are different; and then the grayscale histogram of the ciphertext image composed of the ciphertext plane images is uniform and completely different from the plaintext image, and the ciphertext image is sufficiently chaotic; therefore, the image encryption method described in the present invention can make the grayscale histogram of the ciphertext image uniform and completely different from the plaintext image, change the statistical characteristics of the ciphertext image, and ensure that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, so as to achieve the purpose of protecting the image data of the artificial intelligence data platform.
[0076] For example, for Figure 2 The plaintext image shown in the figure is statistically analyzed to obtain the grayscale histogram of the plaintext image. Figure 3 As shown, the ciphertext image encrypted by the present invention is as follows Figure 4 As shown in the figure, the ciphertext image is statistically analyzed to obtain the grayscale histogram of the ciphertext image. Figure 5 As shown; therefore, the image encryption method described in the present invention can make the grayscale histogram of the ciphertext image uniform and completely different from the plaintext image, change the statistical characteristics of the ciphertext image, and ensure that the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, so as to achieve the purpose of protecting the image data of the artificial intelligence data platform; It should be noted that Figure 2 The image shown is a general test image open source on the Internet. There is no copyright issue and no impact from copyright requirements.
[0077] The encrypted ciphertext image of the plaintext image is stored, and at the same time, the statistical feature sequences of all plaintext plane images of the plaintext image are encrypted and stored. The encryption method is the conventional RSA encryption algorithm for encrypting text data.
[0078] S005, decrypt the ciphertext image to obtain a plaintext image.
[0079] The ciphertext image is segmented to obtain all ciphertext plane images of the ciphertext image, wherein the segmentation is as follows: the ciphertext image is divided from the middle of the rows and columns, and the ciphertext image is divided into regions of four image sizes, and each region is recorded as a ciphertext plane image of the ciphertext image.
[0080] Based on security key and two-dimensional Logistic chaotic mapping to obtain two chaotic sequences; obtain the starting position of the ciphertext plane image according to the first chaotic sequence, and obtain the bit value pair sequence of the ciphertext plane image according to the second chaotic sequence; decrypt the encrypted and stored statistical feature sequence through the RSA decryption algorithm to obtain the statistical feature sequence of the ciphertext plane image; obtain the quantization value sequence of the plane image according to the statistical feature sequence of the plaintext plane image; obtain the ciphertext range sequence of the ciphertext plane image according to the bit value pair sequence and the quantization value sequence of the ciphertext plane image.
[0081] According to all ciphertext plane images of the ciphertext image and the ciphertext range sequence of the ciphertext plane image, all plaintext plane images are encoded, and all ciphertext plane images in the ciphertext image are decrypted to obtain all plaintext plane images, and then a plaintext image composed of all plaintext plane images is obtained. For a ciphertext plane image in the ciphertext image, a plaintext plane image is obtained after the ciphertext plane image is decrypted. There are as many plaintext plane images as there are ciphertext plane figures in the ciphertext image. The image composed of the plaintext plane images of all ciphertext plane images on the ciphertext image is the plaintext image after the ciphertext image is decrypted. Among them, according to a ciphertext plane image of the ciphertext image and the ciphertext range sequence of the ciphertext plane image, a plaintext plane image is encoded, and the specific method of decrypting a ciphertext plane image in the ciphertext image to obtain a plaintext plane image is:
[0082] In the ciphertext plane image of the ciphertext image, all ciphertext pixel points whose grayscale values are within the first ciphertext range in the ciphertext range sequence of the ciphertext plane image are encoded as the first bit value pair in the bit value pair sequence of the ciphertext plane image.
[0083] Similarly, all ciphertext pixel points whose grayscale values are within the second ciphertext range in the ciphertext range sequence, all ciphertext pixel points whose grayscale values are within the third ciphertext range in the ciphertext range sequence, and all ciphertext pixel points whose grayscale values are within the fourth ciphertext range in the ciphertext range sequence are encoded as the second bit value pair, the third bit value pair, and the fourth bit value pair in the bit value pair sequence, respectively.
[0084] The image composed of all the pixels after encoding is recorded as the plaintext plane image after the ciphertext plane image is decrypted; the four bit value pairs of the four pixels at the same position of the four plaintext plane images after the ciphertext image is decrypted are spliced in sequence into an 8-bit binary number, and the decimal number corresponding to the 8-bit binary number is recorded as plaintext; the image composed of the pixels with all grayscale values reset to plaintext is the plaintext image after the ciphertext image is decrypted.
[0085] In summary, the present invention performs bit plane decomposition on the plaintext image to obtain four plaintext plane images of the plaintext image; obtains the quantization value sequence of the plaintext plane image according to the statistical feature sequence of the plaintext plane image; obtains the ciphertext set sequence of the plaintext plane image according to the bit value pair sequence and the quantization value sequence of the plaintext plane image, obtains the ciphertext of the plaintext pixel points by performing random sampling without replacement on the ciphertext set pairs, and then obtains the ciphertext pixel points. The present invention obtains a ciphertext image with a uniform grayscale histogram by encrypting the plaintext image, so the ciphertext image can resist the attacker's statistical analysis attack to the greatest extent, so as to achieve the purpose of protecting the image data of the artificial intelligence data platform.
[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data security storage method for an artificial intelligence data platform, characterized in that: The method comprises: Obtain a plaintext image in the user data, and perform bit plane decomposition on the plaintext image to obtain four plaintext plane images of the plaintext image; A first chaotic sequence and a second chaotic sequence are obtained according to a security key and a two-dimensional chaotic mapping model; a starting position of each plaintext plane image is obtained according to the first chaotic sequence, and a bit value pair sequence of each plaintext plane image is obtained according to the second chaotic sequence; a statistical feature sequence of each plaintext plane image is obtained according to the bit value pair sequence of each plaintext plane image, and a quantized value sequence of each plaintext plane image is obtained according to the starting position and statistical feature sequence of each plaintext plane image; Obtain a ciphertext set sequence of each plaintext plane image according to the bit value pair sequence and the quantization value sequence of each plaintext plane image; obtain the ciphertext of each plaintext pixel of each plaintext plane image by performing random sampling without replacement on the ciphertext set in the ciphertext set sequence of each plaintext plane image, set the grayscale value of each plaintext pixel of each plaintext plane image to the ciphertext, and record the plaintext pixel after the grayscale value is reset as the ciphertext pixel of the plaintext pixel; An image composed of ciphertext pixels of all plaintext pixels of each plaintext plane image is recorded as a ciphertext plane image of the plaintext plane image, and an image composed of ciphertext plane images of four plaintext plane images of the plaintext image is recorded as a ciphertext image of the plaintext image; The step of obtaining a bit value pair sequence of each plaintext plane image according to the second chaotic sequence comprises: For any plaintext plane image, each bit value pair of plaintext pixels has four possible values, namely 00, 01, 10, and 11. The sequence obtained by arranging the four possible values is recorded as a bit value pair sequence. The set of all bit value pair sequences is recorded as a bit value pair sequence set, and all bit value pair sequences in the bit value pair sequence set are assigned serial numbers using integers, where different bit value pair sequences are assigned different serial numbers. According to the sequence number of the plaintext plane image Get the first Values , in the bit value pair sequence set, the sequence number is The bit value pair sequence of is recorded as the bit value pair sequence of the plaintext plane image; The step of obtaining the statistical feature sequence of each plaintext plane image according to the bit value pair sequence of each plaintext plane image comprises: Obtaining a first statistical feature of the plaintext plane image according to a first bit value pair in a bit value pair sequence of the plaintext plane image, specifically: obtaining a first bit value pair in a bit value pair sequence of the plaintext plane image, counting the total number of plaintext pixel points whose pixel values are equal to the first bit value pair among all plaintext pixel points of the plaintext plane image, and recording a ratio of the total number to M×N as the first statistical feature of the plaintext plane image, wherein M×N is a size of the plaintext image; Similarly, according to the second bit value pair, the third bit value pair, and the fourth bit value pair in the bit value pair sequence of the plaintext plane image, the second statistical feature, the third statistical feature, and the fourth statistical feature of the plaintext plane image are obtained respectively, and the sequence composed of the four statistical features of the plaintext plane image is recorded as the statistical feature sequence of the plaintext plane image; The step of performing bit plane decomposition on the plaintext image to obtain four plaintext plane images of the plaintext image comprises: The grayscale value of each plaintext pixel of the plaintext image is converted into an 8-bit binary number, and two adjacent bits in the 8-bit binary number are combined into a bit value pair to obtain four groups of bit value pairs for each plaintext pixel; all plaintext pixels corresponding to the same group of bit value pairs are constructed into a plaintext plane image, each plaintext pixel in the plaintext plane image corresponds to a group of bit value pairs, and the bit value pairs are used as the pixel values of the plaintext pixel points of the plaintext plane image, and a total of four plaintext plane images of the plaintext image are obtained.
2. The data security storage method of an artificial intelligence data platform according to claim 1 is characterized in that: The step of obtaining the starting position of each plaintext plane image according to the first chaotic sequence comprises: According to the sequence number of the plaintext plane image Get the first chaotic sequence Values , the value As the starting position of the plaintext plane image, the sequence number of the plaintext plane image It means that the text plane image is the first Zhang Mingwen's image A plaintext plane image.
3. The data security storage method of an artificial intelligence data platform according to claim 1 is characterized in that: The step of obtaining the quantization value sequence of each plaintext plane image according to the starting position and statistical feature sequence of each plaintext plane image comprises: Will The grayscale values between form a grayscale value ring sequence, and according to the starting position of the plaintext plane image, the grayscale value ring sequence is divided from the starting position and expanded into a grayscale value sequence, the first statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the starting position of the plaintext plane image is recorded as the first quantized value of the plaintext plane image; the second statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the first quantized value of the plaintext plane image is recorded as the second quantized value of the plaintext plane image; the third statistical feature in the statistical feature sequence is multiplied by the first preset value and rounded to an integer, and the sum of the rounded value and the second quantized value of the plaintext plane image is recorded as the third quantized value of the plaintext plane image; the sequence composed of the three quantized values is recorded as the quantized value sequence of the plaintext plane image.
4. The data security storage method of an artificial intelligence data platform according to claim 1 is characterized in that: The step of obtaining the ciphertext set sequence of each plaintext plane image according to the bit value pair sequence and the quantization value sequence of each plaintext plane image comprises: According to the quantization value sequence of the plaintext plane image and the starting position and ending position of the plaintext plane image, four ranges are obtained, which are ,in, is the starting position of the plaintext plane image, is the end position of the plaintext plane image, are respectively a first quantization value, a second quantization value and a third quantization value in a quantization value sequence of a plaintext plane image; According to the first range Get the first ciphertext set, specifically: set the first range Repeat to get all integers in The obtained set of all integers is recorded as the first ciphertext set, where Indicates rounding up; similarly, according to the second range , the second range The third range The second ciphertext set, the third ciphertext set, and the fourth ciphertext set are obtained respectively, and the sequence composed of the four ciphertext sets is recorded as the ciphertext set sequence of the plaintext plane image.
5. The data security storage method of an artificial intelligence data platform according to claim 1 is characterized in that: The step of obtaining the ciphertext of each plaintext pixel of each plaintext plane image by randomly sampling the ciphertext set in the ciphertext set sequence of each plaintext plane image without replacement comprises: For all plaintext pixel points in the plaintext plane image whose pixel values are equal to the first bit value pair in the bit value pair sequence, the ciphertext of each plaintext pixel point is obtained by performing random sampling without replacement on the first ciphertext set in the ciphertext set sequence of the plaintext plane image; similarly, the ciphertext of all plaintext pixel points whose pixel values are equal to the second bit value pair in the bit value pair sequence, all plaintext pixel points whose pixel values are equal to the third bit value pair in the bit value pair sequence, and all plaintext pixel points whose pixel values are equal to the fourth bit value pair in the bit value pair sequence are obtained respectively by performing random sampling without replacement on the second ciphertext set, the third ciphertext set, and the fourth ciphertext set in the ciphertext set sequence of the plaintext plane image.
Citation Information
Patent Citations
Novel hyper-chaotic image encryption method
CN106570814A
Hyper-chaotic encryption method based on Josephf traversal and bit plane reconstruction
CN112422266A