A Two-Dimensional Invertible Data Hiding Method Based on Single-Step Bounded Expansion and Mapping Optimization

CN122578784APending Publication Date: 2026-08-14INST OF INT RELATIONS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

2013年12月提出的经典方案,以及后续[2]B.Ou、X.Li、W.Zhang和Y.Zhao,《通过混合维度直方图生成与自适应映射选择方法提升对偶 PEE》,IEEE Trans. Circuits Syst. Video Technol.第29卷,第7期,第2176-2190页,2019年中的改进工作,主要基于T等于1的映射,这类方法虽然能够降低部分嵌入失真,但由于候选映射种类有限,在追求高嵌入容量时,往往需要修改更多的误差对或选择高失真路径,难以保持较高的图像质量,尤其在复杂纹理图像中难以兼顾容量与失真,通常限制最大修改幅度为单位幅度T等于1,导致候选映射空间不足,在高容量需求下,需修改更多误差对或选择高失真路径,致使图像保真度急剧下降,尤其在复杂纹理区域难以兼顾容量与失真;

Benefits of technology

1、本发明通过单步有界扩展机制,能够从基础单位幅度映射递推生成高修改量T大于1的二维映射,避免了直接设计高修改量映射时的组合爆炸问题,显著扩展了候选映射空间,在高嵌入容量需求下,能够利用更丰富的目标状态进行信息嵌入,避免了现有技术中因修改更多误差对或选择高失真路径而导致的图像质量急剧下降问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122578784A_ABST
    Figure CN122578784A_ABST
Patent Text Reader

Abstract

This invention provides a two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization. The method includes image preprocessing and prediction, two-dimensional prediction error histogram construction, basic mapping construction, single-step bounded expansion, generalized distribution constraint mapping optimization, data embedding, and extraction and recovery. The single-step bounded expansion mechanism allows for the recursive generation of two-dimensional mappings with high modification amounts T greater than 1 from a basic unit amplitude mapping, avoiding the combinatorial explosion problem when directly designing high modification amount mappings and significantly expanding the candidate mapping space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and information security, and in particular to a two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization. Background Technology

[0002] Reversible data hiding technology is crucial for embedding secret information while restoring the original image without loss. It is essential in fields such as medicine, military, and record management. Existing technologies mainly balance embedding capacity and image distortion by improving prediction accuracy, constructing prediction error histograms, and designing mapping rules.

[0003] Mainstream spatial domain methods, such as Prediction Error Extension (PEE), generate prediction errors by utilizing neighborhood correlations and extend and shift the error histogram. To further utilize the joint distribution among errors, researchers proposed Paired Prediction Error Extension, which pairs adjacent errors and constructs a two-dimensional prediction error histogram. Combined with multi-histogram modification techniques, regions are divided according to image complexity to optimize distortion performance. However, existing two-dimensional reversible information hiding techniques have the following drawbacks: (1) For example: [1] B.Ou, X.Li, Y.Zhao, R.Ni, and Y.-Q.Shi, “Pairwise prediction error expansion for efficient reversible data hiding”, IEEE Transactions on Image Processing, Vol. 22, No. 12, pp. 5010-5021. The classic scheme proposed in December 2013, and the subsequent improvements in [2] B.Ou, X.Li, W.Zhang and Y.Zhao, “Improving Dual PEE by Hybrid Dimensional Histogram Generation and Adaptive Mapping Selection Method”, IEEE Trans. Circuits Syst. Video Technol. Vol. 29, No. 7, pp. 2176-2190, 2019, are mainly based on mappings where T equals 1. Although such methods can reduce some embedding distortion, due to the limited number of candidate mappings, when pursuing high embedding capacity, it is often necessary to modify more error pairs or select high-distortion paths, making it difficult to maintain high image quality. Especially in complex texture images, it is difficult to balance capacity and distortion. Usually, the maximum modification amplitude is limited to a unit amplitude T equals 1, resulting in insufficient candidate mapping space. Under high capacity requirements, it is necessary to modify more error pairs or select high-distortion paths, causing the image fidelity to drop sharply, especially in complex texture areas where it is difficult to balance capacity and distortion. (2) Most existing two-dimensional mappings are obtained through empirical rules, manual selection of candidate mapping sets, or point-by-point local correction. There is a lack of a unified recursive mechanism from the basic mapping to the high-modification mapping. If the high-modification scenario is directly applied, and the mapping is redesigned according to T greater than 1, it is easy to cause combinatorial explosion, resulting in an exponential increase in search complexity, which is extremely difficult to implement in engineering. This makes it difficult for existing technologies to dynamically adapt to different capacity requirements. (3) Existing local optimization methods mostly adjust a single error pair or a fixed candidate set, without making full use of the statistical regularity of the two-dimensional prediction error histogram, which is high frequency near zero and low frequency far from zero. For example, Wang J, Chen X, Ni J, Mao N, and Shi Y, “Reversible Data Hiding Based on Multiple Histograms: Framework and Implementation”, IEEE Transactions on Circuit Systems and Video Technology, Vol. 30, No. 8, pp. 2313-2328, 2020. Although a multi-histogram framework was introduced, it still lacks a systematic distortion comparison mechanism in mapping selection. In the high-frequency near-zero region, existing mappings often fail to perform systematic distortion comparison and optimization, which makes it impossible to perform comparable systematic optimization of local unit distortion while keeping the capacity unchanged, and it is difficult to achieve global distortion minimization.

[0004] Therefore, it is necessary to provide a new two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization to solve the above-mentioned technical problems. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization.

[0006] The two-dimensional invertible data hiding method based on single-step bounded expansion and mapping optimization provided by this invention includes the following steps: S1. Image preprocessing and prediction: Obtain the original carrier image, perform block scanning on the carrier image, calculate the predicted value of the current pixel using neighboring pixels, and calculate the prediction error. S2. Construction of a two-dimensional prediction error histogram: Form prediction error pairs by combining two adjacent prediction errors, count the frequency of occurrence of all prediction error pairs, and construct a two-dimensional prediction error histogram; divide the two-dimensional prediction error histogram into multiple sub-histograms according to the local complexity of the image. S3. Construction of basic mappings: After the two-dimensional prediction error histogram is constructed, at least two types of basic unit amplitude two-dimensional mappings are constructed. The basic mappings satisfy the invertibility constraint, that is, the target sets after mapping of different original error pairs do not overlap. S4, Single-step bounded expansion: After the two-dimensional map is constructed, a two-dimensional map with a maximum modification of T is generated based on the two-dimensional map with a maximum modification of T+1 through a recursive mechanism. The recursive mechanism includes: dividing the coordinate plane into an internal rectangular region G and an L-shaped boundary region. ; For the internal rectangular region G, a recursive translation expansion function is used to translate the low-modification mapping in the positive direction as a whole; For L-shaped boundary regions One-dimensional extension rules are used to process point pairs on the coordinate axes; S5. Generalized distribution constraint mapping optimization: Based on the statistical law that the two-dimensional prediction error histogram has high frequency near zero and low frequency far from zero, the frequency-guided sliding window local optimization strategy F-SWLO is adopted. Within the local quadruple range, with the goal of minimizing local distortion, the candidate mapping with high modification amount generated in step S4 is optimized to obtain the optimal mapping combination. S6. Data embedding: Based on the payload requirements of the secret information and the image complexity, select the corresponding optimal mapping combination for each sub-histogram, use the optimal mapping combination to modify the prediction error pair, and embed the secret information and auxiliary information into the carrier image to generate a secret-carrying image. The auxiliary information includes the mapping index, the set of complexity thresholds, and the location map used to recover the overflow pixels; S7. Extraction and Recovery: At the receiving end, auxiliary information is parsed from the secret image, the corresponding optimal mapping combination is recovered according to the mapping index, the prediction error pairs in the secret image are reversed, the secret information is extracted and the original prediction error is recovered, the original pixel value is recovered according to the recovered prediction error and neighboring pixels, and the preprocessing operation is undone using the position map to recover the original carrier image without loss.

[0007] Preferably, the prediction and segmentation in step S1 specifically includes: First, the prediction error is calculated using a scheme based on diamond prediction or double-layer prediction. Then, the image is divided into non-overlapping pixel blocks, the complexity of each pixel block is calculated, and the blocks are sorted from smallest to largest complexity to determine the scanning order. The complexity is calculated based on the sum of the absolute values ​​of the differences between pixels in adjacent regions.

[0008] Preferably, the specific formula for the single-step bounded expansion in step S4 is: For the internal rectangular region G, satisfying xy > 0, the recursive expansion function is defined as:

[0009] in, This represents a two-dimensional mapping with a maximum modification amount of T. It is a translation vector; For L-shaped boundary regions If xy equals 0, then the one-dimensional extension rule is used: or

[0010] Where e is the coordinate value of the boundary point. The secret information bits to be embedded, These are the expanded coordinate values.

[0011] Preferably, the frequency-guided sliding window local optimization strategy F-SWLO in step S5 specifically includes: First, based on the Euclidean distance of the prediction error to the origin (0,0), a descending frequency sorting rule is defined, and then the local quadruples are used to sort the frequency. Above, traverse all valid invertible mapping forms; Based on generalized distribution constraints, compare the cumulative expected distortion of candidate mappings:

[0012] Where UED represents the unit expected distortion; Finally, the mapping that satisfies the constraints of unchanged embedding capacity, modification amount, and minimum cumulative expected distortion is selected as the local optimal mapping, and it slides along the frequency from high to low until all local units have been processed.

[0013] Preferably, the auxiliary information management in step S6 includes: generating a position map for the pixel positions modified due to grayscale overflow or underflow, and performing lossless compression on the position map; The auxiliary information fields include: the last embedded position, the number of sub-histograms, the set of mapping indices, the set of complexity thresholds, the length of the compressed position map, and the data of the compressed position map. The auxiliary information is embedded in the least significant bit of the image or a specific reserved area.

[0014] Preferably, it also includes offset adjustment and mapping refinement steps: First, based on the basic unit amplitude mapping, an offset b is introduced. [0,B), shift the mapping working area to the upper right, and then divide the expanded mapping into different categories according to the value of the offset b. Fine-tune the mapping path of the high-frequency region near the origin so that more high-frequency point pairs are mapped to positions with less distortion.

[0015] Preferably, this method is applicable to grayscale images or color images: For color images, the above prediction, histogram construction, mapping expansion, and embedding processes are performed independently for the R, G, and B channels respectively; or, the RGB color space is converted to the YCbCr space, and the above processes are performed only for the Y luminance component, while the chrominance component remains unchanged or is embedded using difference expansion.

[0016] A two-dimensional reversible data hiding system based on single-step bounded expansion and mapping optimization includes: The image input module is used to receive the original carrier image and the secret information to be embedded. The prediction error construction module is used to calculate the predicted value of a pixel using a preset predictor and generate a prediction error sequence. The multi-histogram generation module is used to combine prediction errors into error pairs, construct a two-dimensional prediction error histogram, and divide the histogram into multiple subsets according to local complexity. The mapping management module is used to maintain and generate mapping tables, including: The basic mapping constructor submodule is used to construct the basic unit amplitude two-dimensional mapping; The single-step bounded expansion submodule is used to perform the mapping recursion from T to T+1, divide the internal rectangular region and the L-shaped boundary region, and expand them respectively; The local optimization submodule is used to perform distortion minimization optimization on candidate mappings based on a sliding window strategy guided by generalized distribution constraints and frequency. The auxiliary information processing module is used to generate a location map of the recorded overflow position and to encode the auxiliary information; An embedded control module is used to modify the prediction error pair based on the secret information and the optimized mapping combination, write the secret information and auxiliary information into the carrier image, and output the secret image. The extraction and restoration module is used to parse auxiliary information from the secret image, perform inverse mapping operations, extract secret information, and restore the original carrier image without loss.

[0017] Preferably, the single-step bounded expansion submodule specifically operates as follows: The internal rectangular region G is expanded by recursive translation to maintain the structural characteristics of the basic mapping. The L-shaped boundary region adopts a one-dimensional expansion rule to process the embedding of point pairs on the origin and coordinate axes; Both methods utilize piecewise functions to achieve bounded expansion, ensuring that the maximum modification amount does not exceed a preset upper limit. .

[0018] Preferably, the local optimization submodule specifically operates as follows: First, the Laplace distribution characteristics of the two-dimensional prediction error histogram are utilized to process local quadruples from high to low frequency. Under the premise of maintaining the embedding capacity and modification constraints, the optimal local mapping is selected by comparing the cumulative expected distortion, and the local optimal mappings are combined into a global optimal mapping table for the embedding control module to call.

[0019] Compared with related technologies, the two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization provided by this invention has the following beneficial effects: 1. This invention, through a single-step bounded expansion mechanism, can recursively generate two-dimensional mappings with high modification amount T greater than 1 from the basic unit amplitude mapping, avoiding the combinatorial explosion problem when directly designing high modification amount mappings, significantly expanding the candidate mapping space, and enabling the use of richer target states for information embedding under high embedding capacity requirements, avoiding the problem of sharp image quality degradation caused by modifying more error pairs or selecting high distortion paths in the prior art. 2. This invention divides the coordinate plane into an internal rectangular region G and an L-shaped boundary region. The system employs recursive translation expansion and one-dimensional expansion rules respectively to achieve automated generation of mappings from low to high modification amounts, ensuring the reversibility and boundedness of the mappings. This makes the construction of high modification amount mappings no longer dependent on trial and error, greatly reducing the complexity of engineering implementation, and enabling dynamic adjustment of the upper limit of modification amount according to load requirements. 3. This invention, by introducing a generalized distribution constraint and a frequency-guided sliding window local optimization strategy F-SWLO, makes profound use of the two-dimensional prediction error histogram and the Laplace statistical characteristics of high frequency near zero and low frequency far from zero. By performing comparability optimization based on cumulative expected distortion within local quadruples and sliding the processing from high to low frequency, it can prioritize low-distortion mapping of high-frequency near-zero regions while maintaining the embedding capacity. This achieves effective transmission from local distortion minimization to global distortion minimization, significantly reducing the overall distortion of densely loaded images. 4. Under the multi-histogram modification framework, this invention not only improves the global embedding efficiency by adaptively selecting the optimal mapping combination for sub-histograms of different complexities and combining auxiliary information, but also ensures that the receiving end can recover the original image, resulting in good performance. Attached Figure Description

[0020] Figure 1 The overall flowchart of the two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization provided by the present invention is shown below. Figure 2 This is a block diagram of the two-dimensional reversible data hiding system of the present invention; Figure 3 A schematic diagram illustrating the generation of two-dimensional prediction error pairs and the construction of a two-dimensional prediction error histogram; Figure 4 A schematic diagram of a two-dimensional mapping of the basic unit amplitude; Figure 5 A schematic diagram of a two-dimensional mapping with a maximum modification amount of 2; Figure 6 This is an extended schematic diagram of the four types of basic mappings under the single-step bounded extension mechanism; Figure 7 A schematic diagram showing the division of the internal rectangular region and the L-shaped boundary region; Figure 8A schematic diagram of the transformation from a basic mapping to a high-modification mapping; Figure 9 This is a schematic diagram of the two-dimensional mapping after offset adjustment; Figure 10 A schematic diagram illustrating the mapping refinement under different offset conditions; Figure 11 Embed the information in a flowchart; Figure 12 This is a flowchart of information extraction and original carrier image restoration. Detailed Implementation

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] It should be noted that the terms used in this method have the following meanings: Reversible Data Hiding (RDH): After embedding secret information in a secret image, the original image can be recovered without loss while extracting the secret information; Prediction Error (PE): The difference between the actual pixel value of an image and the predicted value calculated using neighboring pixels; Two-dimensional prediction error histogram (2DPEH): A two-dimensional distribution formed by statistically analyzing the frequency of occurrence of each error pair after forming two adjacent or paired prediction errors into error pairs; Multiply Histogram Modification (MHM): Divide pixels or errors into multiple subsets based on local complexity or category, construct prediction error histograms for each subset, and then perform adaptive embedding. T-mapping: a two-dimensional invertible mapping whose maximum modification does not exceed T; Single-step bounded expansion: The process of recursively generating a mapping with a maximum modification magnitude of T+1 from a mapping with a maximum modification magnitude of T; Generalized distribution constraint: used to constrain and compare local mappings based on the statistical regularity of high frequency near zero and low frequency far from zero in the two-dimensional prediction error histogram; F-SWLO (Frequency-guided Sliding Window Local Optimization): A frequency-guided sliding window local optimization strategy used to select the invertible mapping with less distortion within the local quadruple range; Location map: Used to record information about the pixel positions that have been modified due to overflow / underflow preprocessing.

[0023] Example 1

[0024] For reference Figure 1 As shown, Figure 1 This is a flowchart of the overall process of the two-dimensional reversible data hiding method of the present invention, showing the overall process of image preprocessing, multi-histogram construction, mapping generation and optimization, data embedding and output of the encrypted image; The method of this invention generally includes the following steps: image input, prediction and preprocessing, construction of two-dimensional prediction error pairs and multiple histograms, construction of basic mappings, single-step bounded expansion, optimization of local mappings under generalized distribution constraints, selection of mapping combinations, data embedding, and output of densely loaded images.

[0025] In the mapping combination selection stage, on the one hand, the optimized candidate mapping with high modification amount is received, and on the other hand, secret information and auxiliary information are received. The final embedding control is completed by combining the mapping index and complexity threshold.

[0026] Example 2

[0027] For reference Figure 2 As shown, Figure 2 The structural block diagram of the two-dimensional reversible data hiding system of the present invention shows the data flow and control relationship between each functional module. The present invention can also be implemented by a corresponding system or device. In practical implementation, a two-dimensional invertible data hiding system based on single-step bounded expansion and generalized distribution constraint mapping optimization includes: The image input module is used to receive the original carrier image and the secret information to be embedded. The prediction error construction module is used to calculate the predicted value of a pixel using a preset predictor and generate a prediction error sequence. The multi-histogram generation module is used to combine prediction errors into error pairs, construct a two-dimensional prediction error histogram, and divide the histogram into multiple subsets according to local complexity. The mapping management module is used to maintain and generate mapping tables, including: The basic mapping constructor submodule is used to construct the basic unit amplitude two-dimensional mapping; The single-step bounded expansion submodule is used to perform the mapping recursion from T to T+1, divide the internal rectangular region and the L-shaped boundary region, and expand them respectively; The local optimization submodule is used to perform distortion minimization optimization on candidate mappings based on a sliding window strategy guided by generalized distribution constraints and frequency. The auxiliary information processing module is used to generate a location map of the recorded overflow position and to encode the auxiliary information; An embedded control module is used to modify the prediction error pair based on the secret information and the optimized mapping combination, write the secret information and auxiliary information into the carrier image, and output the secret image. The extraction and restoration module is used to parse auxiliary information from the secret image, perform inverse mapping operations, extract secret information, and restore the original carrier image without loss.

[0028] Example 3

[0029] For reference Figure 3 As shown, Figure 3 A schematic diagram of two-dimensional prediction error pair generation and two-dimensional prediction error histogram construction shows the process of generating prediction error sequences and error pairs from the image patch to be processed and constructing a two-dimensional histogram. In practice, firstly, a two-layer prediction scheme based on diamond prediction is used to calculate the prediction error of the original image; For each pixel to be processed, the predicted value is obtained using its neighboring pixels, and the prediction error is obtained from the difference between the actual pixel value and the predicted value. Then, according to the preset adjacency relationship, the two prediction errors are combined into a two-dimensional prediction error pair to form the statistical unit of the subsequent two-dimensional prediction error histogram. In a preferred embodiment of the present invention, the two-dimensional prediction error histogram can be represented as:

[0030] in, Indicates error pair Frequency of occurrence; and A pair of prediction errors formed according to preset rules; Indicates the number of elements in the set; Furthermore, to adapt to the smoothness of different regions of the image, this invention does not only construct a single two-dimensional prediction error histogram, but divides pixels or prediction error pairs into multiple categories according to local complexity, and constructs multiple prediction error histograms respectively. Smooth regions usually have higher near-zero peak values, which are suitable for allocating more embedding units; textured regions can use more conservative mapping or fewer embedding units.

[0031] Example 4

[0032] For reference Figure 4 As shown, Figure 4 This is a schematic diagram of a two-dimensional mapping of the basic unit amplitude, where (a) is the first basic unit amplitude mapping and (b) is the second basic unit amplitude mapping; In practical implementation, at least two types of basic unit amplitude two-dimensional mappings are first constructed as parent mappings. The basic mappings satisfy the invertibility constraint, that is, different original error pairs do not overlap with each other after mapping the target set, and each target state can be uniquely traced back to the corresponding original state; In the first basic unit amplitude mapping, the boundary points near the origin are expanded or translated along the coordinate axis direction, and the internal points are preferentially modified in the diagonal direction to maintain low distortion and high embedding efficiency. In the second basic unit amplitude mapping, in addition to retaining the coordinate axis boundary mapping, a stepped path is introduced in the internal region near the origin, so that more near-zero point pairs can be used for subsequent capacity expansion. Both types of basic mappings can be used as input for single-step bounded expansion.

[0033] Example 5

[0034] For reference Figure 5 As shown, Figure 5 This is a schematic diagram of a two-dimensional mapping with a maximum modification amount of 2, showing a mapping structure that allows for a larger reversible modification amount in the region near the origin; In practical implementation, when the maximum modification amount is expanded from unit amplitude to 2, the two-dimensional prediction error pairs near the origin can be mapped to richer target states, thereby enabling a single error pair to undertake more embedding tasks, or to avoid using high-distortion paths under the same capacity conditions. This invention does not directly exhaustively design all high modification amount mappings, but obtains them recursively from the basic mapping through the single-step bounded expansion mechanism described later.

[0035] Example 6

[0036] For reference Figure 6 As shown, Figure 6 The diagram shows the extension of four types of basic mappings under the single-step bounded extension mechanism, where (a) is the identity mapping extension, (b) is the horizontal mapping extension, (c) is the vertical mapping extension, and (d) is the diagonal mapping extension. In practical implementation, one of the core aspects of this invention lies in proposing a single-step bounded expansion mechanism, used to limit the maximum modification amount to... The maximum modification amount generated by the recursive generation of the two-dimensional mapping is The +1 two-dimensional mapping divides the coordinate plane into an inner rectangular region. And the L-shaped boundary region, denoted as The region is divided into two parts: the internal region is recursively translated and expanded, and the boundary region is processed using one-dimensional expansion rules, thereby gradually increasing the allowable modification range without destroying reversibility. In a preferred embodiment, the segmented form of the single-step bounded expansion can be expressed as:

[0037] in, This indicates the maximum amount of modification. Two-dimensional mapping; A recursive expansion function representing the internal rectangular region; A one-dimensional expansion function representing an L-shaped boundary region; For the internal rectangular region That is, satisfying For regions where recursion extends, the preferred approach is to shift the entire low-modification mapping in the positive direction. (Two-dimensional mapping) It is by evolving the previous mapping state. The result is that the relative orientation structure of the internal points remains unchanged. This process preserves the structural characteristics of the underlying mapping while extending the modification to... Internal transformation The definition is as follows:

[0038] Within this framework, mapping It typically has the non-decreasing property, ensuring that the output element is not less than the input pair. To illustrate this, consider... The basic situation. The basic mapping set satisfies ; In the region Inside, The reversibility is guaranteed. Because this transformation involves... Linear translation of the original point pairs in the data This is an isometric transformation and a one-to-one mapping operation, so each element in the target mapping corresponds to a unique source point pair. This ensures that for any Internal transformation It remains injective throughout the entire transformation process.

[0039] For L-shaped boundary regions, i.e. For regions, a one-dimensional extended shift rule is used along the coordinate axes to ensure that the origin and points on the axes can also participate in the embedding. The one-dimensional expansion rule for the boundary region can be written as:

[0040] in This represents the coordinate value of a boundary point on a certain coordinate axis, and For the one bit of secret information to be embedded, These are the expanded boundary coordinate values. Only the positive semi-axis portion is described here; the portion on the negative semi-axis can be obtained through symmetry. Specifically, the function... Each boundary point Mapped to a set for information embedding; For the origin By transforming according to the above one-dimensional expansion rule, a result is obtained. Two-dimensional mapping set of time ; For other point pairs, the non-zero coordinates are extended using a one-dimensional mapping. For example, when and When, the mapping result is ,in From secret information Decide; This piecewise form of single-step bounded expansion ensures that the modification size never exceeds [a certain threshold]. It successfully processed both the origin and points on the coordinate axes, by combining... and This strategy not only achieves complete coverage of the internal rectangular region and L-shaped boundary region, but also ensures that the mapping rules are consistent throughout the entire region.

[0041] Example 7

[0042] For reference Figure 7 As shown, Figure 7 As shown, Figure 7 The diagram shows the division of the internal rectangular region and the L-shaped boundary region, where (a) is the region division and (b) is the high modification mapping after the region combination; In practical implementation, to avoid exhaustive search of high-modification mappings, this invention divides the first quadrant coordinate plane into internal rectangular regions. and the L-shaped boundary region, i.e. area; for For each region, a recursive translation method is used to maintain the original basic mapping structure; for The region is processed by a one-dimensional boundary expansion method to handle the origin and points on the coordinate axes. This divide-and-conquer approach can take into account structural consistency, bounded modification amount and overall reversibility.

[0043] Example 8

[0044] For reference Figure 8 As shown, Figure 8 The diagram illustrates the transformation from a basic mapping to a high-modification mapping, showing the process of forming a high-modification mapping from a basic mapping through a single-step bounded expansion. In practice, the base mapping can be expanded in a single step to form a new high-modification mapping. Since the local directional relationships and boundary processing logic of the base mapping are maintained during the expansion process, the new mapping can not only inherit the low-distortion advantage of the low-modification scheme in the near-zero region, but also increase the number of available target states and improve the capacity potential of the subsequent candidate mapping set. Figure 8 The middle right figure shows a specific example of a high-modification mapping f2, which is... Figure 8 The fundamental mapping f1 in the left figure is derived, and it is clear that region G and The mapping vectors in the diagram together constitute a complete and invertible two-dimensional mapping scheme. Mapping to unit amplitude compared to, The histogram bars used for information embedding are extended, thus providing greater embedding capacity. Crucially, the single-step bounded expansion mechanism is essentially a recursive mechanism; by repeatedly applying this framework, it is possible to progressively extend the basic unit amplitude mapping to a higher-modification expanded amplitude mapping, from... Extended to And seamlessly expands to any This mechanism provides a general and scalable framework capable of dynamically generating two-dimensional mappings with greater embedding potential to meet specific capacity requirements. This effectively avoids the need for... The exponential growth problem encountered during mapping generation laid a solid foundation for subsequent mapping optimization.

[0045] Example 9

[0046] For reference Figure 9 As shown, Figure 9 This is a schematic diagram of the two-dimensional mapping after offset adjustment, showing the structure after the mapping work area is shifted to the upper right by offset b. In specific implementation, in order to further utilize the high-frequency distribution characteristics of the near-origin of the two-dimensional prediction error histogram, this invention introduces an offset adjustment strategy on top of the basic unit amplitude mapping. This strategy shifts the entire mapping working area to the upper right by a preset offset amount b, while keeping the low-frequency region unchanged, so that the high-frequency near-zero point pairs fall into the embeddable or low-distortion modification area. After offset adjustment, as the offset increases, more identical structural segments will appear between different mappings. Combining the statistical characteristic that the two-dimensional prediction error histogram follows a near-zero high-frequency pattern and a far-zero low-frequency pattern, this invention further divides the expanded mappings into multiple categories according to the offset value and performs fine-tuning processing on each category to reduce local high-distortion transfers. After adjustment, the entire mapping is shifted one offset to the upper right. ,in This indicates the maximum possible translation offset. Within the shaded adjustment area, the black histogram bars... and The data is expanded to facilitate the embedding of information, while the gray histogram bars are shifted. The gray bars in the low-frequency region remain unchanged. The adjusted mapping effectively utilizes the high-frequency proximity to the origin, which can well balance the embedding capacity and the image fidelity. Based on this, with the offset The increase will make There are many identical parts in the basic mappings; in fact, the distribution of the two-dimensional prediction error histogram usually follows a Laplace-like distribution, that is, the peak distribution is... It is near the origin and decays rapidly with increasing distance from the origin.

[0047] Example 10

[0048] For reference Figure 10 As shown, Figure 10 The diagram illustrates the mapping refinement under different offset conditions. From left to right, the diagram shows the basic mapping, the expanded mapping, and the refined mapping; from top to bottom, the diagrams correspond to b=0, b=1, b=2, and b≥3, respectively. In practical implementation, to utilize the distribution characteristics of the prediction error histogram and these components with similar forms, according to The value of and ,Will The transformation mapping is divided into four different cases. Appropriate fine-tuning is performed to achieve lower distortion in the adjusted mapping. The transformations corresponding to the four types are as follows: Figure 10 As shown; For different categories, this invention, while keeping the embedding capacity unchanged and the amount of modification within the limit, corrects a small number of mapping paths close to the origin, so that more high-frequency point pairs are mapped to positions with less distortion. Example 11 For reference Figure 11 As shown, Figure 11 Embed the information in a flowchart; In practice, the information embedding stage first reads the original image, secret information, and preset parameters. The preset parameters include at least the number of basic mappings. Maximum offset Maximum modification limit Number of prediction error histograms And a set of complexity thresholds; Subsequently, for pixel values ​​less than or greater than The location is preprocessed to generate a corresponding location map. After lossless compression, the location map, along with auxiliary information such as the final embedding location, mapping index, and complexity threshold set, participates in subsequent embedding. Then, two-dimensional prediction error pairs are calculated, and multiple prediction error histograms are constructed. The optimal mapping combination is selected for each histogram from the candidate mapping set. Finally, the corresponding point pairs are modified according to the selected mapping combination, and the secret information and auxiliary information are embedded into the image to obtain the secret-carrying image.

[0049] Example 12

[0050] For reference Figure 12 As shown, Figure 12The flowchart of information extraction and original carrier image restoration shows the processing flow of auxiliary information parsing, inverse mapping extraction and original image restoration; In the specific implementation, during the extraction and recovery stage, the receiving end first reads the auxiliary information from the least significant bit of the secret image, and parses it to obtain parameters such as the location map length, complexity threshold, mapping index, and final embedding position. Then, according to the recovered mapping relationship and the reverse processing order, the reverse mapping is performed step by step on each two-dimensional prediction error pair in order to extract the secret information and recover the prediction error. After recovering the prediction error, the receiver restores the pixel values ​​according to the prediction relationship consistent with the embedding stage, and cancels the preprocessing operation according to the location map to restore the pixels that were previously corrected due to overflow / underflow protection to their original values. At this point, the secret information is completely extracted and the original carrier image is also restored without loss.

[0051] Example 13

[0052] For reference Figures 1 to 12 As shown, this invention further proposes a frequency-guided sliding window local optimization (F-SWLO) strategy to select a better local mapping form among multiple candidate mappings; Based on the assumption of the Laplace distribution, the distribution characteristics of the generalized two-dimensional prediction error histogram can be obtained. According to the frequency of the histogram, F-SWLO optimizes the mapping locally from high frequency to low frequency regions in turn, looking for the mapping form that minimizes local distortion, until all point pairs are optimized, and finally the optimal target mapping is obtained; Typically, the distribution of the two-dimensional prediction error histogram follows a peak value at... Near the origin, the frequency decreases rapidly with increasing distance. Therefore, the frequency order of the two-dimensional prediction error histogram corresponds to the index order based on its distance. The Euclidean distances, from highest to lowest, are defined as follows:

[0053] The F-SWLO method is frequency-guided, optimizing the mapping from high-frequency to low-frequency regions sequentially. Specifically, the optimization is performed on local quadruples. The above is defined as follows:

[0054] Based on the distribution characteristics of the two-dimensional prediction error histogram, for a given prediction error histogram... The frequency relationships within a local region are defined as follows:

[0055] For each F-SWLO seeks an optimal invertible mapping method that minimizes local distortion while satisfying given constraints. The optimization process is mainly based on three principles; (1) Maintain the embedding capacity, keep the number of possible modifications for each point unchanged, and ensure that the total embedding capacity of the optimized mapping is the same as the initial capacity; (2) Modification amount constraint: the maximum modification amount after optimization shall not exceed the initial modification amount; (3) Distortion minimization: The distortion of local point pair combinations satisfies the local distortion minimization after optimization; For optimizing mapping Optimal mapping ( The definition is as follows:

[0056] in, Denotes the solution space of all valid invertible mapping forms. Represents mapping The maximum amount of modification. For mapping The unit expected distortion (UED) is defined as follows:

[0057] in, Representing vectors The norm of . Given a histogram that follows the assumed distribution. Using mapping of Embedding distortion (ED) is represented as:

[0058] Therefore, to solve for the optimal mapping, it is necessary to compare local units. Any two mappings within The degree of distortion is determined to ensure the optimal mapping method that minimizes the expected total distortion. However, due to the prediction error histogram... exist Since the specific values ​​are unknown, a direct and intuitive comparison cannot be made to obtain the final result. Therefore, based on the assumption that the prediction error histogram follows a Laplace distribution, the necessary and sufficient conditions for satisfying the comparison relationship between the two mappings are given here. For ease of description, It is a set of point pairs arranged in descending order of frequency, specifically: when , .

[0059] when , .

[0060] Therefore, the inequality in (1) is satisfied if and only if the cumulative constraint in (2) is satisfied: (1) (2) In fact, the number of all locally invertible mapping forms that can be generated by a combination of local units is finite, for example, At that time, there are no more than 2,000 invertible mapping forms for four adjacent point pairs, and it is possible to exhaustively search all combinations to find the best mapping form; This invention utilizes the generalized distribution law of the two-dimensional prediction error histogram to prioritize the inclusion of high-frequency regions near zero in the comparison, and determines the merits of two candidate mappings based on the magnitude of the cumulative expected distortion. The sliding window advances step by step along the frequency from high to low until all local units are processed, thereby forming a target mapping with lower global distortion.

[0061] Example 14

[0062] For reference Figure 1 and Figure 2 As shown, the specific processing flow is as follows: Figure 3 As shown, the processing steps include the following: Step S10, Image Preprocessing and Prediction: First, input the original carrier image, perform boundary preprocessing on the image, calculate the predicted value of each pixel using diamond prediction, and then obtain the prediction error; combine two prediction errors into a two-dimensional prediction error pair according to their adjacency relationship, and finally output a set of two-dimensional prediction error pairs. This set is used as the input of step S20 to construct a two-dimensional prediction error histogram; at the same time, it serves as the original state sequence during embedding in step S50. Step S20: Complexity Segmentation and Two-Dimensional Mapping Construction: Input the set of two-dimensional prediction error pairs output in step S10. Divide the prediction error pairs into multiple categories based on local complexity, and generate multiple two-dimensional prediction error histograms for each category. Simultaneously, construct at least two types of basic unit amplitude two-dimensional mappings as the parent mappings for subsequent expansion. Finally, output multiple two-dimensional prediction error histograms and basic two-dimensional mappings, with a maximum modification of 1. The output histograms are used to guide the optimization in step S40. The output basic mappings are fed into step S30 for single-step bounded expansion. Step S30, Single-Step Bounded Expansion: Input the basic two-dimensional mapping output from Step S20, divide the coordinate plane into an internal rectangular region and an L-shaped boundary region; the internal region is expanded using recursive translation, and the boundary region is expanded using a one-dimensional expansion rule, recursively generating a new mapping with a maximum modification amount of T+1. Repeat this mechanism until the preset modification range is reached. Output high-modification-amount two-dimensional mappings, such as those with a maximum modification amount of 2, 3...N, and use these high-modification-amount mappings as the candidate mapping set for local optimization in Step S40; Step S40, Local Mapping Optimization under Generalized Distribution Constraints: Input the multiple two-dimensional prediction error histograms output from step S20, and the high-modification two-dimensional mappings output from step S30. First, adjust the offset of the mapping working area so that high-frequency near-zero pairs fall into the embeddable region; then, adopt the frequency-guided sliding window local optimization strategy (F-SWLO) to sequentially optimize the local quadruplets in descending order of frequency. An exhaustive comparison is performed to select the mapping form with the minimum local expected distortion while maintaining the constraints of embedding capacity and modification amount, thus obtaining the optimized global mapping. For each complexity sub-histogram, the optimized final two-dimensional mapping is output. This final mapping is directly used for the secret information embedding in step S50; Step S50: Secret Information Embedding: Input the original two-dimensional prediction error pair sequence output from step S10, and output the optimized final two-dimensional mapping, the secret information bitstream to be embedded, and related auxiliary parameters from step S40. Select the corresponding optimized mapping according to the complexity category of each prediction error pair, modify the original prediction error pairs to the target state according to the mapping rules, embed the secret information, generate a secret-carrying image, and record the auxiliary information. Output the secret-carrying image, containing the embedded secret information and auxiliary information. The secret-carrying image serves as the input to step S60 for inverse processing and auxiliary information extraction. Step S60: Inverse processing of the encrypted image and extraction of auxiliary information: Input the encrypted image output in step S50. Read auxiliary information from the preset region of the encrypted image and parse it to obtain parameters such as position map length, complexity threshold, mapping index, and final embedding position. Based on the parsed mapping index and the known mapping generation algorithm, reconstruct the final two-dimensional mapping rule completely consistent with the embedding stage at the receiving end. Perform the same diamond prediction and adjacency relationship combination as in step S10 on the encrypted image to generate a set of two-dimensional prediction error pairs for the encrypted image. Output the parsed auxiliary information, the reconstructed final two-dimensional mapping rule, and the set of two-dimensional prediction error pairs for the encrypted image. Step S70: Secret Information Extraction and Original Image Restoration: Input the set of prediction error pairs of the secret-carrying image output in step S60, the final reconstructed two-dimensional mapping, and auxiliary information. Following the reverse process of embedding, look up the mapping table in reverse according to the state of each secret-carrying prediction error pair to restore the original prediction error pair and simultaneously extract the embedded secret information; use the restored original prediction error pairs to calculate the original pixel values ​​and restore the complete original carrier image. Output the extracted secret information and the restored original carrier image; Among them, steps S10 to S20 adopt existing technologies in the field such as rhombus prediction, two-dimensional prediction error pair generation, complexity-based multi-histogram partitioning, and basic unit amplitude two-dimensional mapping construction. Steps S50 to S70 involve embedding secret information according to optimized mapping, extracting auxiliary information from the secret image, and reverse recovery of the original carrier image. The above embedding and extraction recovery process is a conventional operation in the field.

[0063] Example 15

[0064] For reference Figures 1 to 12 As shown, the present invention may also have various alternative embodiments, specifically as follows: First, the method of obtaining prediction error is not limited to diamond prediction or two-layer prediction. As long as a prediction error sequence suitable for constructing a two-dimensional prediction error histogram can be generated, it can be used. For example, it can be replaced by median local edge prediction, gradient adaptive prediction, pixel value sorting prediction or other prediction methods that can improve prediction accuracy. Second, the pairing rules for two-dimensional prediction error pairs are not limited to diagonal adjacency or fixed adjacency. Horizontal adjacency, vertical adjacency, adjacent pairing after intra-block sorting, or pairing determined adaptively based on pixel position can also be used, as long as the two-dimensional error statistical representation required for reversible embedding can be formed. Third, the internal region transformation function and the one-dimensional expansion rule of the boundary region in the single-step bounded expansion can be transformed by equivalent transformation. As long as the target sets of different original states do not overlap, the maximum amount of modification is limited, and it can be uniquely recovered by the inverse process, it can be regarded as an equivalent alternative of the present invention; Fourth, the offset in the offset adjustment strategy can be a fixed preset value or dynamically determined based on image statistical features, adaptive estimation results, or load requirements; the number of offset classification intervals can also be adjusted as needed, and is not limited to four categories. Fifth, local optimization strategies can employ full enumeration comparison, heuristic search, dynamic programming, pruning search, or other solution methods that can satisfy capacity and distortion constraints; the frequency order can also be achieved by approximate frequency sorting or sorting based on distance from the peak point. Sixth, the present invention can be applied to grayscale images, and can also be extended to single-channel or multi-channel processing scenarios of color images. It can also be further extended to data hiding systems after transformation domain representation or encryption domain preprocessing, as long as the core logic of two-dimensional mapping generation, optimization and reversible recovery is still retained.

[0065] It is worth noting that in a preferred embodiment, the number of basic unit amplitude mappings K can be set to 2, the maximum offset B to 8, the maximum modification limit Tmax to 3, and the number of multiple histograms M to 16. In this case, K×B×Tmax=48 candidate mappings can be formed for selection. This set of parameters can well balance capacity, distortion, and computational complexity, and is suitable for the implementation of 512×512 grayscale images.

[0066] Auxiliary information may include, but is not limited to: the last embedding position, the number of prediction error histograms, the set of mapping indices, the set of complexity thresholds, the length of the compressed location map, and the content of the compressed location map. The bit width of the above fields can be adjusted according to the image size, the number of candidate mappings, and application requirements.

[0067] It should be noted that, according to embodiments of the present invention, the computing device that can be used to implement the above method includes a processor and a memory; The processor can be a multi-core processor or include multiple processors. In some embodiments, the processor may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor may be implemented using custom circuitry, such as an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA).

[0068] Memory can include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM can store static data or instructions needed by the processor or other modules of the computer. Permanent storage devices can be read-write storage devices. Permanent storage devices are non-volatile storage devices that retain stored instructions and data even when the computer is powered off.

[0069] In some implementations, the permanent storage device uses a high-capacity storage device (such as a magnetic or optical disk, or flash memory) as the permanent storage device.

[0070] In some implementations, the persistent storage device can be a removable storage device, such as a floppy disk or optical drive, and the system memory can be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory can store some or all of the instructions and data required by the processor during operation. Furthermore, the memory can include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical discs may also be used.

[0071] In some implementations, the memory may include removable storage devices that are readable and / or writable, such as laser discs (CDs), read-only digital multifunction optical discs (e.g., DVD-ROMs, dual-layer DVD-ROMs), read-only Blu-ray discs, ultra-high density optical discs, flash memory cards (e.g., SD cards, mini SD cards, Micro-SD cards, etc.), magnetic floppy disks, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or via wired connections.

[0072] The circuits and controls involved in this invention are all existing technologies and will not be described in detail here.

[0073] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization, characterized in that, Includes the following steps: S1. Image preprocessing and prediction: Obtain the original carrier image, perform block scanning on the carrier image, calculate the predicted value of the current pixel using neighboring pixels, and calculate the prediction error. S2. Construction of a two-dimensional prediction error histogram: Form prediction error pairs by combining two adjacent prediction errors, count the frequency of occurrence of all prediction error pairs, and construct a two-dimensional prediction error histogram; divide the two-dimensional prediction error histogram into multiple sub-histograms according to the local complexity of the image. S3. Construction of basic mappings: After the two-dimensional prediction error histogram is constructed, at least two types of basic unit amplitude two-dimensional mappings are constructed. The basic mappings satisfy the invertibility constraint, that is, the target sets after mapping of different original error pairs do not overlap. S4, Single-step bounded expansion: After the two-dimensional map is constructed, a two-dimensional map with a maximum modification of T is generated based on the two-dimensional map with a maximum modification of T+1 through a recursive mechanism. The recursive mechanism includes: dividing the coordinate plane into an internal rectangular region G and an L-shaped boundary region. ; For the internal rectangular region G, a recursive translation expansion function is used to translate the low-modification mapping in the positive direction as a whole; For L-shaped boundary regions One-dimensional extension rules are used to process point pairs on the coordinate axes; S5. Generalized distribution constraint mapping optimization: Based on the statistical law that the two-dimensional prediction error histogram has high frequency near zero and low frequency far from zero, the frequency-guided sliding window local optimization strategy F-SWLO is adopted. Within the local quadruple range, with the goal of minimizing local distortion, the candidate mapping with high modification amount generated in step S4 is optimized to obtain the optimal mapping combination. S6. Data embedding: Based on the payload requirements of the secret information and the image complexity, select the corresponding optimal mapping combination for each sub-histogram, use the optimal mapping combination to modify the prediction error pair, and embed the secret information and auxiliary information into the carrier image to generate a secret-carrying image. The auxiliary information includes the mapping index, the set of complexity thresholds, and the location map used to recover the overflow pixels; S7. Extraction and Recovery: At the receiving end, auxiliary information is parsed from the secret image, the corresponding optimal mapping combination is recovered according to the mapping index, the prediction error pairs in the secret image are reversed, the secret information is extracted and the original prediction error is recovered, the original pixel value is recovered according to the recovered prediction error and neighboring pixels, and the preprocessing operation is undone using the position map to recover the original carrier image without loss.

2. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to claim 1, characterized in that, The prediction and block segmentation in step S1 specifically include: First, the prediction error is calculated using a scheme based on diamond prediction or double-layer prediction. Then, the image is divided into non-overlapping pixel blocks, the complexity of each pixel block is calculated, and the blocks are sorted from smallest to largest complexity to determine the scanning order. The complexity is calculated based on the sum of the absolute values ​​of the differences between pixels in adjacent regions.

3. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to claim 1, characterized in that, The specific formula for the single-step bounded expansion in step S4 is as follows: For the internal rectangular region G, satisfying xy > 0, the recursive expansion function is defined as: If xy equals 0, then the one-dimensional extension rule is used: Where e is the coordinate value of the boundary point. The secret information bits to be embedded, These are the expanded coordinate values.

4. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to claim 1, characterized in that, The frequency-guided sliding window local optimization strategy F-SWLO in step S5 specifically includes: First, based on the Euclidean distance of the prediction error to the origin (0,0), a descending frequency sorting rule is defined, and then the local quadruples are used to sort the frequency. Above, traverse all valid invertible mapping forms; Based on generalized distribution constraints, compare the cumulative expected distortion of candidate mappings: Where UED represents the unit expected distortion; Finally, the mapping that satisfies the constraints of unchanged embedding capacity, modification amount, and minimum cumulative expected distortion is selected as the local optimal mapping, and it slides along the frequency from high to low until all local units have been processed.

5. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to claim 1, characterized in that, The auxiliary information management in step S6 includes: generating a position map for the pixel positions modified due to grayscale overflow or underflow, and performing lossless compression on the position map; The auxiliary information fields include: the last embedded position, the number of sub-histograms, the set of mapping indices, the set of complexity thresholds, the length of the compressed position map, and the data of the compressed position map. The auxiliary information is embedded in the least significant bit of the image or a specific reserved area.

6. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to claim 1, characterized in that, It also includes offset adjustment and mapping refinement steps: First, based on the basic unit amplitude mapping, an offset b is introduced. [0,B), shift the mapping working area to the upper right, and then divide the expanded mapping into different categories according to the value of the offset b. Fine-tune the mapping path of the high-frequency region near the origin so that more high-frequency point pairs are mapped to positions with less distortion.

7. The two-dimensional reversible data hiding method based on single-step bounded expansion and mapping optimization according to any one of claims 1 to 6, characterized in that, This method is applicable to grayscale or color images: For color images, the above prediction, histogram construction, mapping expansion, and embedding processes are performed independently for the R, G, and B channels respectively; or, the RGB color space is converted to the YCbCr space, and the above processes are performed only for the Y luminance component, while the chrominance component remains unchanged or is embedded using difference expansion.