A data transmission method and system for a network security platform
By constructing and scrambling LBP images, and selecting local extrema and intermediate pixels as marker pixels, the problem that existing image encryption methods cannot resist statistical analysis attacks is solved, and image recovery with high security and high fidelity is achieved.
Patent Information
- Application Number
- CN202511404450.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing image encryption methods only change pixel positions without altering the statistical properties of the image, making them vulnerable to statistical analysis attacks in modern network threats and unable to guarantee high-fidelity image recovery at the receiving end.
By acquiring the LBP feature values of the image to be transmitted, an LBP image is constructed and scrambled. Local extreme points and intermediate pixels are selected as marker pixels, and their coordinates and gray values are recorded as supplementary information for encryption. This is then transmitted together with the ciphertext image to destroy the statistical properties and spatial structure of the image, while ensuring that the receiving end can recover the original image with high fidelity.
It greatly improves the security of image transmission, effectively resists statistical analysis attacks, achieves high-fidelity image restoration, and reduces additional data overhead.
Smart Images

Figure CN120915889B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data transmission. More particularly, the present application relates to a data transmission method and system for a network security platform. BACKGROUND
[0002] In a network security platform, image data (such as face authentication photos, system topology diagrams, identity verification screenshots, etc.) as the core carrier of sensitive information, its secure transmission is a key link to ensure the overall security of the platform. Once these images are leaked, it may lead to invasion of personal privacy, exposure of system architecture or identity fraud, causing serious security incidents. Therefore, sensitive images must be encrypted to ensure their confidentiality during transmission.
[0003] Currently, many systems use image encryption schemes mainly rely on scrambling techniques, that is, through coordinate transformation, pixel position permutation and other methods to disrupt the pixel arrangement of the original image. Although this method can make the ciphertext image visually present a chaotic noise state, effectively hiding the intuitive content of the image, its essential defect is that it does not change the statistical properties of the image. For example, the statistical characteristics such as the gray level histogram and pixel value distribution of the ciphertext image remain highly consistent with the original image. Attackers can use this weakness to analyze the statistical distribution of the ciphertext image, combined with known image types, use statistical analysis, correlation attacks and other means, gradually infer the outline or even key features of the original image, thus achieving the cracking of the encryption system.
[0004] In addition, with the development of artificial intelligence and pattern recognition technology, attackers can use deep learning models to train large-scale ciphertext images to learn the mapping relationship from the statistical characteristics of a specific encryption algorithm to the original image, which makes attacks based on statistical characteristics more efficient and accurate. Therefore, traditional encryption methods relying solely on spatial scrambling are not secure enough to cope with modern complex network threats. There is an urgent need for an encryption scheme that can fundamentally destroy the statistical properties of images while ensuring high-fidelity recovery at the receiving end to meet the requirements of high-security level network platforms for image transmission. SUMMARY
[0005] To solve the technical problem that the existing image encryption method only changes the pixel position without changing the statistical properties of the image, which is difficult to resist statistical analysis attacks, the present application provides solutions in the following aspects.
[0006] In a first aspect, the present application provides a data transmission method for a network security platform, comprising:
[0007] acquire an image to be transmitted; acquire an LBP feature value of each pixel point in the image to be transmitted, and construct an LBP image by using the LBP feature values of all the pixel points; obtain a ciphertext image by scrambling the LBP image; infer a size relationship of gray scale values of each pixel point according to the LBP feature value of the pixel point, select a pixel point with a local minimum gray scale value, a pixel point with a local maximum gray scale value, and a plurality of intermediate pixel points as marked pixel points according to the size relationship, and record coordinates and gray scale values of the marked pixel points as supplementary information; encrypt the supplementary information, and transmit the encrypted result and the ciphertext image to a receiving end.
[0008] The application fundamentally destroys the global gray scale statistical characteristics of the image by acquiring the LBP feature value of each pixel point in the image to be transmitted and constructing the LBP image, and converts the gray scale information of the original image into local texture structure features, so that an attacker cannot crack the image by statistical analysis; subsequently, the spatial correlation of the pixels is further disturbed by scrambling the LBP image, so that the ciphertext image visually presents completely random noise, and the security in the transmission process is greatly enhanced; on this basis, the local extreme points and the key intermediate points are selected as the supplementary information according to the relative size relationship of the pixel gray scale values inferred from the LBP feature values, the supplementary information is encrypted and transmitted together with the ciphertext image, so that the receiving end can use the gray scale values of the pixel points recorded in the supplementary information and the size relationship of the pixel gray scale values inferred from the LBP image restored according to the ciphertext image to restore the original image with high fidelity by the interpolation method, thereby ensuring the security and efficiency of the image transmission and realizing the high-fidelity restoration of the original image.
[0009] Preferably, acquiring the LBP feature value of each pixel point in the image to be transmitted comprises: sorting the 8 neighborhood pixel points of the pixel point according to a preset rule, comparing the gray scale value of each neighborhood pixel point with the gray scale value of the pixel point , marking 1 if the gray scale value of the neighborhood pixel point is greater than or equal to the gray scale value of the pixel point , otherwise marking 0; constructing an 8-bit binary number by using the obtained 8 marks in the order of the neighborhood pixel point sorting, converting the 8-bit binary number into a decimal number to obtain the LBP feature value of the pixel point .
[0010] The application converts absolute gray scale information of the image into relative texture relation with the surrounding neighborhood by calculating LBP feature value of each pixel point, which fundamentally destroys the gray scale statistical characteristics of the original image, so that the attacker cannot infer the original content by analyzing the statistical characteristics such as the gray scale histogram of the ciphertext image, thereby greatly enhancing the security of the image in the transmission process; meanwhile, the LBP feature value retains the key local structure and texture information of the image, which provides the possibility for subsequent recovery of the global gray scale of the image based on the relative relation at the receiving end, and realizes the effective balance between security and recoverability.
[0011] Preferably, the 8 neighborhood pixels of the pixel point are sorted according to a preset rule, including: obtaining a chaotic sequence by using a chaotic mapping method, multiplying each element in the chaotic sequence by 8 and then taking the upper integer to obtain an integer sorting sequence in the range of [1, 8]; for each pixel point in the image to be transmitted, the 8 neighborhood pixels of the pixel point are sorted according to the sorting sequence by using the variable-length Joseph algorithm.
[0012] The application generates a sorting sequence by using chaotic mapping and sorts the 8 neighborhoods of the pixel point by combining the variable-length Joseph algorithm, so that the calculation process of the LBP feature value introduces high randomness and key dependence; the chaotic sequence is extremely sensitive to the initial parameters, and even if the attacker knows the LBP algorithm itself, the attacker cannot infer the sorting order of the neighborhood pixels without knowing the chaotic mapping parameters, so the LBP feature value cannot be correctly calculated, which fundamentally breaks the predictability between the LBP feature and the original image gray scale, greatly enhances the anti-attack ability of image encryption, and significantly improves the security of the transmission process.
[0013] Preferably, the size relation of the gray scale values of the pixels is inferred according to the LBP feature value of the pixel point, including: for any pixel point, constructing the inequality of the gray scale values between the pixel point and the neighborhood pixels according to the LBP feature value of the pixel point; by analyzing the LBP values of all pixel points, the inequality of the gray scale values between all adjacent pixel points is obtained; the inequalities of the gray scale values between all adjacent pixel points are concatenated to obtain the size relation between the gray scale values of the pixel points.
[0014] The present application can systematically deduce the relative size relationship of the pixel gray values in the whole image by analyzing the LBP characteristic value of each pixel point to construct the gray value inequality with the neighborhood pixel points and integrating the inequality between all the adjacent pixel points, fully utilizes the local gray relative information coded by the LBP feature, provides a reliable theoretical basis for the subsequent selection of local extreme points and intermediate pixel points as supplementary information, and thus significantly reduces the amount of supplementary data required to be transmitted under the premise of ensuring high-fidelity image recovery, and balances the safety, transmission efficiency and image quality.
[0015] Preferably, the process of obtaining the pixel point with the local minimum gray value and the pixel point with the local maximum gray value is as follows: constructing a gray directed graph according to the size relationship of the pixel gray values: regarding each pixel point as a node, if the gray values of two adjacent pixel points are the same in the deduced size relationship of the gray values, the two pixel points are merged into one node, if the gray values of two adjacent pixel points are different, a directed edge is constructed between the two pixel points, and the directed edge is directed from the pixel point with the smaller gray value to the pixel point with the larger gray value; regarding the pixel point corresponding to the node with only the out-degree but no in-degree in the gray directed graph as the pixel point with the local minimum gray value; regarding the pixel point corresponding to the node with only the in-degree but no out-degree in the gray directed graph as the pixel point with the local maximum gray value.
[0016] The present application can systematically recognize the extreme points of the image by constructing the gray directed graph to convert the relative size relationship between the pixel points into the topological structure of the graph, visualizes and structures the complex inequality system, makes the selection process of the marked pixel points objective and calculable, and provides a reliable theoretical basis and implementation path for the subsequent high-fidelity recovery of the image with the least amount of data.
[0017] Preferably, the method for obtaining the marked pixel points comprises: taking all the pixel points with the local minimum gray value and all the pixel points with the local maximum gray value as the initial marked pixel points; predicting the gray values of the remaining pixel points by the interpolation method based on the gray values of all the marked pixel points and the deduced size relationship of the pixel gray values, obtaining the gray prediction values of the remaining pixel points, and calculating the gray loss values; in response to the average value of the gray loss values of all the pixel points being not less than the preset loss threshold, taking the pixel point with the largest gray loss value as the marked pixel point as well; repeating the process of obtaining and judging the gray loss values until the average value of the gray loss values of all the pixel points is less than the preset loss threshold, and obtaining all the marked pixel points.
[0018] The application realizes adaptive optimization of the supplementary information by taking the local extreme point as an initial marked pixel point, performing interpolation prediction based on the size relationship between pixel points, and iteratively supplementing the pixel point with the largest prediction error as a new marked pixel point, dynamically balances the data amount of the supplementary information and the image fidelity under the premise of ensuring the quality of the finally restored image, avoids information redundancy or deficiency, thereby ensuring high-fidelity image restoration while minimizing the data amount of the supplementary information to be transmitted, and improving the transmission efficiency of the system.
[0019] Preferably, the supplementary information is encrypted, including: using an asymmetric encryption algorithm to encrypt the supplementary information.
[0020] Preferably, the LBP image is scrambled, including: using Arnold mapping to scramble the LBP image.
[0021] Preferably, if the image to be transmitted is an RGB image, each channel of the RGB image is regarded as a gray-scale image respectively to perform the operations of LBP image acquisition, scrambling and supplementary information acquisition.
[0022] In the second aspect, the application provides a data transmission system for a network security platform, including a processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, the above-mentioned data transmission method for a network security platform is realized.
[0023] By using the above technical solution, the above-mentioned data transmission method for a network security platform is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made according to the memory and the processor, and the use is convenient.
[0024] The application has the following advantages:
[0025] The application fundamentally destroys the statistical characteristics and spatial structure of the original image by combining the LBP feature conversion of the image with the scrambling operation, makes the ciphertext image visually present completely random noise, greatly improves the security in the transmission process, and effectively resists attacks based on statistical analysis. On this basis, the relative relationship of local gray scale contained in the LBP feature value is used to deduce the size relationship between pixels, and the local extreme point and the key intermediate point are selected as the supplementary information, and the supplementary information is encrypted and transmitted together with the ciphertext image, so that the receiving end can use the gray scale value of the pixel point recorded in the supplementary information and the size relationship between the gray scale values of the pixel points inferred from the LBP image restored according to the ciphertext image to restore the original image with high fidelity. The application ensures the safe transmission of the image content while minimizing the additional data overhead. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 is a flow chart illustrating a data transmission method for a network security platform according to the present application;
[0027] Figure 2 is a diagram illustrating a 3x3 pixel block;
[0028] Figure 3 is a diagram illustrating a virtual neighborhood pixel setting;
[0029] Figure 4 is a diagram illustrating an image to be transmitted;
[0030] Figure 5 is a diagram illustrating an LBP image corresponding to embodiment one;
[0031] Figure 6 is a diagram illustrating an LBP image corresponding to embodiment two;
[0032] Figure 7 is a diagram illustrating a gray scale histogram of Figure 4 ;
[0033] Figure 8 is a diagram illustrating a gray scale histogram of Figure 5 ;
[0034] Figure 9 is a diagram illustrating a gray scale histogram of Figure 6 ;
[0035] Figure 10 is a diagram illustrating a ciphertext image corresponding to Figure 5 ;
[0036] Figure 11 is a diagram illustrating a ciphertext image corresponding to Figure 6 ;
[0037] Figure 12 is a diagram illustrating a 4x4 pixel block;
[0038] Figure 13 is a diagram illustrating an LBP image corresponding to Figure 12 ;
[0039] Figure 14 is a diagram illustrating a gray scale directed graph corresponding to Figure 13 ;
[0040] Figure 15 is a diagram illustrating a decrypted image of Figure 10 ;
[0041] Figure 16 is a diagram illustrating a decrypted image of Figure 11 ; Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0044] This invention discloses a data transmission method for a network security platform, referring to... Figure 1 This includes steps S1-S5:
[0045] S1. Obtain the image to be transmitted.
[0046] It should be noted that in network security platforms, images often contain sensitive information (such as faces, system topology, etc.), and direct transmission poses a risk of leakage. Therefore, this invention encrypts the transmission of images.
[0047] Specifically, the image to be transmitted is a sensitive image that needs to be transmitted within the network security platform, such as a user's facial recognition photo, a system topology diagram, or a screenshot containing sensitive information. This embodiment uses an image of size... Let's take a grayscale image as an example for illustration, where... This indicates the position of the grayscale image at the th position. line, number Column of pixels, , .
[0048] In other embodiments, if the sensitive image to be transmitted is an RGB image, the RGB image can be converted into a grayscale image for subsequent encryption operations, or each channel of the RGB image can be treated as a grayscale image for subsequent encryption operations.
[0049] S2. Obtain the LBP feature value of each pixel in the image to be transmitted, and construct an LBP image from the LBP feature values of all pixels.
[0050] It should be noted that, at present, for image data, a scrambling method is usually used to encrypt the image data, but the image data is scrambled, and the statistical characteristics of the image data are not destroyed, and an attacker can use the statistical characteristics of the gray scale to analyze and crack the image data. The local binary pattern (LBP, Local Binary Patterns) feature value is a local texture descriptor, which reflects the relative relationship between a pixel point and its neighborhood. By calculating the LBP feature value, the gray scale information of the image data can be converted into its local structure feature. Therefore, the LBP feature value of each pixel point in the image to be transmitted is obtained, so as to subsequently scramble based on the LBP feature value, which fundamentally destroys the statistical characteristics of the image to be transmitted, and improves the transmission security of the image to be transmitted.
[0051] Specifically, for each pixel point in the image to be transmitted , 8 neighborhood pixel points of the pixel point are sorted according to a preset rule, and the gray scale values of each neighborhood pixel point are compared with the gray scale value of the center pixel point , if the gray scale value of the neighborhood pixel point is greater than or equal to the gray scale value of the center pixel point , then it is marked as 1, otherwise it is marked as 0. The obtained 8 marks form an 8-bit binary number, and the 8-bit binary number is converted into a decimal number to obtain the LBP feature value of the center pixel point .
[0052] In embodiment one, the 8 neighborhood pixel points of the pixel point are sorted according to a preset rule, including:
[0053] Taking the neighborhood pixel point of the first row and the first column in the 8 neighborhood of the pixel point as the starting point, the 8 neighborhood pixel points of the pixel point are sorted in a clockwise or counterclockwise order, and the marks corresponding to the 8 neighborhood pixel points are formed into an 8-bit binary number in the order of sorting, so as to obtain the LBP feature value of the center pixel point .
[0054] Exemplarily, Figure 2 represents a 3x3 pixel block, Figure 2 each box in the figure represents a pixel point, and the numerical value in the box represents the gray scale value of the pixel point. The gray scale value of the center pixel point is 80. Taking the neighborhood pixel point (the first row and the first column) at the upper left corner of the center pixel point as the starting point, the gray scale values of the 8 neighborhood pixel points are 78, 79, 82, 83, 81, 77, 76 and 79 after the 8 neighborhood pixel points are arranged in a clockwise order. The comparison results of the gray scale values of the 8 neighborhood pixel points and the gray scale value of the center pixel point are 0, 0, 1, 1, 1, 0, 0 and 0 respectively, and the 8-bit binary number is 00111000, which is converted into a decimal number to obtain the LBP feature value of the center pixel point.
[0055] In the second embodiment, the eight neighborhood pixels of the pixel point are sorted according to a preset rule, including:
[0056] A chaotic sequence is obtained by using a chaotic mapping method, and the length of the chaotic sequence is , wherein represents the size of the image to be transmitted. Each element in the chaotic sequence is multiplied by 8 and then rounded up to obtain integers in the range of [1, 8], and these integers form a sorting sequence. For each pixel point in the image to be transmitted, according to the sorting sequence, the eight neighborhood pixels of the pixel point are sorted using the variable-length Joseph algorithm, and the corresponding labels of the eight neighborhood pixels are formed into an 8-bit binary number in the order of sorting, thereby obtaining the LBP feature value of the center pixel point .
[0057] It should be noted that the specific algorithm of the chaotic mapping is not limited in this embodiment, and the implementer can select a specific chaotic mapping algorithm according to the actual implementation situation, such as Logistic chaotic mapping, Tent chaotic mapping, etc. The parameters of the chaotic mapping algorithm are pre-agreed by the sender and the receiver. In the case of an attacker changing the chaotic mapping parameters, it is impossible to guess the chaotic sequence and the sorting sequence, even if the attacker knows the LBP feature value used in the present application, it is also impossible to guess the sorting order of the neighborhood pixels, so as to correctly calculate the LBP feature value, thereby further improving the security of the image to be transmitted based on the first embodiment.
[0058] For example, assuming that the chaotic sequence is {0.125, 0.456, 0.789, 0.234, 0.567, 0.800, 0.345, 0.678, …}, then the corresponding sorting sequence is {1, 4, 7, 2, 5, 7, 3, 6, …}, according to the sorting sequence, the eight neighborhood pixels of the pixel point are sorted using the variable-length Joseph algorithm Figure 2The eight neighborhood pixels are sorted as follows: first, taking the neighborhood pixel in the upper left corner as the starting point, the eight neighborhood pixels are arranged in a clockwise order to form an initial sequence, the gray value sequence corresponding to the initial sequence is {78, 79, 82, 83, 81, 77, 76, 79}, an empty sequence is constructed and is denoted as a result sequence, which is used to store the result of sorting the neighborhood pixels according to the variable-length Joseph algorithm. According to the first element 1 in the sorting sequence, the first pixel in the initial sequence is selected and added to the result sequence without replacement, and the gray value sequence corresponding to the result sequence is {78}. At this time, the remaining seven pixels in the initial sequence correspond to the gray value sequence {79, 82, 83, 81, 77, 76, 79}. According to the second element 4 in the sorting sequence, the fourth pixel in the initial sequence is selected and added to the result sequence without replacement, and the gray value sequence corresponding to the result sequence is {78, 81}. At this time, the remaining six pixels in the initial sequence correspond to the gray value sequence {79, 82, 83, 77, 76, 79}. According to the third element 7 in the sorting sequence, the seventh pixel in the initial sequence is selected and added to the result sequence without replacement, but since the initial sequence only contains six pixels, the seventh %6=1 pixel in the initial sequence is selected and added to the result sequence without replacement, where % represents the remainder operation. The gray value sequence corresponding to the result sequence is {78, 81, 79}. At this time, the remaining five pixels in the initial sequence correspond to the gray value sequence {82, 83, 77, 76, 79}. In this way, the final result sequence corresponds to the gray value sequence {78, 81, 79, 83, 82, 77, 76, 79}, that is, the variable-length Joseph algorithm sorts the eight neighborhood pixels in the center pixel in the image in FIG. 1. Figure 2 After the eight neighborhood pixels in the center are sorted, the gray values of the neighborhood pixels are 78, 81, 79, 83, 82, 77, 76, and 79, respectively. Figure 2 The gray value of the center pixel in the image in FIG. 1 is 80, and the comparison results of the gray values of the eight neighborhood pixels and the gray value of the center pixel are 0, 1, 0, 1, 1, 0, 0, and 0, respectively. The eight-bit binary number is 01011000, which is converted into decimal as 88, and the LBP feature value of the center pixel in the image in FIG. 1 is 88. Figure 2 The LBP feature value of the center pixel in the image in FIG. 1 is 88.
[0059] In other embodiments, the implementer can sort the eight neighborhood pixels of the pixel point by other methods, and the sorting rules need to be agreed upon in advance by the sending end and the receiving end so that the receiving end can correctly restore the original image.
[0060] It needs to be specially pointed out that for the pixel points in the first row, the pixel points in the first column, the pixel points in the last row and the pixel points in the last column in the image to be transmitted, the number of the neighborhood pixel points in the eight-neighborhood of the pixel points is less than 8, at this time, for the missing neighborhood pixel points, the virtual neighborhood pixel points are set to complete 8 neighborhood pixel points, the gray value of the virtual neighborhood pixel points is the same as the gray value of the center pixel point, so as to ensure that the LBP feature value of the pixel points in the first row, the pixel points in the first column, the pixel points in the last row and the pixel points in the last column in the image to be transmitted can also be calculated.
[0061] Exemplarily, Figure 2 In the first row and the first column of the image, only 3 neighborhood pixel points exist in the eight-neighborhood of the pixel points, therefore, the virtual neighborhood pixel points need to be set. Figure 2 The schematic diagram of setting the virtual neighborhood pixel points for the pixel points in the first row and the first column of the image is shown in FIG. 2. Figure 3 , Figure 3 In FIG. 2, the solid line box represents the actual pixel point in the image to be transmitted, the dashed line box represents Figure 2 The virtual neighborhood pixel points for the pixel points in the first row and the first column of the image, the eight neighborhood pixel points are sorted in the clockwise direction according to the way in embodiment one, the gray values of the neighborhood pixel points are respectively 78, 78, 78, 79, 80, 79, 78, 78, the comparison results of the gray values of the eight neighborhood pixel points and the gray value of the center pixel point are respectively 1, 1, 1, 1, 1, 1, 1, 1, then the 8-bit binary number is 11111111, converted into decimal is 255, then Figure 2 The LBP feature value of the pixel points in the first row and the first column of the image is 255; assuming that the sorting sequence is {1, 4, 7, 2, 5, 7, 3, 6, …}, the eight neighborhood pixel points are sorted according to the way in embodiment two, the gray values of the neighborhood pixel points are respectively 78, 80, 78, 79, 78, 79, 78, 78, the comparison results of the gray values of the eight neighborhood pixel points and the gray value of the center pixel point are respectively 1, 1, 1, 1, 1, 1, 1, 1, then the 8-bit binary number is 11111111, converted into decimal is 255, then Figure 2 The LBP feature value of the pixel points in the first row and the first column of the image is 255. Figure 2
[0062] Further, the LBP feature value of each pixel point is filled into an empty matrix with the same size as the image to be transmitted according to the position of the pixel point in the image to be transmitted, to obtain the LBP image.
[0063] Exemplarily, Figure 4 The schematic diagram of the image to be transmitted, the LBP image obtained by the way in embodiment one is shown in FIG. 3. Figure 5 As shown. Assuming the Logistic chaotic mapping algorithm is used to obtain the chaotic sequence, and the chaotic mapping parameters are (3.698, 0.24), the LBP image obtained using the method in Example 2 is as follows. Figure 6 As shown. Figure 4 , Figure 5 , Figure 6 The corresponding grayscale histograms are as follows: Figure 7 , Figure 8 , Figure 9 As shown. It can be seen that... Figure 5 , Figure 6 The corresponding grayscale histogram ( Figure 8 , Figure 9 )and Figure 4 The corresponding grayscale histogram ( Figure 7 Completely inconsistent Figure 5 , Figure 6 Damaged Figure 4 The grayscale distribution characteristics are preserved, but the grayscale features are retained. Figure 4 It has certain texture features. Figure 6 Texture features in Figure 5 More ambiguous, and according to Figure 5 as well as Figure 6 The corresponding grayscale histogram ( Figure 8 , Figure 9 It can be seen that, Figure 6 The grayscale distribution in the middle is compared to Figure 5 The grayscale distribution in the image is more uniform, making it more uniform. Figure 6 It presents a more random visual effect.
[0064] It should be noted that since the LBP feature value of a pixel is converted from an 8-bit binary number, and the decimal range of the corresponding 8-bit binary number is [0, 255], the pixel value range in the resulting LBP image is [0, 255]. The LBP image is visually completely different from the original image, destroying the overall grayscale distribution information of the original image, but retaining the key structural information of the original image. This makes the LBP image an ideal encryption object. Subsequent scrambling based on the LBP image to obtain the ciphertext image makes it difficult for attackers to intuitively understand its content, even if they obtain the ciphertext image. Furthermore, they cannot use the grayscale distribution information in the ciphertext image to crack the original image, thus improving the security of image data transmission.
[0065] S3. The LBP image is scrambled to obtain a ciphertext image.
[0066] Specifically, the LBP image is scrambled using the Arnold mapping, and the scrambled LBP image is used as the ciphertext image.
[0067] It should be noted that the Arnold mapping is a chaotic mapping method of repeated folding and stretching transformation in a limited area. The scrambling of image pixel position is realized by coordinate transformation and modulo operation, so that the scrambled image presents a completely random state in vision. The Arnold mapping has the typical characteristics of chaotic system: sensitive to initial conditions, long-term behavior unpredictable, and topological transitivity. These characteristics make it difficult for attackers to recover the original image without knowing the key even if they know the scrambling algorithm. The specific implementation process of Arnold mapping is a known technology, which will not be described in detail here. The chaotic parameters and iteration times involved in the Arnold mapping are pre-agreed by the sender and the receiver.
[0068] In other embodiments, other scrambling methods can also be used by the implementers, such as the scrambling algorithm based on the Logistic chaotic system and the scrambling algorithm based on the Tent chaotic system. These methods are also based on the characteristics of chaotic systems, and realize the rearrangement of image pixel positions through different mathematical transformations, with similar scrambling effects and security. The choice of scrambling method can be based on the security requirements and computing resources of the actual application scenario. It should be emphasized that no matter which scrambling method is used, its parameters and iteration times should be securely shared by the sender and the receiver as a key to ensure the correctness of the encryption and decryption process.
[0069] For example, the Arnold mapping is used to scramble the LBP image shown in Figure 5 , and the resulting ciphertext image is shown in Figure 10 . The Arnold mapping is used to scramble the LBP image shown in Figure 6 , and the resulting ciphertext image is shown in Figure 11 . As can be seen from Figure 10 and Figure 5 , the spatial structure of the image is completely scrambled and presents a completely random noise-like state, and it is impossible to identify any meaningful texture or edge information, compared with Figure 4 , compared with Figure 10 , not only the gray scale distribution characteristics of the original image are lost, but also the spatial correlation is completely destroyed, making it impossible for attackers to infer the original image content through visual identification or statistical analysis. Figure 11 , compared with Figure 6 , also presents a completely random visual effect, compared with Figure 4 , compared with Figure 11 , and Figure 4 , the correlation between them is further reduced, and attackers cannot recover the original image without knowing the chaotic sequence parameters and scrambling iteration times even if they know the LBP algorithm and Arnold mapping.
[0070] S4, inferring the size relationship of the gray scale values of each pixel point according to the LBP feature value of the pixel point, selecting a pixel point with a locally minimum gray scale value, a pixel point with a locally maximum gray scale value and a plurality of intermediate pixel points as the marker pixel points according to the size relationship, and recording the coordinates and the gray scale values of the marker pixel points as the supplementary information.
[0071] It should be noted that only transmitting the ciphertext image is not enough to completely recover the original image, because the LBP feature conversion and the shuffling operation not only destroy the statistical characteristics and the spatial structure of the original image, but also lose the global gray scale information of the original image. In order to ensure that the receiver can recover the original image with high fidelity, the supplementary information needs to be obtained and transmitted. Since the LBP feature value encodes the relative relationship of the local gray scale, the relative size of the gray scale values between the pixel points can be inferred according to the LBP feature value.
[0072] Specifically, inferring the size relationship of the gray scale values of each pixel point according to the LBP feature value of the pixel point, comprising:
[0073] For any one pixel point, constructing an inequality of the gray scale values between the pixel point and the neighborhood pixel points according to the LBP feature value of the pixel point. By analyzing the LBP values of all pixel points, the inequalities of the gray scale values between all adjacent pixel points can be obtained. The inequalities of the gray scale values between all adjacent pixel points are concatenated, and the size relationship of the gray scale values of the pixel points is solved.
[0074] In the specific implementation process, if the LBP feature value is obtained by the embodiment one in step S2, the neighborhood pixel points in the first row and the first column in the 8-neighborhood of the pixel point are taken as the starting point, the 8 neighborhood pixel points are sorted in clockwise or counterclockwise order, according to the sorted order, the LBP binary bit corresponding to each neighborhood pixel point is judged in turn, if the bit is 1, the inequality is constructed: , if the bit is 0, the inequality is constructed: ; if the LBP feature value is obtained by the embodiment two in step S2, the 8 neighborhood pixel points of the pixel point are sorted by using the variable-length Joseph algorithm according to the sorting sequence generated by the chaotic sequence, according to the sorted order, the LBP binary bit corresponding to each neighborhood pixel point is judged in turn, if the bit is 1, the inequality is constructed: , if the bit is 0, the inequality is constructed: . Wherein, represents the gray scale value of the pixel point , represents the gray scale value of the pixel point , represents the gray scale value of the pixel point , represents the gray scale value of the pixel point , and the pixel point is the neighborhood pixel point of the pixel point .
[0075] Exemplarily,Figure 12 the image block is 4x4, Figure 12 Each box in the figure represents a pixel, and the value in the box represents the gray value of the pixel. The values in the boxes in Figure 12 The corresponding LBP image is shown in Figure 13 , Figure 13 The values in the boxes in the figure represent the LBP feature values of the pixels. For the pixel (1,1) in Figure 13 , its LBP feature value 251 converted to binary is 11111011. The values of the first 3 bits and the 7th and 8th bits in 11111011 reflect the size relationship between the gray values of the virtual neighborhood pixels and the pixel (1,1). The value of the 4th bit 1 in 11111011 reflects that the gray value of the pixel (1,2) is greater than or equal to that of the pixel (1,1), i.e., H(1,2) H(1,1), the value of the 5th bit 1 in 11111011 reflects that the gray value of the pixel (2,2) is greater than or equal to that of the pixel (1,1), i.e., H(2,2) H(1,1), the value of the 6th bit 0 in 11111011 reflects that the gray value of the pixel (2,1) is less than that of the pixel (1,1), i.e., H(2,1)<H(1,1); similarly, for the pixel (1,2) in Figure 13 , its LBP feature value 252 converted to binary is 11111100, i.e., H(1,1), H(2,1), H(2,2)<H(1,2) H(1,3), H(2,3); for the pixel (1,3) in Figure 13 , its LBP feature value 254 converted to binary is 11111110, i.e., H(1,2)<H(1,3) H(1,4), H(2,2), H(2,3), H(2,4); for the pixel (1,4) in Figure 13 , its LBP feature value 254 converted to binary is 11111110, i.e., H(1,3)<H(1,4) H(2,3), H(2,4); and for the remaining pixels in Figure 13 , the gray value inequalities obtained from their LBP feature values are respectively:
[0076] H(2,1) H(1,1), H(1,2), H(2,2), H(3,1), H(3,2);
[0077] H(1,1), H(1,2), H(1,3), H(2,1), H(3,1) < H(2,2) H(2,3), H(3,2), H(3,3);
[0078] H(1,2), H(1,3), H(1,4), H(2,1) < H(2,3) H(2,4), H(3,2), H(3,3), H(3,4);
[0079] H(1,3), H(1,4), H(2,3), H(3,4) < H(2,4) H(3,3);
[0080] H(2,1) < H(3,1) H(2,2), H(3,2), H(4,1), H(4,2);
[0081] H(2,1), H(2,2), H(2,3), H(3,1), H(3,3), H(4,1), H(4,2), H(4,3) < H(3,2);
[0082] H(2,2), H(2,3), H(2,4), H(3,4), H(4,2), H(4,3) < H(3,3) H(3,2), H(4,4);
[0083] H(3,4) H(2,3), H(2,4), H(3,3), H(4,3), H(4,4);
[0084] H(3,1) < H(4,1) H(3,2), H(4,2);
[0085] H(3,1), H(4,1) < H(4,2) H(3,2), H(3,3), H(4,3);
[0086] H(3,4), H(4,2) < H(4,3) H(3,2), H(3,3), H(4,4);
[0087] H(3,3), H(3,4), H(4,3) < H(4,4).
[0088] From the above inequalities, the size relationship between the gray values of the pixel points can be derived as follows:
[0089] H(2,1) < H(1,1) < H(1,2) < H(1,3) < H(2,2), H(1,4) < H(2,3) = H(3,4) < H(2,4), H(4,3) < H(3,3) < H(3,2), H(4,4) ;
[0090] H(2,1) < H(3,1) < H(2,2) < H(2,3) = H(3,4) < H(2,4), H(4,3) < H(3,3) < H(3,2), H(4,4) ;
[0091] H(2,1) < H(3,1) < H(4,1) < H(4,2) < H(4,3) < H(3,3) < H(3,2), H(4,4).
[0092] Further, the method for obtaining the pixel point with the local minimum gray value, the pixel point with the local maximum gray value and the intermediate pixel points comprises:
[0093] Specifically, the gray directed graph is constructed according to the size relationship between the gray values of the pixel points: each pixel point is regarded as a node, for any two adjacent pixel points in the size relationship between the gray values of the pixel points, if the gray values of the two pixel points are the same in the size relationship obtained by solving, the two pixel points are merged into one node, if the gray values of the two pixel points are different in the size relationship obtained by solving, a directed edge is constructed between the two pixel points, and the directed edge is directed from the pixel point with the smaller gray value to the pixel point with the larger gray value.
[0094] Exemplarily, Figure 14 The corresponding gray directed graph is shown in Figure 14 . Figure 13 Each circle in the figure represents a node, and the numerical value in the circle represents the position of the pixel point corresponding to the node in the image. Figure 14
[0095] It should be noted that if a node in the gray directed graph has only in-degree but no out-degree, it means that the gray value of the pixel point corresponding to the node is greater than the gray values of all the adjacent pixel points. If a node in the gray directed graph has only out-degree but no in-degree, it means that the gray value of the pixel point corresponding to the node is less than the gray values of all the adjacent pixel points. If a node in the gray directed graph has both in-degree and out-degree, it means that the gray value of the pixel point corresponding to the node is in the middle of the gray values of all the pixel points in the neighborhood range. Therefore, the pixel point with the local minimum gray value, the pixel point with the local maximum gray value and the intermediate pixel points are obtained according to the in-degree and out-degree of the node.
[0096] Specifically, the pixel points corresponding to all nodes with only out-degree in the gray directed graph are taken as the pixel points with local minimum gray values. The pixel points corresponding to all nodes with only in-degree in the gray directed graph are taken as the pixel points with local maximum gray values. The pixel points corresponding to the nodes with both in-degree and out-degree in the gray directed graph are taken as intermediate pixel points.
[0097] Exemplarily, Figure 12 The node (2, 1) has only out-degree, so the pixel point (2, 1) is the pixel point with local minimum gray value; the nodes (3, 2) and (4, 4) have only in-degree, so the pixel points (3, 2) and (4, 4) are the pixel points with local maximum gray value; the remaining nodes have both in-degree and out-degree, and the corresponding pixel points are intermediate pixel points.
[0098] Further, the pixel points with local minimum gray value, the pixel points with local maximum gray value and the intermediate pixel points are selected as the marked pixel points according to the size relationship, and the coordinates and gray values of the marked pixel points are recorded as the supplementary information, including:
[0099] 1. The pixel points with local minimum gray value and all the pixel points with local maximum gray value are taken as the initial marked pixel points.
[0100] 2. Based on the size relationship between the gray values of all the marked pixel points and the gray values of the pixel points solved, the gray prediction values of the remaining pixel points are obtained by an interpolation method. The difference between the gray prediction value of a pixel point and the gray value of the pixel point is taken as the gray loss value of the pixel point.
[0101] 3. In response to the average value of the gray loss values of all the pixel points being less than a preset loss threshold, the coordinates and gray values of all the marked pixel points are taken as the supplementary information; in response to the average value of the gray loss values of all the pixel points not being less than the preset loss threshold, the pixel point with the maximum gray loss value is also taken as a marked pixel point. Steps 2-3 are repeated until the average value of the gray loss values of all the pixel points is less than the preset loss threshold.
[0102] Wherein, the loss threshold is set by the implementer according to the actual implementation. When high-fidelity recovery of the image is required, a smaller loss threshold can be set, for example, 5; when a certain degree of image distortion is allowed, a larger loss threshold can be set, for example, 10; but in order to ensure the basic usability of the image, the loss threshold cannot exceed 20.
[0103] It should be noted that since the LBP feature value only retains the local gray size relationship of the pixel point, the size relationship between the gray values of the pixel points obtained based on the LBP feature value may have multiple components, and the gray values of the remaining pixel points predicted based on each component and the gray value of the marked pixel point may have multiple results, therefore, the average of the multiple prediction results of the gray value of the same pixel point is rounded to the nearest integer after rounding, and the result is taken as the gray prediction value of the pixel point.
[0104] Exemplarily, assuming that the loss threshold is set to 5, the gray values of the pixel points are as follows Figure 15 The pixel point (2, 1) is a local minimum pixel point in the gray value, the gray value is 83, the pixel points (3, 2) and (4, 4) are local maximum pixel points in the gray value, the gray values are both 99, and the size relationship between the gray values of the pixel points obtained is as follows: component 1: H (2, 1) <H (1, 1) <H (1, 2) <H (1, 3) <H (2, 2), H (1, 4) <H (2, 3) =H (3, 4) <H (2, 4), H (4, 3) <H (3, 3) <H (3, 2), H (4, 4); component 2: H (2, 1) <H (3, 1) <H (2, 2) <H (2, 3) =H (3, 4) <H (2, 4), H (4, 3) <H (3, 3) <H (3, 2), H (4, 4); component 3: H (2, 1) <H (3, 1) <H (4, 1) <H (4, 2) <H (4, 3) <H (3, 3) <H (3, 2), H (4, 4). Taking (2, 1), (3, 2) and (4, 4) as the marked pixel points, according to component 1, the interpolation method can obtain 83 <85 <87 <89 <91 <93 <95 <97 <99; according to component 2, the interpolation method can obtain 83 <85.67 <88.34 <91.04 <93.68 <96.35 <99; and according to component 3, the interpolation method can obtain 83 <85.67 <88.34 <91.04 <93.68 <96.35 <99. Therefore, the gray prediction value of the pixel point (1, 1) is 85, the gray loss value is , the gray prediction value of the pixel point (1, 2) is 87, the gray loss value is , the gray prediction value of the pixel point (1, 3) is 89, the gray loss value is , the gray prediction value of the pixel point (1, 4) is 91, the gray loss value is , the gray prediction value of the pixel point (2, 2) is , the gray loss value is , the gray prediction value of the pixel point (2, 3) is , the gray loss value is , the gray prediction value of the pixel point (2, 4) is , the gray loss value is , the gray prediction value of the pixel point (3, 1) is the gray loss value of (3, 3) is the gray prediction value of (3, 4) is the gray loss value of (3, 4) is the gray prediction value of (4, 1) is the gray loss value of (4, 1) is the gray prediction value of (4, 2) is the gray loss value of (4, 2) is the gray prediction value of (4, 3) is the gray loss value of (4, 3) is the gray prediction value of (4, 3) is the gray loss value of (4, 3) is wherein represents a rounding symbol, represents an absolute value symbol. The average value of the gray loss values of all pixel points is less than a loss threshold value 5. Therefore, the supplementary information includes the coordinates (2, 1), (3, 2), (4, 4) of the marked pixel points and the gray values 83, 99, 99 of the marked pixel points.
[0105] S5, encrypting the supplementary information and transmitting the encryption result to the receiving end together with the ciphertext image.
[0106] Specifically, in order to ensure the confidentiality and integrity of the supplementary information in the transmission process, the supplementary information is encrypted by using an asymmetric encryption algorithm. The encryption result is transmitted to the receiving end together with the ciphertext image.
[0107] It should be noted that the asymmetric encryption algorithm has high security but large calculation overhead, and is suitable for encryption of small data. The data amount of the supplementary information is very small, and the data amount of the sensitive image to be transmitted is large. Therefore, the supplementary information is encrypted by using the asymmetric encryption algorithm, and the sensitive image to be transmitted is not encrypted by using the asymmetric encryption algorithm.
[0108] Specifically, the asymmetric encryption algorithm includes but is not limited to RSA, ECC (Elliptic Curve Cryptography) and the like. In this embodiment, the RSA algorithm is used to encrypt the supplementary information: the sending end uses the public key of the receiving end to encrypt the supplementary information, and the receiving end uses its own private key to decrypt the encryption result. The key length of the RSA algorithm can be set according to security requirements, for example, 2048 bits or 4096 bits.
[0109] Further, after the receiving end receives the ciphertext image and the encryption result of the supplementary information, the ciphertext image is decrypted, specifically:
[0110] 1. The receiving end uses the private key to decrypt the received encryption result of the supplementary information, and obtains the coordinates and gray values of the marked pixel points.
[0111] 2. The receiver uses scrambling parameters (such as the chaos parameters and number of iterations involved in the Arnold mapping) agreed upon with the sender to descramble the ciphertext image and recover the LBP image.
[0112] 3. Based on the recovered LBP image, the method in step S4 is used to infer the relationship between the gray values of each pixel according to the LBP feature values of the pixels.
[0113] 4. Based on the coordinates and grayscale values of the marked pixels obtained from decryption, and the relationship between the grayscale values of each pixel, the grayscale values of all pixels are recovered by interpolation to obtain the decrypted image.
[0114] For example, Figure 10 for Figure 16 The corresponding decrypted image, Figure 11 for The corresponding decrypted image.
[0115] This invention also discloses a data transmission system for a network security platform, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a data transmission method for a network security platform according to the present invention.
[0116] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
Claims
1. A data transmission method for a network security platform, characterized by, The method comprises the following steps: acquiring an image to be transmitted; acquiring LBP feature values of each pixel point in the image to be transmitted, and constructing an LBP image by using the LBP feature values of all the pixel points; performing scrambling on the LBP image to obtain a ciphertext image; inference of a size relationship of the gray values of each pixel point according to the LBP feature values of the pixel points, selection of a pixel point with a local minimum gray value, a pixel point with a local maximum gray value and a plurality of intermediate pixel points as marker pixel points according to the size relationship, including: selection of all the pixel points with the local minimum gray values and all the pixel points with the local maximum gray values as initial marker pixel points; prediction of the gray values of the remaining pixel points by using an interpolation method based on the gray values of all the marker pixel points and the size relationship of the gray values of the pixel points, obtaining of a gray prediction value of each pixel point, and calculation of a gray loss value of each pixel point as a difference between the gray prediction value and the gray value of the pixel point; in response to a mean value of the gray loss values of all the pixel points being not less than a preset loss threshold, the pixel point with the maximum gray loss value is also selected as a marker pixel point; the acquisition and judgment of the gray loss value are repeated until the mean value of the gray loss values of all the pixel points is less than the preset loss threshold, and all the marker pixel points are obtained; and recording of the coordinates and the gray values of the marker pixel points as supplementary information; the acquisition process of the pixel point with the local minimum gray value and the pixel point with the local maximum gray value comprises the following steps: construction of a gray directed graph according to the size relationship of the gray values of the pixel points: each pixel point is regarded as a node; if the gray values of two adjacent pixel points are the same in the size relationship of the gray values obtained, the two pixel points are merged into one node; if the gray values of two adjacent pixel points are different, a directed edge is constructed between the two pixel points, and the directed edge is directed from the pixel point with the smaller gray value to the pixel point with the larger gray value; the pixel point corresponding to a node with only an out-degree in the gray directed graph is selected as the pixel point with the local minimum gray value; and the pixel point corresponding to a node with only an in-degree in the gray directed graph is selected as the pixel point with the local maximum gray value; encryption of the supplementary information, and transmission of the encryption result and the ciphertext image to a receiving end.
2. The data transmission method for a network security platform according to claim 1, wherein, The method comprises the following steps: For each pixel point in the image to be transmitted , the 8 neighborhood pixel points of the pixel point are sorted according to a preset rule, the gray values of each neighborhood pixel point are compared with the gray value of the pixel point , if the gray value of the neighborhood pixel point is greater than or equal to the gray value of the pixel point , it is marked as 1, otherwise it is marked as 0; according to the order of sorting the neighborhood pixel points, the obtained 8 marks form an 8-bit binary number, and the 8-bit binary number is converted into a decimal number to obtain the LBP feature value of the pixel point .
3. The data transmission method for a network security platform according to claim 2, wherein, the sorting of the eight neighborhood pixel points of the pixel point according to a preset rule comprises the following steps: a chaotic sequence is obtained by using a chaotic mapping method, each element in the chaotic sequence is multiplied by 8 and then rounded up to obtain an integer in the range of [1, 8] to form a sorting sequence; for each pixel point in the image to be transmitted, the eight neighborhood pixel points of the pixel point are sorted by using a variable-length Joseph algorithm according to the sorting sequence.
4. The data transmission method for a network security platform according to claim 1, wherein, The inference of the size relationship of the gray values of each pixel point according to the LBP feature values of the pixel points comprises the following steps: For any one pixel point, an inequality of gray scale values between the pixel point and neighboring pixel points is constructed according to the LBP feature value of the pixel point; the inequalities of gray scale values between all neighboring pixel points are obtained by analyzing the LBP values of all pixel points; and the size relationship between the gray scale values of the pixel points is obtained by concatenating the inequalities of gray scale values between all neighboring pixel points.
5. The data transmission method for a network security platform according to claim 1, wherein, The supplementary information is encrypted, including: encrypting the supplementary information by using an asymmetric encryption algorithm.
6. The data transmission method for a network security platform according to claim 1, wherein, The LBP image is scrambled, including: scrambling the LBP image by using Arnold mapping.
7. The data transmission method for a network security platform according to claim 1, wherein, If the image to be transmitted is an RGB image, each channel of the RGB image is regarded as a gray scale image respectively to perform the operations of LBP image acquisition, scrambling and supplementary information acquisition.
8. A data transmission system for a cyber-security platform, characterized by, The method comprises the steps of: A processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, a network security platform data transmission method according to any one of claims 1-7 is realized.
Citation Information
Patent Citations
Encrypted image reversible data hiding method and system based on high-order pixel compression in big data environment
CN119676372A