Authentication method based on multi-scale partitioning and improved multi-channel IPVO

By adopting multi-scale blocking in image processing and improving the authentication method of multi-channel IPVO, the problems of insufficient watermark embedding in some blocks and insufficient tampering detection accuracy are solved, achieving efficient authentication of images and improving visual quality.

CN118657650APending Publication Date: 2024-09-17HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410714436.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In the existing technology, the authentication watermark embedded in some blocks is insufficient, resulting in low authentication effect, and the 4×4 block tampering detection accuracy is insufficient.

Method used

An authentication method based on multi-scale blocking and improved multi-channel IPVO is adopted, by dividing the image into homogeneous blocks and non-homogeneous blocks, using singular value decomposition and adaptive MSB algorithm to generate authentication watermarks, and constructing different blocks through logistic mapping functions The mapping relationship between them is performed multiple times to embed and extract to improve the authentication effect.

Benefits of technology

It realizes pixel compensation and secondary authentication of images, improves image visual quality and authentication effect, can effectively detect image tampering and improve detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657650A
    Figure CN118657650A
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an authentication method based on multi-scale partitioning and improved multi-channel IPVO, and the method comprises the steps: firstly decomposing an original image into homogeneous blocks and non-homogeneous blocks; singular value decomposition and an MSB algorithm are adopted for the homogeneous blocks to generate homogeneous block authentication watermarks, and block mean values are adopted for the non-homogeneous blocks to generate non-homogeneous block authentication watermarks. And constructing three different mapping relationships between homogeneous blocks, between non-homogeneous blocks and non-homogeneous blocks, and between homogeneous blocks and non-homogeneous blocks. Embedding the watermarks generated by the homogeneous blocks into the corresponding homogeneous blocks by using an IPVO algorithm, embedding the watermarks generated by the non-homogeneous blocks into the corresponding non-homogeneous blocks by using difference expansion, then embedding the watermarks generated by the homogeneous blocks into the corresponding non-homogeneous blocks by using difference expansion, embedding the watermarks generated by the non-homogeneous blocks into the corresponding homogeneous blocks by using IPVO, and finally embedding the watermarks generated by the homogeneous blocks into the corresponding homogeneous blocks by using IPVO. And carrying out secondary authentication on the receiver. Compared with the prior art, the method has the advantages that the visual quality, the embedding capacity and the tampering detection effect are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an authentication method based on multi-scale blocking and improved multi-channel IPVO. Background Art

[0002] In order to prevent images from being attacked, destroyed, tampered, etc. during network transmission, most images use digital watermarking methods to detect image tampering, but this cannot protect specific images, such as medicine, chemical engineering, justice, and other fields that have strict requirements on image quality. Therefore, based on the characteristics of the image itself, we use a reversible watermarking method to authenticate the content of the image, which can not only authenticate the image, but also restore the original carrier image without distortion while extracting the authentication information.

[0003] In 2014, (Lo CC, Hu Y CA novel reversible image authentication scheme for digital images[J]. Signal processing, 2014, 98: 174-185), Lo et al. first proposed a reversible authentication method with tampering location capability. The method divides the image into N sub-blocks, selects the pixel in the middle of each sub-block as the reference value, and constructs a prediction error histogram using the difference between the reference value and other pixels in the block. Then, the prediction error histogram shift method is used to embed the N-bit authentication code into each sub-block.

[0004] Zhong Yiyou, Huang Fangjun. Efficient image reversible authentication method based on block[J]. Journal of Software, 2023, 34(12): 5848-5861. Aiming at the problem that some areas with complex textures in the image cannot be effectively protected, a new image reversible authentication method is proposed. The image is divided into differential blocks and translation blocks, and different reversible methods are used to embed them. In order to improve the authentication effect, a hierarchical embedding method is also adopted. In the same year, Hussan M, Parah SA, Qureshi G J. Reversible data hiding framework with content authentication capability for e-health[J]. Multimedia Tools and Applications, 2023: 1-19 proposed a reversible embedding framework that can effectively protect data in addition to verifying the content at the receiving end. A block-based histogram shift mechanism is used to reversibly embed secret data and ensure its security. To facilitate content authentication and detect any tampering in the received image, a message authentication bit vector (MABV) or message authentication code (MAC) is calculated from the region of interest (ROI) of the cover image and embedded in the region of no interest (RONI) of the cover image.

[0005] The present invention is proposed to solve the problem that Lo et al. did not embed authentication watermarks in some blocks, resulting in low authentication effect, and Zhong et al. had insufficient tampering detection accuracy in 4×4 blocks. Summary of the invention

[0006] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides an authentication method based on multi-scale blocking and improved multi-channel IPVO, which can perform pixel compensation on the pixels generated after partially embedding watermarks, and can also perform secondary authentication on the image, thereby improving the visual quality of the image and improving the authentication effect.

[0007] Technical solution: The present invention provides an authentication method based on multi-scale block and improved multi-channel IPVO, including a watermark embedding method, which specifically includes the following steps:

[0008] Decompose the original image into homogeneous blocks and non-homogeneous blocks;

[0009] For homogeneous blocks, singular value decomposition and adaptive MSB algorithm are used to generate homogeneous block authentication watermarks, and for non-homogeneous blocks, block mean is used to generate non-homogeneous block authentication watermarks;

[0010] According to the logistic mapping function, three different mapping relationships between homogeneous blocks, non-homogeneous blocks and non-homogeneous blocks, and homogeneous blocks and non-homogeneous blocks are constructed;

[0011] Embed the watermark generated by the homogeneous block into the corresponding homogeneous block using the IPVO algorithm, and embed the watermark generated by the non-homogeneous block into the corresponding non-homogeneous block using difference expansion. Thus, the first embedding is completed.

[0012] Then, embed the watermark generated by the homogeneous block into the corresponding non-homogeneous block using difference expansion, and embed the watermark generated by the non-homogeneous block into the corresponding homogeneous block using the IPVO algorithm to complete the second embedding.

[0013] Further, when decomposing the multi-original image into homogeneous blocks and non-homogeneous blocks, assume that a given 8-bit grayscale image I(i, j) of M×N, 0 < I(i, j) < 255, is scanned from top to bottom and from left to right, and the rectangular image is divided into 4 equal-sized square blocks. Then, judge whether the 4 square blocks meet the uniformity criterion. If they meet, the current block remains unchanged; otherwise, continue to decompose them into four square blocks and judge whether they meet the standard until all blocks meet the given standard. The decomposition criterion is expressed as:

[0014] (P max -P min ) > (gl - 1) × γ, γ ∈ [0, 1] (1)

[0015] In the formula, P max and P min are the maximum pixel and minimum pixel in the square block respectively; gl is the gray level of the pixel; γ is a decimal within the range of [0, 1]; when the difference between the maximum pixel and the minimum pixel in the square block is greater than (gl - 1) × γ, the current square block needs to be further divided. According to the block division method, the image is divided into non-fixed sizes until it is divided into 4×4 blocks;

[0016] Divide the original image into non-homogeneous I1 blocks and homogeneous blocks I2, sort the obtained image sub-blocks from top to bottom and from left to right, record the proportion information of each sub-block according to the sorting result sequence, so as to form the decomposition information q of the original image, encode it using Huffman coding, and send the length of the parameter Huf(q) and the coding table to the receiver in the form of a key.

[0017] Further, when generating the authentication watermark for the homogeneous block by using singular value decomposition and the adaptive MSB algorithm, first generate the first part of the authentication watermark AC1(a1, a2 ··· a s ) for the homogeneous block using the adaptive MSB algorithm; then perform singular value decomposition on each homogeneous block, take the integer part of the largest singular value as the key and substitute it into the hash function hash(t, key), and generate a string of sequences AC2(b1, b2 ··· b n), these sequences are used as the second part of the homogeneous block authentication watermark; where t is the sequence of the homogeneous blocks, that is, the divided homogeneous blocks are sorted from left to right and from top to bottom, and t is the number of their corresponding sequence numbers, so the authentication watermark generated by the homogeneous block is AC T =AC1+AC2, that is (a1, a2...a s , b1, b2···b n );

[0018] For non-homogeneous blocks, the block mean is used to generate non-homogeneous block authentication watermarks. Specifically, all pixel values ​​in the non-homogeneous blocks are summed and then the mean is calculated. The mean is converted from decimal to binary, that is, AC F =(c1, c2···c8).

[0019] Furthermore, the adaptive MSB algorithm is improved accordingly. For each homogeneous block of different sizes, a pixel in the upper left corner is selected as the first invariant prediction value, and then a random function rand(k) is used to randomly select a pixel other than the pixel in the upper left corner as another invariant prediction value. The MSB algorithm is used for these two pixels to generate an authentication watermark, and then the k value and the overflow generated during embedding are combined. Figure 1 and sent to the recipient;

[0020] For each homogeneous block, first decompose the N pixels into 8-bit binary, then randomly select another pixel value and use the following formula to obtain the MSB value:

[0021] D i =dif(C1,C k ); k∈[2,N] (2)

[0022] rank(k); k∈[2,N](3)

[0023] Where dif(a,b) returns the maximum number of MSBs shared by a and b, N is the number of pixels in the homogeneous block; C1 represents the first pixel of each homogeneous block, C k Represents random pixels other than the first pixel in a homogeneous block; the maximum number of MSBs is used as the authentication watermark for subsequent embedding, while the two pixels used as prediction values ​​will not participate in the watermark embedding of subsequent homogeneous blocks.

[0024] Furthermore, the watermark generated by the homogeneous block is embedded into the corresponding homogeneous block using the IPVO algorithm, and the watermark generated by the non-homogeneous block is embedded into the corresponding homogeneous block using the IPVO algorithm. The specific operations are as follows:

[0025] Firstly, the IPVO algorithm is improved. For an image block, the maximum pixel and the minimum pixel are used to make prediction differences respectively. The number of peak points of the prediction difference 2 and 3 is accumulated to the peak point 1, and the number of peak points of the prediction difference 2 and 3 is saved and sent to the receiver for subsequent watermark extraction. The number of peak points of the prediction difference -1 and -2 is accumulated to the peak point 0, and the number of peak points of -1 and -2 is saved and sent to the receiver.

[0026] When embedding the watermark, the prediction error value is first converted into a histogram, and the prediction difference values ​​1, 2, and 3 are shifted as a whole, and the prediction difference values ​​-2, -1, and 0 are shifted as a whole.

[0027] Furthermore, the sizes of homogeneous blocks are different, and the number of embedded authentication watermarks cannot be determined. When the watermarks generated by homogeneous blocks are embedded into the corresponding homogeneous blocks using the IPVO algorithm, the authentication watermark AC T In the example, after AC1 is embedded, AC2 will continue to generate watermarks until the current homogeneous block is fully embedded; the size of the non-homogeneous block is determined and fixed, and each block generates an 8-bit authentication watermark. When the watermark generated by the non-homogeneous block is embedded in the corresponding homogeneous block using the IPVO algorithm, that is, AC F When embedding into a homogeneous block, the 8-bit authentication watermark will be repeatedly embedded until it is full; when the watermark generated by the homogeneous block is embedded into the corresponding non-homogeneous block using differential expansion, the second embedding will embed a total of 8 bits, and AC will be selected T The first 8 bits of the authentication watermark are embedded in the non-homogeneous blocks.

[0028] Furthermore, during the first embedding, the watermark is embedded in the non-homogeneous block using the difference expansion method to cause overflow, marking the pixels of 0, 1, 254 and 255 in the image block, and reassigning 0 and 1 to 2 and 3, and 254 and 255 to 252 and 253, and the position information is directly sent to the receiver for later image recovery.

[0029] Furthermore, a watermark extraction method is also included, which specifically includes the following steps:

[0030] The authentication watermark is extracted from the watermarked image using the inverse process, and the authentication watermark is generated again based on the image embedded with the authentication watermark using the same authentication watermark generation method, and the two are compared for authentication; the specific process is as follows:

[0031] Step 1: Divide the image into homogeneous blocks and non-homogeneous blocks according to the data sent by the sender;

[0032] Step 2: For homogeneous blocks, singular value decomposition and adaptive MSB algorithm are used to generate homogeneous block authentication watermarks. For non-homogeneous blocks, block mean is used to generate non-homogeneous block authentication watermarks and then generate authentication watermark AC. T and AC F;

[0033] Step 3: In the homogeneous block, use the inverse process of IPVO algorithm to extract the second layer embedded watermark AC F ', and the watermark AC generated by the corresponding non-homogeneous block F Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with.

[0034] In non-homogeneous blocks, the second layer of embedded watermark AC is extracted by using the inverse process of difference expansion T ', and the watermark AC generated by the corresponding homogeneous block T Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. This is the end of the first level of authentication.

[0035] Step 4: Based on step 3, the second layer of authentication is performed on the untampered blocks. In the homogeneous blocks, the IPVO algorithm is used to extract the watermark AC embedded in the first layer in the reverse process. T ', and the watermark AC generated by the corresponding homogeneous block T Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with.

[0036] In non-homogeneous blocks, the first layer of embedded watermark AC is extracted by using the inverse process of difference expansion F ', and compare it with the watermark generated by the corresponding non-homogeneous block. If they are the same, no tampering has occurred. If they are different, this area has been tampered with, and the second-level authentication ends here.

[0037] Furthermore, before performing the first layer of authentication in step three, the information and overflow map sent from the sender are received first. The information includes the length and coding table of the parameter Huf(q), the random function rand(k) of the adaptive MSB algorithm, the number of peak points with predicted difference values ​​of 2 and 3 in the IPVO algorithm, the number of peak points with predicted difference values ​​of -1 and -2 in the IPVO algorithm, and the overflow map constructed by the overflow caused by embedding the watermark in the non-homogeneous block using the difference expansion method during the first embedding.

[0038] Beneficial effects:

[0039] 1. In order to further improve the tampering detection effect, the present invention proposes an authentication algorithm based on multi-scale block and improved multi-channel IPVO. This scheme uses multi-scale decomposition to block the image and adopts various methods to generate an authentication watermark that fits the characteristics of the image itself. The logistic mapping function is used to generate the corresponding relationships between different types of blocks. The watermark generated by the homogeneous blocks is embedded into the corresponding homogeneous blocks, and the watermark generated by the non-homogeneous blocks is embedded into the corresponding non-homogeneous blocks to complete the first embedding. Then, the watermark generated by the homogeneous blocks is embedded into the corresponding non-homogeneous blocks, and the watermark generated by the non-homogeneous blocks is embedded into the corresponding homogeneous blocks to complete the second embedding. Under this operation, pixel compensation can be performed on the pixels generated after partial watermark embedding, and the image can also be secondarily authenticated, which is expected to improve the visual quality of the image and the authentication effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is the flowchart of watermark embedding of the present invention;

[0041] Figure 2 is the flowchart of watermark extraction and authentication of the present invention;

[0042] Figure 3 is the multi-scale segmentation diagram of the Lena image of the present invention;

[0043] Figure 4 is the schematic diagram of peak point accumulation of the present invention;

[0044] Figure 5 is the experimental image of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and cannot be used to limit the protection scope of the present invention.

[0046] An authentication method based on multi-scale block and improved multi-channel IPVO disclosed by the present invention includes a watermark embedding method, and the specific embedding process is as follows:

[0047] Step 1: Given an 8-bit grayscale image I(i, j) (0 < I(i, j) < 255) of M×N and scanning it from top to bottom and from left to right, the original image is multi-scale decomposed using formula (1), and it is divided into non-homogeneous I1 blocks and homogeneous blocks I2, and the length of the parameter Huf(q) and the coding table are sent to the recipient in the form of a key.

[0048] For multi-scale decomposition, the image F is divided into multiple scales from the whole to the part, so as to obtain sub-image blocks F of different scales i,j , where i = 1, 2...d. i represents the segmentation scale; j = 1...4 i-1represents the number of sub-blocks at each scale. Due to the limited image size, the segmentation scale is also limited. Segmentation methods such as Figure 3 As shown in the figure. From left to right, they are the segmentation of the 1st to the 3rd scale. The whole image is the sub-block F obtained after the first scale decomposition. 1,1 , and then divide the entire image into four sub-blocks F 2,1 、F 2,2 、F 2,3 and F 2,4 ; Each sub-block is called a second-scale sub-block, and then they are divided until the maximum scale set is reached.

[0049] Since the traditional multi-scale decomposition also belongs to the fixed-size block decomposition method, this paper improves the multi-scale decomposition. The improved image multi-scale decomposition is to divide the rectangular image into 4 square blocks of equal size, and then judge whether these 4 square blocks meet the uniformity criterion. If satisfied, the current block remains unchanged; otherwise, continue to decompose into four square blocks and judge whether they meet the standard until all blocks meet the given standard. The decomposition criterion can be expressed as:

[0050] (P max -P min )>(gl-1)×γ,γ∈[0,1] (1)

[0051] In formula (1), P max and P min are the maximum pixel and minimum pixel in the square block respectively; gl is the gray level of the pixel; γ is a decimal in the range [0,1]. The criterion is that when the difference between the maximum and minimum pixel values ​​in the square block is greater than (gl-1)×γ, the block needs to be further divided. According to the block division method, the image is divided into blocks of unfixed size until it is divided into 4×4 blocks. In addition, from the division results, the decomposed image blocks have pixels with high uniformity, which is suitable for lossless watermark embedding.

[0052] After multi-scale decomposition, the size information of each block can be converted into binary form. Each sub-block after decomposition is encoded by size, as shown in Table 1 below: After multi-scale decomposition, the obtained image sub-blocks are sorted (from top to bottom, from left to right), and the proportion information of each sub-block is recorded in order according to the sorting result, thereby forming the decomposition information q of the original image. Since there are a small number of large blocks decomposed, Huffman coding can be used. In order to further reduce the length of the image decomposition information, it is recorded as Huf(q). In order to ensure the security of the algorithm, the length of the parameter Huf(q) and the coding table are sent to the receiver in the form of a key.

[0053] Table 1 Scale coding of image blocks after multi-scale decomposition

[0054]

[0055] Step 2: First, use the adaptive MSB algorithm to generate the first authentication watermark AC1 (a1, a2...a s ). Then, singular value decomposition is performed on each homogeneous block, and the largest singular value is rounded and substituted into the hash function hash(t, key) as the key. The hash function generates a sequence AC2(b1, b2···b n ), and use these sequences as the second part of the homogeneous block authentication watermark. Where t is the sequence of the homogeneous blocks (sort the divided homogeneous blocks from left to right and from top to bottom, and t is their corresponding sequence number). So the authentication watermark generated by the homogeneous block is AC T =AC1+AC2, that is (a1, a2...a s , b1, b2···b n ).

[0056] Add up all pixel values ​​in the non-homogeneous block and calculate the average, convert the average from decimal to binary, that is, AC F =(c1, c2...c8). Since the watermark is embedded in the non-homogeneous block by differential expansion, the size of the block mean before and after embedding will not be changed, thus ensuring reversibility.

[0057] The adaptive MSB algorithm refers to a method in which, after receiving the encrypted image, the data hider uses the upper left corner pixel to predict the MSB shared by the remaining pixels and the target pixel for each pixel block, so that the remaining pixels can adaptively retain the remaining unshared bits, thereby freeing up embedding space.

[0058] In this paper, in order to ensure the reversibility and authentication effect of the algorithm, the adaptive MSB algorithm is improved accordingly. For each homogeneous block of different sizes, a pixel in the upper left corner is selected as the first invariant prediction value, and then a random function rand(k) is used to randomly select a pixel from the upper left corner as another invariant prediction value. The MSB algorithm is used for these two pixels to generate the authentication watermark, and then the k value and the overflow value are combined. Figure 1 For each homogeneous block, first decompose the N pixels into 8-bit binary, then randomly select another pixel value and use the following formula to obtain the MSB value:

[0059] D i =dif(C1,C k );k∈[2,N] (2)

[0060] rank(k); k∈[2,N] (3)

[0061] Where dif(a,b) returns the maximum number of MSBs shared by a and b, N is the number of pixels in this homogeneous block. C1 represents the first pixel of each homogeneous block, C k Represents random pixels other than the first pixel in the homogeneous block. For example, because 127 = (01111111), 98 = (01100010), we can get dif (127,98) = 011. This means that the MSB value shared by the binary 8 bits of 127 and 98 is at most 3, so we will use the three bits as the authentication watermark for subsequent embedding. The two pixels used as prediction values ​​will not participate in the subsequent watermark embedding of the homogeneous block.

[0062] Step 3: Use the Logistic chaotic function to establish three mapping functions between homogeneous blocks and homogeneous blocks, non-homogeneous blocks and non-homogeneous blocks, and homogeneous blocks and non-homogeneous blocks.

[0063] The Logistic chaotic function is a simple chaotic mapping system, as shown in the following formula (11). μ∈(0, 4], x∈[0, 1], when x∈[0, 1], the Logistic model is in a chaotic state, which can produce a non-periodic, non-convergent sequence. Therefore, this algorithm uses the Logistic function to construct corresponding connections between blocks, and the parameters of the three mapping functions μ1≠μ2≠μ3.

[0064] x n+1 =μx n (1-x n ) (11)

[0065] Step 4: The watermark generated by the homogeneous block is embedded into the corresponding homogeneous block using the improved multi-channel IPVO algorithm. At the same time, the watermark generated by the non-homogeneous block is embedded into the corresponding non-homogeneous block using the difference expansion method. At this point, the first layer of authentication watermark embedding is completed.

[0066] He et al. proposed a multi-channel IPVO algorithm in 2020. The algorithm uses the maximum pixel and the minimum pixel as the prediction difference respectively to perform pixel compensation on the pixels after embedding the watermark, increasing the embedding capacity while improving the visual quality of the image (He W, Cai Z. An insight into pixel value ordering prediction-based prediction-error expansion [J]. IEEE Transactions on Information Forensics and Security, 2020, 15: 3859-3871). By additionally considering the pixel position, the predicted pixel becomes a relatively smaller pixel in the IPVO-based PEE. This use of spatial correlation can also adapt to multi-pass prediction. For an image block, the prediction error e max (i) is expanded to:

[0067] e max (i) = P u -P v (4)

[0068] Where u = min(σ(n), i), v = max(σ(n), i), i∈{σ(1),σ(2)…σ(n-1)}. For data embedding and b∈{0,1}, and correspondingly P i Modified to:

[0069]

[0070] Next, the pixels are sorted in ascending order again to obtain a new sequence (P σ(1) ',P σ(2) '……P σ(n) '). Then, the prediction error e min (i) Calculated as:

[0071] e min (i) = P s -P t (6)

[0072] where s = min(σ(1),i), t = max(σ(1),i), i∈{σ(2)',σ(3)'...σ(n)'}. For data embedding, we modify e similarly according to (4) min (i), and accordingly P i ' was modified to:

[0073]

[0074] In order to increase the embedding capacity of the authentication watermark and improve the authentication effect, the present invention makes some improvements to the above method. Since the embedded peak points are 0 and 1, in order to increase the number of these two peak points, the number of difference values ​​2 and 3 is accumulated to the peak point of 1, and the number of 2 and 3 is saved and sent to the receiver for subsequent watermark extraction. Similarly, the number of difference values ​​-1 and -2 is accumulated to the peak point of 0, and the number of -1 and -2 is saved and sent to the receiver, such as Figure 4 shown.

[0075] When embedding the watermark, first convert the prediction error value into a histogram, add the number of difference values ​​2 and 3 to the peak point of 1, and the number of -1 and -2 to the peak point of 0, and perform histogram shift on the prediction difference values ​​1, 2, and 3 as a whole. The same is true for the prediction difference values ​​-2, -1, and 0. Figure 4 (b) as shown.

[0076] At the receiving end, the image blocks are first sorted to obtain (P σ(1) ',P σ(2) '……P σ(n) ') and calculate e min (i)

[0077] e min (i) = P s -P t (8)

[0078] where s = min(σ(1),i), t = max(σ(1),i), i∈{σ(2)',σ(3)'…σ(n)'}. For data embedding, modify e min (i), and accordingly P i ” was modified to:

[0079]

[0080] Then, according to the message sent by the transmitter, the number of differences 2, 3, -1, and -2 is restored, and these differences are summed with the minimum value ps to obtain the sequence (P σ(1) ',P σ(2) '……P σ(n) ').

[0081] After that, sort again and calculate the label prediction error e max (i). Then, the additional hidden data is similarly extracted according to equation (10), and the pixel value is restored as:

[0082]

[0083] Finally, according to the message sent by the transmitter, the number of difference values ​​2, 3, -1, and -2 is restored, and then the pixel value of the original image block is obtained by subtracting these differences from the maximum value pt.

[0084] Step 5: Construct overflow map. The first part is because embedding watermarks in non-homogeneous blocks by differential expansion will cause overflow, so the pixels of 0, 1, 254 and 255 in the image are marked, and 0 and 1 are reassigned to 2 and 3, and 254 and 255 are assigned to 252 and 253, and the position information is directly sent to the receiver for later image recovery. The second part is a small amount of information generated when using the improved multi-channel IPVO algorithm to record the number of differences 2 and 3 and the number of differences -1 and -2.

[0085] Step 6: Based on step 4, the authentication watermark generated by the homogeneous block is embedded into the non-homogeneous block using differential expansion. At the same time, the authentication watermark generated by the non-homogeneous block is embedded into the homogeneous block using the improved multi-channel IPVO algorithm. At this point, the second layer of authentication watermark embedding is completed.

[0086] When embedding watermarks in homogeneous blocks, the first pixel and random pixels do not participate in watermark embedding. Since the sizes of homogeneous blocks are different, the number of embedded authentication watermarks cannot be determined. When the watermark generated by the homogeneous block is embedded in the corresponding homogeneous block using the IPVO algorithm, the AC T In the example, after AC1 is embedded, AC2 will continue to generate watermarks until the current homogeneous block is fully embedded. When the size of the non-homogeneous block is determined and each block generates an 8-bit authentication watermark, the watermark generated by the non-homogeneous block is embedded into the corresponding homogeneous block using the IPVO algorithm, that is, AC F When embedding into a homogeneous block, the 8-bit authentication watermark will be repeatedly embedded until it is full. When the watermark generated by the homogeneous block is embedded into the corresponding non-homogeneous block using differential expansion, the second embedding will embed a total of 8 bits, and AC will be selected. T The first 8 bits of the authentication watermark are embedded in the non-homogeneous blocks.

[0087] The inverse process is used to extract the authentication watermark from the watermarked image, and the same authentication watermark generation method is used to generate the authentication watermark again based on the image embedded with the authentication watermark, and the two are compared for authentication. Figure 2 As shown, the specific steps are as follows:

[0088] The steps of watermark extraction and tampering detection are as follows:

[0089] Step 1: Divide the image into homogeneous blocks and non-homogeneous blocks according to the data sent by the sender.

[0090] Step 2: Generate authentication watermark AC for homogeneous blocks and non-homogeneous blocks again using the watermark embedding method in step 2 above T and AC F,For the specific process, please refer to step 2 of the watermark embedding process.

[0091] Step 3: First receive the information and overflow graph from the sender. In the homogeneous block, use the multi-channel IPVO inverse process to extract the second layer embedded watermark AC F ', and the watermark AC generated by the corresponding non-homogeneous block F Compare them, if they are the same, no tampering has occurred, if they are different, this area has been tampered with.

[0092] In the non-homogeneous blocks, the second layer of embedded watermark AC is extracted by using the inverse process of difference expansion T ', and the watermark AC generated by the corresponding homogeneous block T Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. At this point, the first level of authentication is completed.

[0093] First, receive the information and overflow map sent from the sender. The information includes the length and coding table of the parameter Huf(q), the random function rand(k) and overflow map of the adaptive MSB algorithm, the number of peak points with predicted difference values ​​of 2 and 3 in the IPVO algorithm, the number of peak points with predicted difference values ​​of -1 and -2 in the IPVO algorithm, and the overflow map constructed by the overflow caused by embedding the watermark in the non-homogeneous block using the difference expansion method during the first embedding.

[0094] Step 4: Based on step 3, the second layer of authentication is performed on the untampered blocks. In the homogeneous blocks, the multi-channel IPVO inverse process is used to extract the first layer embedded watermark AC T ', and the watermark AC generated by the corresponding homogeneous block T Compare them, if they are the same, no tampering has occurred, if they are different, this area has been tampered with.

[0095] In non-homogeneous blocks, the first layer of embedded watermark AC is extracted by using the inverse process of difference expansion F ', and compare it with the watermark generated by the corresponding non-homogeneous block. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. At this point, the second layer of authentication is completed.

[0096] In order to accurately evaluate the performance of the algorithm proposed in this paper, this experiment selected 8 8-bit standard grayscale images with a size of 512×512 and different texture features as test images, such as Figure 5As shown, Plane, Baboon, Boat, Barbara, Elaine, Lake, Lena, Peppers, all of which are from the USC-SIPI database. This simulation experiment is based on the Windows 10 system and is simulated using Python. The PSNR (peak signal-to-noise ratio) value and SSIM (structural similarity) are used to measure the visual quality of the image after embedding information, and the correct detection rate (CR) is used to evaluate the authentication performance of the proposed method.

[0097]

[0098] Among them, C block Indicates the number of tampered blocks detected correctly, T block Indicates the actual number of tampered blocks.

[0099] 1. Comparison of watermark image quality

[0100] Table 2 shows the PSNR and SSIM values ​​of the test image after the authentication code is embedded. From Table 2, it can be seen that the PSNR and SSIM values ​​of the watermark image obtained by this method are lower than those of the previous two methods, and are similar to those of Comparison 1 (Zhong Yiyou, Huang Fangjun. Efficient image reversible authentication method based on block division [J]. Journal of Software, 2023, 34(12): 5848-5861). This is because in order to ensure that each sub-block of the image is authenticated, the number of authentication watermarks embedded in homogeneous blocks and watermarks embedded in non-homogeneous blocks is large, and the non-homogeneous blocks adopt the differential expansion embedding method, which leads to a large amount of modification to the original image. Comparison 2 (Yao H, Wei H, Qin C, et al. A real-time reversible image authentication method using uniform embedding strategy [J]. Journal of Real-Time Image Processing, 2020, 17: 41-54) and Comparison 3 (Attack and Improvement of Authentication Scheme Based on Reversible Information Hiding Technology [J]. Journal of Information Security, 2022, 7 (1): 56-65) use IPVO embedding to reduce the amount of modification, so the former two schemes are better than this algorithm in visual quality. Although the visual quality of the proposed method has decreased, in general, the human eye is usually acceptable to the distortion perception of PSNR greater than 38dB. In this paper, except for Peppers and Boat, the PSNR values ​​of other watermark images are greater than 38dB. At the same time, the SSIM values ​​of the proposed method are all above 0.99, indicating that the structural similarity between the watermark image and the original image is high and there is no great difference. The experimental results show that the proposed algorithm can achieve a high authentication effect while ensuring the visual quality of the watermark image is within an acceptable range in the following images.

[0101] Table 2 Comparison of PSNR and SSIM

[0102]

[0103] 2. Comparison of watermark image embedding capacity

[0104] Table 3 compares the embedding capacity provided by the method in this paper with the methods in comparison 2, comparison 3 and comparison 1. It can be seen from the table that the embedding capacity of this paper is higher than that of comparison 2 and comparison 3, but lower than that of comparison 1. In this algorithm, due to the adjustment of the parameter γ, the number of homogeneous blocks and non-homogeneous blocks is different. The non-homogeneous blocks are embedded twice with a fixed 16 bits, while the homogeneous blocks need to be determined according to the specific pixel values ​​in the blocks. According to different image textures, the more homogeneous blocks are divided, the larger the capacity may be, but the more non-homogeneous blocks are divided, the higher the capacity may be. In addition, the embedding capacity has a certain inverse trend with PSNR. These two reference indicators are also relatively contradictory indicators for evaluating images. The higher the PSNR, the fewer the number of embedded watermark bits will be. Therefore, this paper selects a compromise γ to maintain a balance. It can be seen from the table that except for Baboon, which has a very complex texture block, the other images all reach 3 (10 4 )bit, an average of 3.725×(10 4 )bit.

[0105] Table 3 Comparison of embedding capacity (10 4 bit)

[0106]

[0107] In addition, an experimental comparison was made between this algorithm and the multi-channel pixel value sorting algorithm before the improvement. Taking the Lena image as an example, He et al. (He W, Cai Z. An insight into pixel value ordering prediction-based prediction-error expansion[J]. IEEE Transactions on Information Forensics and Security, 2020, 15: 3859-3871) divided the image into 4×4 blocks and then used the multi-channel pixel value sorting method to embed the watermark in 2.13×10 4 bit, while in this paper, the embedding capacity of Lena image is 3.8×10 4 bit, this is because this paper uses a multi-scale decomposition method to divide the image into relatively smooth homogeneous blocks. In homogeneous blocks, multi-channel pixel value sorting is better than directly dividing them into non-overlapping 4×4 blocks. In addition, this paper improves the multi-channel pixel value sorting to make its embedding capacity better. However, after the traditional He et al. used multi-channel pixel value sorting to embed watermarks, the image quality, that is, PSNR, was about 57, while the PSNR of the Lena image in this paper was about 49. This is because in order to authenticate all blocks, this algorithm also uses a difference expansion algorithm for non-homogeneous blocks. Since non-homogeneous blocks are complex and fast, and the pixel gap is too large, the use of a difference expansion algorithm will affect the image quality to a certain extent, so the image quality is lower than that of He et al.

[0108] 3. Comparison of certification performance

[0109] In order to test the authentication effect of the method of the present invention, a variety of tampering attacks are carried out on the Lena watermark images obtained by the four methods. Table 3 is a comparison of the initial correct detection rates obtained by using 4×4, 8×8 and 16×16 blocks as tampering detection units. It can be seen that the detection rates of 4×4, 8×8 and 16×16 blocks are all around 95%. And the detection rate of 4×4 blocks is significantly higher than that of the other three methods. This is because in comparison 2, only 1-bit authentication watermarks can be embedded in most blocks. In order to unify the tampering detection capability, authentication codes of the same bit length are embedded in all sub-blocks in comparison 3. Comparison 1 uses a hash function to generate watermarks, and each block embeds relatively more authentication watermarks. When embedding watermarks in the first round, the differential block is fixed to 1 bit, and the translation block is at least 1 bit and at most 8 bits. Therefore, after two rounds of embedding, each block is embedded with at least 2 bits and at most 16 bits. Compared with the first two algorithms, the number of embedded authentication watermarks increases, and secondary authentication is performed, so the detection performance is better than the first two. In this paper, based on the characteristics of the image itself, the adaptive MSB scheme in the homogeneous block and the mean of the non-homogeneous block are strongly correlated with the image itself, which is more complicated than the above scheme to generate the authentication watermark, so the generated authentication watermark is more in line with the image characteristics. In addition, multi-channel IPVO is used to embed the authentication watermark in the homogeneous block. Each homogeneous block uses the multi-channel IPVO method to embed a watermark far more than 1 bit. In the non-homogeneous block, the differential expansion method is used to embed the watermark. Since the size of the non-homogeneous block is fixed at 4×4, the amount of embedding is 8 bits at a time, and 16 bits twice, which is also much larger than the previous schemes. In addition, this algorithm adopts secondary authentication for both homogeneous blocks and non-homogeneous blocks, so the detection performance is better.

[0110] Table 3 Comparison of correct detection rate

[0111]

[0112]

[0113] However, as the size of the sub-block increases, the tampering detection effect will decrease relatively. Specifically, within the 16×16 sub-block, it is not possible to accurately locate which 4×4 or 8×8 sub-blocks have been tampered with. However, in order to test the effectiveness of this algorithm for 16×16 block authentication of images other than Lena, the proposed method performs four attacks on 16×16 blocks of all images. The data are shown in Table 4 below. Except for Baboon and Peppers, the correct tampering rate of other images is above 80% on average, which is better than the first two methods.

[0114] Table 4 Comparison of 16*16 block attack detection rates

[0115]

[0116] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. An authentication method based on multi-scale block and improved multi-channel IPVO, characterized in that: Including a watermark embedding method, specifically the following steps: Decompose the original image into homogeneous blocks and non - homogeneous blocks; Apply singular value decomposition and the adaptive MSB algorithm to the homogeneous blocks to generate homogeneous - block authentication watermarks, and apply the block mean to the non - homogeneous blocks to generate non - homogeneous - block authentication watermarks; Construct three different mapping relationships between homogeneous blocks and homogeneous blocks, non - homogeneous blocks and non - homogeneous blocks, and homogeneous blocks and non - homogeneous blocks according to the logistic mapping function; Embed the watermark generated from the homogeneous blocks into the corresponding homogeneous blocks using the IPVO algorithm, and embed the watermark generated from the non - homogeneous blocks into the corresponding non - homogeneous blocks using differential expansion. Thus, the first embedding is completed; Then embed the watermark generated from the homogeneous blocks into the corresponding non - homogeneous blocks using differential expansion, and embed the watermark generated from the non - homogeneous blocks into the corresponding homogeneous blocks using the IPVO algorithm to complete the second embedding.

2. According to claim 1, an authentication method based on multi-scale block and improved multi-channel IPVO is characterized in that: When decomposing the original image into homogeneous blocks and non - homogeneous blocks, assume a given 8 - bit grayscale image I(i, j) of size M×N, where 0 < I(i, j) < 255. Scan it from top to bottom and from left to right, divide the rectangular image into 4 equal - sized square blocks, and then determine whether the 4 square blocks meet the uniformity criterion. If they meet, the current block remains unchanged; Otherwise, continue to decompose it into four square blocks and determine whether they meet the standard until all blocks meet the given standard. The decomposition criterion is expressed as: (P max -P min )>(gl-1)×γ,γ∈[0,1] (1) Where P max and P min are the maximum pixel and the minimum pixel in the square block respectively; gl is the gray level of the pixel; γ is a decimal in the range [0,1]; when the difference between the maximum and minimum pixel values ​​in the square block is greater than (gl-1)×γ, the current square block needs to be further divided, and the image is divided into unfixed sizes according to the block division method until it is divided into 4×4 blocks; Divide the original image into non - homogeneous I1 blocks and homogeneous blocks I2, sort the obtained image sub - blocks from top to bottom and from left to right, record the proportion information of each sub - block according to the sorting result sequence, thereby forming the decomposition information q of the original image, encode it using Huffman coding, and send the length of the parameter Huf(q) and the coding table to the receiver in the form of a key.

3. According to claim 1, the authentication method based on multi-scale block and improved multi-channel IPVO is characterized in that: When adopting singular value decomposition and adaptive MSB algorithm to generate homogeneous block authentication watermark, the first part of the authentication watermark AC1 (a1, a2···a s ); then take singular value decomposition for each homogeneous block, round up the largest singular value and substitute it into the hash function hash(t, key) as the key, and the hash function generates a sequence AC2(b1, b2···b n ), these sequences are used as the second part of the homogeneous block authentication watermark; where t is the sequence of the homogeneous blocks, that is, the divided homogeneous blocks are sorted from left to right and from top to bottom, and t is the number of their corresponding sequence numbers, so the authentication watermark generated by the homogeneous block is AC T =AC1+AC2, that is (a1, a2...a s , b1, b2···b n ); For non-homogeneous blocks, the block mean is used to generate non-homogeneous block authentication watermarks. Specifically, all pixel values ​​in the non-homogeneous blocks are summed and then the mean is calculated. The mean is converted from decimal to binary, that is, AC F =(c1, c2···c8).

4. According to claim 3, the authentication method based on multi-scale block and improved multi-channel IPVO is characterized in that: Make corresponding improvements to the adaptive MSB algorithm. For each homogeneous block of different sizes, select a pixel in the upper - left corner as the first invariant prediction value, and then use the random function rand(k) to randomly select another pixel from the pixels except the upper - left - corner pixel as the other invariant prediction value. Use the MSB algorithm for these two pixels to generate the authentication watermark, and then send the k value and the overflow map generated during embedding to the receiver; For each homogeneous block, first decompose N pixels into 8 - bit binary respectively, and then randomly select another pixel value to obtain the MSB value using the following formula: D i =dif(C1,C k );k∈[2,N] (2) rank(k); k ∈ [2,N] (3) Where dif(a,b) returns the maximum number of MSBs shared by a and b, N is the number of pixels in the homogeneous block; C1 represents the first pixel of each homogeneous block, C k Represents random pixels other than the first pixel in a homogeneous block; the maximum number of MSBs is used as the authentication watermark for subsequent embedding, while the two pixels used as prediction values ​​will not participate in the watermark embedding of subsequent homogeneous blocks.

5. The authentication method based on multi-scale block and improved multi-channel IPVO according to claim 1, characterized in that: Embed the watermark generated from the homogeneous blocks into the corresponding homogeneous blocks using the IPVO algorithm, and embed the watermark generated from the non - homogeneous blocks into the corresponding homogeneous blocks using the IPVO algorithm. The specific operations are as follows: First, make improvements to the IPVO algorithm. For an image block, use the maximum pixel and the minimum pixel to make prediction differences respectively. Accumulate the number of peak points of prediction differences 2 and 3 to the peak point of 1, and save and send the number of peak points of prediction differences 2 and 3 to the receiver for subsequent watermark extraction. Accumulate the number of peak points of prediction differences - 1 and - 2 to the peak point of 0, and save and send the number of peak points of - 1 and - 2 to the receiver; When embedding the watermark, the prediction error value is first converted into a histogram, and the prediction difference values ​​1, 2, and 3 are shifted as a whole, and the prediction difference values ​​-2, -1, and 0 are shifted as a whole.

6. The authentication method based on multi-scale block and improved multi-channel IPVO according to claim 3, characterized in that: The sizes of homogeneous blocks are different, and the number of embedded authentication watermarks cannot be determined. When the watermarks generated by homogeneous blocks are embedded into the corresponding homogeneous blocks using the IPVO algorithm, the authentication watermark AC T In the example, after AC1 is embedded, AC2 will continue to generate watermarks until the current homogeneous block is fully embedded; the size of the non-homogeneous block is determined and fixed, and each block generates an 8-bit authentication watermark. When the watermark generated by the non-homogeneous block is embedded in the corresponding homogeneous block using the IPVO algorithm, that is, AC F When embedding into a homogeneous block, the 8-bit authentication watermark will be repeatedly embedded until it is full; when the watermark generated by the homogeneous block is embedded into the corresponding non-homogeneous block using differential expansion, the second embedding will embed a total of 8 bits, and AC will be selected T The first 8 bits of the authentication watermark are embedded in the non-homogeneous blocks.

7. The authentication method based on multi-scale block and improved multi-channel IPVO according to claim 4, characterized in that: During the first embedding, the watermark is embedded in the non-homogeneous block using the difference expansion method to cause overflow, marking the pixels 0, 1, 254 and 255 in the image block, and reassigning 0 and 1 to 2 and 3, and 254 and 255 to 252 and 253, and sending the position information directly to the receiver for later image recovery; the second part is a small amount of information generated when using the improved multi-channel IPVO algorithm.

8. An authentication method based on multi-scale block and improved multi-channel IPVO according to any one of claims 1 to 7, characterized in that: It also includes a watermark extraction method, which specifically includes the following steps: The authentication watermark is extracted from the watermarked image using the inverse process, and the authentication watermark is generated again based on the image embedded with the authentication watermark using the same authentication watermark generation method, and the two are compared for authentication; the specific process is as follows: Step 1: Divide the image into homogeneous blocks and non-homogeneous blocks according to the data sent by the sender; Step 2: For homogeneous blocks, singular value decomposition and adaptive MSB algorithm are used to generate homogeneous block authentication watermarks. For non-homogeneous blocks, block mean is used to generate non-homogeneous block authentication watermarks and then generate authentication watermark AC. T and AC F ; Step 3: In the homogeneous block, use the inverse process of IPVO algorithm to extract the second layer embedded watermark AC F ', and the watermark AC generated by the corresponding non-homogeneous block F Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. In non-homogeneous blocks, the second layer of embedded watermark AC is extracted by using the inverse process of difference expansion T ', and the watermark AC generated by the corresponding homogeneous block T Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. This is the end of the first level of authentication. Step 4: Based on step 3, the second layer of authentication is performed on the untampered blocks. In the homogeneous blocks, the IPVO algorithm is used to extract the watermark AC embedded in the first layer in the reverse process. T ', and the watermark AC generated by the corresponding homogeneous block T Compare them. If they are the same, no tampering has occurred. If they are different, this area has been tampered with. In non-homogeneous blocks, the first layer of embedded watermark AC is extracted by using the inverse process of difference expansion F ', and compare it with the watermark generated by the corresponding non-homogeneous block. If they are the same, no tampering has occurred. If they are different, this area has been tampered with, and the second-level authentication ends here.

9. The authentication method based on multi-scale block and improved multi-channel IPVO according to claim 8, characterized in that: Before performing the first layer of authentication in step 3, the information and overflow map sent from the sender are received first. The information includes the length and coding table of the parameter Huf(q), the random function rand(k) of the adaptive MSB algorithm, the number of peak points with predicted difference values ​​of 2 and 3 in the IPVO algorithm, the number of peak points with predicted difference values ​​of -1 and -2 in the IPVO algorithm, and the overflow map constructed by the overflow caused by embedding the watermark in the non-homogeneous block using the difference expansion method during the first embedding.