Security encryption management method and system for all-in-one machine

By evaluating the multi-grouping strategy and visual loss degree of binary document images, the optimal embedding method is dynamically selected to solve the problem of character morphology change caused by embedding secret messages in binary document images, and achieve a balance between efficient embedding of secret messages and document readability.

CN120634829AInactive Publication Date: 2025-09-12JINJI FUTURE (SHENZHEN) TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510796501.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When embedding secret messages in binary document images, the existing technology easily causes character morphology changes, affecting document readability.

Method used

A multi-grouping strategy is used to dynamically group the pixels in the binary document image, calculate the difference between the feature value sequence and the watermark sequence, and combine the visual loss degree assessment to select the optimal embedding method to optimize the embedding and visual fidelity of the secret message.

Benefits of technology

It achieves efficient embedding of secret messages, effectively preventing document content tampering while maintaining document readability to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634829A_ABST
    Figure CN120634829A_ABST
Patent Text Reader

Abstract

The invention discloses a security encryption management method and system for an all-in-one machine, and the method comprises the steps: taking every three pixel points in a document image as an embedded combination, dividing any two pixel points in the embedded combination into a first group, dividing the remaining pixel point into a second group, obtaining all grouping modes, and carrying out the grouping of the first group and the second group; obtaining a characteristic value sequence of each grouping mode, determining a plurality of embedding methods according to the difference between the characteristic value sequence of each grouping mode and the watermark sequence, determining the visual loss degree according to the pixel value change condition of the pixel points in each embedding method, and screening the optimal embedding method according to the visual loss degree. And obtaining an embedded image according to the optimal embedding method, and encrypting and storing the embedded image. According to the method, the secret message is embedded into the document image in a minimum visual interference manner, so that the content of the document can be effectively prevented from being illegally tampered, and the readability of the document is kept to the greatest extent while the information security is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more specifically, to an all-in-one machine security encryption management method and system. Background Art

[0002] In the field of information security, the need for tamper-proofing binary document images is becoming increasingly prominent. By embedding secret messages in binary document images, it is possible to covertly mark document content and detect tampering. This method has stronger concealment and anti-attack capabilities than explicit watermarking.

[0003] However, binary document images only contain black and white pixels, and the information redundancy is extremely low. Improper embedding strategies may cause changes in the character morphology in the document, such as the breakage of Chinese character strokes, the distortion of digital structure, or the disappearance of letter serifs, affecting the readability of the document.

[0004] Therefore, there is an urgent need for an all-in-one secure encryption management method to embed secret messages into binary document images, ensuring information security while maintaining document readability. Summary of the Invention

[0005] To solve the technical problem that the above-mentioned improper embedding strategy may cause the character morphology in the document to change and affect the readability of the document, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides an all-in-one machine security encryption management method, comprising: Obtain a document image, where the document image is a binary image; treat every three pixels in the document image as an embedding combination; divide any two pixels in the embedding combination into a first group, and divide the remaining pixel into a second group, and obtain all grouping methods; Obtaining a feature value sequence for each grouping method, wherein each element in the feature value sequence is a feature value obtained by mapping the pixel values ​​of two groups of pixels in each embedding combination; According to the difference between the characteristic value sequence of each grouping method and the watermark sequence, multiple embedding methods corresponding to each grouping method are determined; Determine the degree of visual loss of each embedding method based on the change in pixel value of each embedding method; select the optimal embedding method based on the degree of visual loss of each embedding method, and obtain the embedded image based on the optimal embedding method; Encrypted storage of embedded images.

[0007] Preferably, the obtaining of all grouping modes includes: There are six grouping methods, which use the three pixels in the embedding combination to 、 、 To indicate that the first grouping method is: 、 For the first group, For the second group; The second grouping method is: 、 For the first group, For the second group; The third grouping method is: 、 For the first group, For the second group; The fourth grouping method is: 、 For the first group, For the second group; The fifth grouping method is: 、 For the first group, For the second group; The sixth grouping method is: 、 For the first group, For the second group.

[0008] Preferably, obtaining the characteristic value sequence of each grouping method includes: Any grouping method is used as the target grouping method; for any embedding combination, the pixel values ​​of the two pixels in the first group of the embedding combination under the target grouping method are concatenated in the order of the pixels into a binary number with a length of 2 as the first embedding bit, and the first embedding bit is converted into a decimal system as the first embedding element; the pixel values ​​of the pixels in the second group of the embedding combination under the target grouping method are regarded as a binary number with a length of 1 as the second embedding bit, and the second embedded bit is converted into a decimal system as the second embedding element; Obtaining a characteristic value of each embedding combination under the target grouping mode according to the first embedding element and the second embedding element of each embedding combination under the target grouping mode; The eigenvalues ​​of all embedding combinations under the target grouping method are combined to form a eigenvalue sequence in the order of embedding combinations.

[0009] Preferably, the characteristic values ​​of the embedding combinations under the target grouping method satisfy the expression: ; in, represents the first embedded element of the i-th embedded combination under the target grouping mode; represents the second embedded element of the i-th embedded combination under the target grouping mode; F( ) is the mapping function between the first embedded element and the second embedded element; represents the eigenvalue of the i-th embedding combination under the target grouping mode; mod represents the remainder symbol.

[0010] Preferably, the method of determining the multiple embedding methods corresponding to each grouping mode according to the difference between the feature value sequence and the watermark sequence of each grouping mode includes: Obtain the difference between the characteristic value of each embedding combination in the target grouping mode and the corresponding element in the watermark sequence, and divide the difference by 5 as the remainder as the change amount of each embedding combination in the target grouping mode. express; Get the feature value of each embedding combination to change When , all the ways of changing the first embedded bit and the second embedded bit in each embedding combination are recorded as all the ways of changing each embedding combination under the target grouping mode; for each embedding combination, any one way of changing the embedding combination under the target grouping mode is selected, and the ways of changing selected by all embedding combinations constitute an embedding method under the target grouping mode; Get all possible embedding methods under the target grouping method.

[0011] Preferably, determining the degree of visual loss of each embedding method according to the change of pixel values ​​of the pixels in each embedding method includes: Perform skeleton extraction on the foreground in the document image. For each skeleton pixel, obtain the distance from the skeleton pixel to the nearest background pixel in the document image, and use this distance as the local half-width of the stroke at the skeleton pixel. The average of the local half-widths of the strokes at all skeleton pixels is used as the stroke half-width. Take any embedding method as the target embedding method, obtain the embedding loss of each pixel in the document image under the target embedding method according to the distance from each pixel in the document image to the nearest skeleton pixel and the half-width of the stroke, and take the average of the embedding loss of all pixels in the document image under the target embedding method as the visual loss degree of the target embedding method.

[0012] Preferably, the embedding loss of each pixel under the target embedding method satisfies the expression: ; Where, Represents the embedding loss of the k-th pixel in the document image under the target embedding method; represents the kth pixel in the document image, Indicates that under the target embedding method, the pixel value of the k-th pixel changes from 1 to 0; Indicates that under the target embedding method, the pixel value of the k-th pixel changes from 0 to 1; Indicates that under the target embedding method, the pixel value of the k-th pixel remains 0; Indicates that under the target embedding method, the pixel value of the k-th pixel remains 1; Represents the distance from the kth pixel to the nearest foreground pixel; represents the distance from the kth pixel to the nearest skeleton pixel; w represents the half-width of the stroke; Indicates the number of newly added black pixels in the eight-neighborhood of the k-th pixel under the target embedding method; represents the number of pixels in the eight-neighborhood of the k-th pixel; exp() represents an exponential function with a natural constant as the base.

[0013] Preferably, screening the optimal embedding method according to the degree of visual loss of each embedding method includes: The embedding method with the least visual loss is taken as the optimal embedding method.

[0014] Preferably, obtaining the embedded image according to the optimal embedding method includes: The pixel value of each pixel in the document image is changed according to the changing method under the optimal embedding method, and the document image after the change is used as the embedded image.

[0015] In a second aspect, the present invention provides an all-in-one security encryption management system, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned all-in-one security encryption management method is implemented.

[0016] By adopting the above technical solution, the above-mentioned all-in-one security encryption management method is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made based on the memory and the processor for easy use.

[0017] The beneficial effects of the present invention are: This method achieves an optimal balance between efficient embedding of secret messages and visual fidelity by dynamically grouping pixels in binary document images and calculating eigenvalue sequences. By adopting a three-pixel combination and a multi-grouping strategy, the present invention significantly improves the flexibility of the embedding position, enabling the secret information to be adaptively distributed in the anti-interference area of ​​the character, effectively avoiding the stroke breakage or morphological distortion caused by traditional block embedding. By analyzing the differences between the eigenvalue sequence and the watermark sequence, combined with a visual loss degree assessment mechanism, the present invention dynamically selects the optimal embedding method, prioritizing the modification scheme with the least impact on the character structure. This effectively prevents the document content from being illegally tampered with while maintaining the document's readability to the greatest extent possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 is a flow chart schematically illustrating a method for managing security encryption of an all-in-one machine in the present invention; Figure 2 is a flowchart schematically showing step S2. DETAILED DESCRIPTION

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0020] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0021] The embodiment of the present invention discloses a method for managing the security encryption of an integrated machine, referring to Figure 1 , including steps S1 to S3: S1. Acquire a document image, where the document image is a binary image.

[0022] It should be noted that the purpose of the present invention is to encrypt and store document images using an encryption integrated machine. Since most documents only contain black fonts and white backgrounds, the present invention performs encryption and storage on binary document images.

[0023] Specifically, when the document to be encrypted and stored is a paper document, the paper document is scanned and the scanned image is converted into a binary image as the document image. When the document to be encrypted and stored is an electronic document, the electronic document is converted into a binary image to obtain the document image.

[0024] S2. Embed secret messages into document images.

[0025] It should be noted that the Exploiting Modification Direction (EMD) steganography algorithm is an information hiding technique that can be used to hide secret messages in grayscale images. The basic idea of ​​the EMD algorithm is to treat two pixels in a grayscale image as a group and adjust the pixel values ​​in the group according to a defined function f to hide secret quinary digital information. Building on the EMD algorithm, the present invention treats three pixels in a binary image as an embedding group and dynamically groups the embedded groups. By changing the pixel values ​​of the pixels in the embedding group, secret messages can be embedded in binary document images.

[0026] Specifically, the flowchart of step S2 is as follows: Figure 2 , including steps S201 to S205, specifically: S201. Take every three pixels in the document image as an embedding combination, divide any two pixels in the embedding combination into a first group, divide the remaining pixel into a second group, and obtain all grouping methods.

[0027] Specifically, every three pixels in the document image are regarded as an embedding combination, and the same pixel belongs to only one embedding combination.

[0028] Divide any two pixels in the embedded combination into the first group, and divide the remaining pixel into the second group. The order of the pixels in the first group needs to be considered during the division.

[0029] There are six grouping methods in total. If the three pixels in the embedded combination are respectively 、 、 To express, the first grouping method is: 、 For the first group, For the second group; the second grouping method is: 、 For the first group, The second group; the third grouping method is: 、 For the first group, The fourth grouping method is: 、 For the first group, The second group; the fifth grouping method is: 、 For the first group, The second group; the sixth grouping method is: 、 For the first group, For the second group.

[0030] S202: Obtain a sequence of characteristic values ​​for each grouping method.

[0031] Specifically, any grouping method is used as the target grouping method. For any embedding combination, the first group of the embedding combination under the target grouping method is obtained, the pixel values ​​of two pixels in the first group are concatenated into a binary number of length 2 in the order of the pixels, and the first embedded bit is converted into a decimal number as the first embedded element; the second group of the embedding combination under the target grouping method is obtained, the pixel values ​​of the pixels in the second group are regarded as a binary number of length 1 as the second embedded bit, and the second embedded bit is converted into a decimal number as the second embedded element.

[0032] According to the first embedded element and the second embedded element of each embedded combination in the target grouping mode, the characteristic value of each embedded combination in the target grouping mode is obtained: ; in, represents the first embedded element of the i-th embedded combination under the target grouping mode; represents the second embedded element of the i-th embedded combination under the target grouping mode; F( ) is the mapping function between the first embedded element and the second embedded element; represents the eigenvalue of the i-th embedding combination under the target grouping mode; mod represents the remainder symbol.

[0033] It should be noted that if the length of the first embedded bit is 2, then after conversion to decimal, it can be 0, 1, 2, or 3, that is, the value range of the first embedded element is {0, 1, 2, 3}. If the length of the second embedded bit is 1, then after conversion to decimal, it can be 0 or 1, that is, the value range of the second embedded element is {0, 1}. Therefore, the value range of the eigenvalue obtained by the mapping function F() is {0, 1, 2, 3, 4}.

[0034] Furthermore, the feature values ​​of all embedding combinations in the target grouping manner are combined to form a feature value sequence in the order of embedding combinations.

[0035] S203: Determine multiple embedding methods corresponding to each grouping method according to the difference between the feature value sequence and the watermark sequence of each grouping method.

[0036] Specifically, a secret message is set. The secret message is a binary sequence specified by the document manager. It can be a binary sequence corresponding to the document manager's fingerprint binary image, or a binary sequence corresponding to the encoded keywords in the document.

[0037] The secret message is converted into a quinary number, and each digit of the quinary number is used as a watermark data. All the watermark data are combined into a one-dimensional sequence as the watermark sequence. When the length of the watermark sequence is less than M, the required number of watermark data are sequentially intercepted starting from the first watermark data in the watermark sequence and appended to the end of the watermark sequence as padding until the length of the watermark sequence reaches M. When the length of the watermark sequence exceeds M, only the first M watermark data are retained.

[0038] Furthermore, the difference between the eigenvalue sequence under the target grouping mode and the corresponding elements in the watermark sequence is used to obtain the change amount of each embedding combination under the target grouping mode: ; in, represents the change of the i-th embedding combination under the target grouping method; represents the eigenvalue of the i-th embedding combination under the target grouping mode; represents the first embedded element of the i-th embedded combination under the target grouping mode; represents the second embedded element of the i-th embedded combination under the target grouping mode; Represents the i-th watermark data in the watermark sequence; mod represents the remainder symbol.

[0039] Further, obtain the eigenvalue of the i-th embedding combination to change When , all the ways of changing the first embedded bit and the second embedded bit in the i-th embedding combination are recorded as all the ways of changing the i-th embedding combination under the target grouping mode.

[0040] For example, when the first embedded bit is 00 and the second embedded bit is 0, the characteristic value is 0. If the change amount is 0, the characteristic value 0 needs to be changed to (0+0)mod5=0. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the characteristic value remains 0; the second way is: the first embedded bit is changed to 11 and the second embedded bit is changed to 1, so that the characteristic value is 0. If the change is 1, the eigenvalue 0 needs to be changed to (0+1)mod5=1. Then there is a way to change it, that is, to change the first embedded bit to 01 and keep the second embedded bit unchanged, so that the eigenvalue becomes 1; If the change is 2, and the eigenvalue 0 needs to be changed to (0+2)mod5=2, there are two ways to change it. The first is to change the first embedded bit to 10 and the second embedded bit remains unchanged, so that the eigenvalue becomes 2. The second is to change the second embedded bit to 1 and the first embedded bit remains unchanged, so that the eigenvalue becomes 2. If the change is 3, the eigenvalue 0 needs to be changed to (0+3)mod5=3. There are two ways to change it. The first is to change the first embedded bit to 11 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 3. The second is to change the first embedded bit to 01 and the second embedded bit to 1, so that the eigenvalue becomes 3. If the change amount is 4, the eigenvalue 0 needs to be changed to (0+4)mod5=4. Then there is a way to change it, that is, to change the first embedded bit to 10 and the second embedded bit to 1, so that the eigenvalue becomes 4.

[0041] For example, when the first embedded bit is 01 and the second embedded bit is 0, the eigenvalue is 1. If the change amount is 0, the eigenvalue 1 needs to be changed to (1+0)mod5=1. Then there is a change method in which both the first embedded bit and the second embedded bit remain unchanged so that the eigenvalue remains 1. If the change is 1, and the eigenvalue 1 needs to be changed to (1+1)mod5=2, there are two ways to change it. The first is to change the first embedded bit to 10 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 2. The second is to change the first embedded bit to 00 and the second embedded bit to 1, so that the eigenvalue becomes 2. If the change is 2, and the eigenvalue 1 needs to be changed to (1+2)mod5=3, there are two ways to change it. The first is to change the first embedded bit to 11 and the second embedded bit remains unchanged, so that the eigenvalue becomes 3. The second is to change the second embedded bit to 1 and the first embedded bit remains unchanged, so that the eigenvalue becomes 3. If the change is 3, and the eigenvalue 1 needs to be changed to (1+3)mod5=4, then there is a way to change it, that is, to change the first embedded bit to 10 and the second embedded bit to 1, so that the eigenvalue becomes 4; If the change is 4, the eigenvalue 1 needs to be changed to (1+4)mod5=0. There are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit remains unchanged, so that the eigenvalue becomes 0. The second is to change the first embedded bit to 11 and the second embedded bit to 1, so that the eigenvalue becomes 0.

[0042] For example, when the first embedded bit is 10 and the second embedded bit is 0, the eigenvalue is 2. If the change amount is 0, the eigenvalue 2 needs to be changed to (2+0)mod5=2. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 2; the second way is: the first embedded bit is changed to 00 and the second embedded bit is changed to 1, so that the eigenvalue is 2. If the change is 1, and the eigenvalue 2 needs to be changed to (2+1)mod5=3, there are two ways to change it. The first is to change the first embedded bit to 11 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 3. The second is to change the first embedded bit to 01 and the second embedded bit to 1, so that the eigenvalue becomes 3. If the change is 2, and the eigenvalue 2 needs to be changed to (2+2)mod5=4, then there is a way to change it, that is, to change the first embedded bit to 10 and the second embedded bit to 1, so that the eigenvalue becomes 4; If the change is 3, the eigenvalue 2 needs to be changed to (2+3)mod5=0. There are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 0. The second is to change the first embedded bit to 11 and the second embedded bit to 1, so that the eigenvalue becomes 0. If the change amount is 4, the eigenvalue 2 needs to be changed to (2+4)mod5=1. Then there is a way to change it, that is, to modify the first embedded bit to 01, and keep the second embedded bit unchanged, so that the eigenvalue becomes 1.

[0043] For example, when the first embedded bit is 11 and the second embedded bit is 0, the eigenvalue is 3. If the change amount is 0, the eigenvalue 3 needs to be changed to (3+0)mod5=3. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 3; the second way is: the first embedded bit is changed to 01 and the second embedded bit is changed to 1, so that the eigenvalue is 3. If the change is 1, and the eigenvalue 3 needs to be changed to (3+1)mod5=4, then there is a way to change it, that is, to change the first embedded bit to 10 and the second embedded bit to 1, so that the eigenvalue becomes 4; If the change is 2, and the eigenvalue 3 needs to be changed to (3+2)mod5=0, there are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit remains unchanged, so that the eigenvalue becomes 0; the second is to change the second embedded bit to 1 and the first embedded bit remains unchanged, so that the eigenvalue becomes 0. If the change is 3, and the eigenvalue 3 needs to be changed to (3+3)mod5=1, then there is a way to change it, that is, to change the first embedded bit to 01, and keep the second embedded bit unchanged, so that the eigenvalue becomes 1; If the change is 4, the eigenvalue 3 needs to be changed to (3+4)mod5=2. There are two ways to change it. The first is to change the first embedded bit to 10 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 2. The second is to change the first embedded bit to 00 and the second embedded bit to 1, so that the eigenvalue becomes 2.

[0044] For example, when the first embedded bit is 00 and the second embedded bit is 1, the eigenvalue is 2. If the change amount is 0, the eigenvalue 2 needs to be changed to (2+0)mod5=2. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 2; the second way is: the first embedded bit is changed to 10 and the second embedded bit is changed to 0, so that the eigenvalue is 2. If the change is 1, and the eigenvalue 2 needs to be changed to (2+1)mod5=3, there are two ways to change it. The first is to change the first embedded bit to 01 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 3. The second is to change the first embedded bit to 11 and the second embedded bit to 0, so that the eigenvalue becomes 3. If the change is 2, and the eigenvalue 2 needs to be changed to (2+2)mod5=4, then there is a way to change it, that is, to change the first embedded bit to 10 and keep the second embedded bit unchanged, so that the eigenvalue becomes 4; If the change is 3, the eigenvalue 2 needs to be changed to (2+3)mod5=0. There are two ways to change it. The first is to change the second embedded bit to 0 and the first embedded bit remains unchanged, so that the eigenvalue becomes 0; the first embedded bit is changed to 11 and the second embedded bit remains unchanged, so that the eigenvalue becomes 0. If the change amount is 4, the eigenvalue 2 needs to be changed to (2+4)mod5=1. Then there is a way to change it, that is, to change the first embedded bit to 01 and the second embedded bit to 0, so that the eigenvalue becomes 1.

[0045] For example, when the first embedded bit is 01 and the second embedded bit is 1, the eigenvalue is 3. If the change amount is 0, the eigenvalue 3 needs to be changed to (3+0)mod5=3. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 3. The second way is: the first embedded bit is changed to 11 and the second embedded bit is changed to 0, so that the eigenvalue is 3. If the change is 1, and the eigenvalue 3 needs to be changed to (3+1)mod5=4, then there is a way to change it, that is, to change the first embedded bit to 10 and keep the second embedded bit unchanged, so that the eigenvalue becomes 4; If the change is 2, and the eigenvalue 3 needs to be changed to (3+2)mod5=0, there are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit to 0, so that the eigenvalue becomes 0; the second is to change the first embedded bit to 11 and the second embedded bit remains unchanged, so that the eigenvalue becomes 0. If the change is 3, and the eigenvalue 3 needs to be changed to (3+3)mod5=1, then there is a way to change it, that is, the first embedded bit remains unchanged, and the second embedded bit is changed to 0, so that the eigenvalue becomes 1; If the change is 4, the eigenvalue 3 needs to be changed to (3+4)mod5=2. There are two ways to change it. The first is to change the first embedded bit to 10 and the second embedded bit to 0, so that the eigenvalue becomes 2. The second is to change the first embedded bit to 00 and leave the second embedded bit unchanged, so that the eigenvalue becomes 2.

[0046] For example, when the first embedded bit is 10 and the second embedded bit is 1, the eigenvalue is 4. If the change amount is 0, the eigenvalue 4 needs to be changed to (4+0)mod5=4. Then there is a way to change it, that is, the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 4. If the change is 1, the eigenvalue 4 needs to be changed to (4+1)mod5=0. There are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit to 0, so that the eigenvalue becomes 0. The second is to change the first embedded bit to 11 and the second embedded bit remains unchanged, so that the eigenvalue becomes 0. If the change is 2, and the eigenvalue 4 needs to be changed to (4+2)mod5=1, there is a way to change it, that is, to change the first embedded bit to 01 and the second embedded bit to 0, so that the eigenvalue becomes 1; If the change is 3, and the eigenvalue 4 needs to be changed to (4+3)mod5=2, there are two ways to change it. The first is to change the first embedded bit to 00 and the second embedded bit remains unchanged, so that the eigenvalue becomes 2. The second is to change the second embedded bit to 0 and the first embedded bit remains unchanged, so that the eigenvalue becomes 2. If the change is 4, the eigenvalue 2 needs to be changed to (2+4)mod5=3. There are two ways to change it. The first is to change the first embedded bit to 01 and the second embedded bit to remain unchanged, so that the eigenvalue becomes 3. The second is to change the first embedded bit to 11 and the second embedded bit to 0, so that the eigenvalue becomes 3.

[0047] For example, when the first embedded bit is 11 and the second embedded bit is 1, the eigenvalue is 0. If the change amount is 0, the eigenvalue 0 needs to be changed to (0+0)mod5=0. There are two ways to change it. The first way is: the first embedded bit and the second embedded bit remain unchanged, so that the eigenvalue remains 0; the second way is: the first embedded bit is changed to 00 and the second embedded bit is changed to 0, so that the eigenvalue is 0. If the change is 1, the eigenvalue 0 needs to be changed to (0+1)mod5=1. Then there is a way to change it, that is, to change the first embedded bit to 01 and the second embedded bit to 0, so that the eigenvalue becomes 1; If the change is 2, and the eigenvalue 0 needs to be changed to (0+2)mod5=2, there are two ways to change it. The first is to change the first embedded bit to 10 and the second embedded bit to 0, so that the eigenvalue becomes 2. The second is to change the first embedded bit to 00 and the second embedded bit remains unchanged, so that the eigenvalue becomes 2. If the change is 3, and the eigenvalue 0 needs to be changed to (0+3)mod5=3, there are two ways to change it. The first is to change the first embedded bit to 01 and the second embedded bit remains unchanged, so that the eigenvalue becomes 3. The second is to change the second embedded bit to 0 and the first embedded bit remains unchanged, so that the eigenvalue becomes 3. If the change is 4, the eigenvalue 0 needs to be changed to (0+4)mod5=4. There is a way to change it. The first way is: change the first embedded bit to 10 and keep the second embedded bit unchanged, so that the eigenvalue becomes 4.

[0048] Furthermore, for each embedding combination, any change mode of the embedding combination under the target grouping mode is selected, and the change modes selected by all embedding combinations constitute an embedding method under the target grouping mode, and the embedding method records the change mode selected by each embedding combination.

[0049] Get all possible embedding methods under the target grouping method.

[0050] It should be noted that the first embedded bits consist of the pixel values ​​of the first group of pixels in the embedding combination, and the second embedded bits consist of the pixel values ​​of the second group of pixels in the embedding combination. Changing the first and second embedded bits of the embedding combination essentially changes the pixel values ​​of the pixels in the embedding combination. Therefore, each embedding method essentially records the way the pixel values ​​of each pixel in the document image are changed.

[0051] S204: Determine the degree of visual loss of each embedding method according to the change of pixel values ​​of the pixels in each embedding method.

[0052] The white area in the document image is regarded as the background and the black area is regarded as the foreground. Then the white pixels in the document image are the background pixels and the black pixels are the foreground pixels.

[0053] The foreground of the document image is subjected to skeleton extraction, and the pixels on the extracted skeleton are used as skeleton pixels. The extracted skeleton reflects the glyph structure of the text in the document image. It should be noted that skeleton extraction is a well-known technology and will not be described in detail here.

[0054] For each skeleton pixel, obtain the distance from the skeleton pixel to the nearest background pixel in the document image and use this distance as the local half-width of the stroke at that skeleton pixel. The average of the local half-widths of the strokes at all skeleton pixels is used as the stroke half-width.

[0055] Take any embedding method as the target embedding method and obtain the embedding loss of each pixel in the document image under the target embedding method: ; Where, Represents the embedding loss of the k-th pixel in the document image under the target embedding method; represents the kth pixel in the document image, Indicates that under the target embedding method, the pixel value of the k-th pixel in the document image changes from 1 to 0, that is, the k-th pixel changes from white to black; represents the distance from the kth pixel in the document image to the nearest foreground pixel; w represents the half-width of the stroke; Indicates the number of newly added black pixels in the eight-neighborhood of the k-th pixel in the document image under the target embedding method. The newly added black pixels are the pixels whose pixel values ​​in the eight-neighborhood of the k-th pixel change from 1 to 0 under the target embedding method. Represents the number of pixels in the eight-neighborhood of the k-th pixel in the document image; exp() represents an exponential function with a natural constant as the base. The exponential function exp() is used to Perform negative correlation normalization, Divide by the half-width w of the stroke to prevent Larger, resulting in Negative correlation normalization is always smaller. Divide by , used for Perform normalization.

[0056] When the distance between the kth pixel in the document image and the nearest foreground pixel If the pixel value of the kth pixel is changed from 1 to 0, new black pixels are added around the text. The newly added black pixels in the eight neighborhoods of the kth pixel in the document image are connected to the kth pixel to form an area. If the number of newly added black pixels is The more the number of pixels, the more obvious the area will be visually, and it may be mistaken for a stroke of the text. In this case, the greater the impact on the glyph structure of the text, the greater the embedding loss. Conversely, when the distance from the kth pixel in the document image to the nearest foreground pixel is The larger the value, the number of new black pixels in the eight neighborhoods of the k-th pixel in the document image. The smaller the number, the smaller the impact on the glyph structure of the text, and the smaller the embedding loss.

[0057] Where, Indicates that under the target embedding method, the pixel value of the k-th pixel in the document image changes from 0 to 1, that is, the k-th pixel changes from black to white; Represents the distance from the kth pixel in the document image to the nearest skeleton pixel. Divide by the half-width w of the stroke to Normalize, the exponential function exp( ) is used to Perform negative correlation mapping. When the kth pixel in the document image is a skeleton pixel, the distance from the kth pixel in the document image to the nearest skeleton pixel is set to 0. When the distance from the kth pixel in the document image to the nearest skeleton pixel is set to The smaller the value, the greater the impact on the glyph structure of the text if the pixel value of the kth pixel is changed from 0 to 1, and the greater the embedding loss. Conversely, when the distance from the kth pixel in the document image to the nearest skeleton pixel is When the value of the kth pixel is changed from 0 to 1, the effect on the glyph structure of the text is smaller, and the embedding loss is smaller.

[0058] Where, Indicates that under the target embedding method, the pixel value of the k-th pixel in the document image remains 0, that is, the k-th pixel remains black; Indicates that under the target embedding method, the pixel value of the k-th pixel in the document image remains 1, that is, the k-th pixel remains white. When the pixel value of the k-th pixel remains unchanged, the embedding loss of the k-th pixel is 0.

[0059] Furthermore, the average of the embedding loss of all pixels in the document image under the target embedding method is taken as the visual loss degree of the target embedding method.

[0060] S205 , selecting an optimal embedding method according to the degree of visual loss of each embedding method, and obtaining an embedded image according to the optimal embedding method.

[0061] The embedding method with the least visual loss is taken as the optimal embedding method, and the grouping method corresponding to the optimal embedding method is taken as the optimal grouping method.

[0062] The pixel value of each pixel in the document image is changed according to the changing method under the optimal embedding method, and the document image after the change is used as the embedded image.

[0063] S3. Encrypt and store the embedded image.

[0064] The embedded image is encrypted using the encryption algorithm in the encryption appliance to generate an encrypted result. The encrypted result is stored in the encryption appliance and a physically isolated backup server. The secret message, optimal grouping method, and the encryption key for the embedded image are stored on a separate key device, such as an encrypted USB drive.

[0065] When relevant personnel need to view the document, they connect the key device to the encryption machine, use the key stored on the key device to decrypt the encryption result stored on the encryption machine, and obtain the embedded image.

[0066] The optimal grouping method stored on the key device is used to group the embedding combinations in the embedded image, and the eigenvalues ​​of each embedding combination under the optimal grouping method are obtained. All the eigenvalues ​​are spliced ​​together as a quinary number, and the quinary number is converted into a binary number to obtain the secret message hidden in the embedded image.

[0067] The secret message stored on the key device is used as the baseline data. If the length of the baseline data is less than the length of the secret message hidden in the embedded image, the required number of bits are truncated from the starting bit position of the baseline data and appended to the end of the baseline data as padding until the length of the baseline data matches the length of the secret message hidden in the embedded image. If the length of the baseline data is greater than the length of the secret message hidden in the embedded image, the bits equal to the length of the secret message hidden in the embedded image are truncated from the starting bit position of the baseline data and used as the new baseline data.

[0068] The baseline data is compared with the secret message hidden in the embedded image. If the two values ​​are identical, the document has not been tampered with, and the embedded image is provided to relevant personnel for review. If the two values ​​are different, the document has been tampered with, and the management personnel are alerted to conduct tamper tracing and restore the untampered document data from a physically isolated backup server.

[0069] An embodiment of the present invention further discloses an all-in-one security encryption management system, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an all-in-one security encryption management method according to the present invention is implemented.

[0070] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

[0071] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, etc., unless otherwise clearly defined.

[0072] While this specification has shown and described several embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that in practicing the present invention, alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A method for managing the security encryption of an all-in-one machine, characterized in that: include: Obtain a document image, where the document image is a binary image; treat every three pixels in the document image as an embedding combination; divide any two pixels in the embedding combination into a first group, and divide the remaining pixel into a second group, and obtain all grouping methods; Obtaining a feature value sequence for each grouping method, wherein each element in the feature value sequence is a feature value obtained by mapping the pixel values ​​of two groups of pixels in each embedding combination; According to the difference between the characteristic value sequence of each grouping method and the watermark sequence, multiple embedding methods corresponding to each grouping method are determined; Determine the degree of visual loss of each embedding method based on the change in pixel value of each embedding method; select the optimal embedding method based on the degree of visual loss of each embedding method, and obtain the embedded image based on the optimal embedding method; Encrypted storage of embedded images.

2. The method for managing security encryption of an all-in-one machine according to claim 1, characterized in that: The method of obtaining all groupings includes: There are six grouping methods, which use the three pixels in the embedding combination to 、 、 To indicate that the first grouping method is: 、 For the first group, For the second group; The second grouping method is: 、 For the first group, For the second group; The third grouping method is: 、 For the first group, For the second group; The fourth grouping method is: 、 For the first group, For the second group; The fifth grouping method is: 、 For the first group, For the second group; The sixth grouping method is: 、 For the first group, For the second group.

3. The method for managing security encryption of an all-in-one machine according to claim 1, characterized in that: The step of obtaining a sequence of characteristic values ​​for each grouping method includes: Any grouping method is used as the target grouping method; for any embedding combination, the pixel values ​​of the two pixels in the first group of the embedding combination under the target grouping method are concatenated in the order of the pixels into a binary number with a length of 2 as the first embedding bit, and the first embedding bit is converted into a decimal system as the first embedding element; the pixel values ​​of the pixels in the second group of the embedding combination under the target grouping method are regarded as a binary number with a length of 1 as the second embedding bit, and the second embedded bit is converted into a decimal system as the second embedding element; Obtaining a characteristic value of each embedding combination under the target grouping mode according to the first embedding element and the second embedding element of each embedding combination under the target grouping mode; The eigenvalues ​​of all embedding combinations under the target grouping method are combined to form a eigenvalue sequence in the order of embedding combinations.

4. The method for managing security encryption of an integrated machine according to claim 3, characterized in that: The characteristic values ​​of each embedding combination under the target grouping method satisfy the expression: ; in, represents the first embedded element of the i-th embedded combination under the target grouping mode; represents the second embedded element of the i-th embedded combination under the target grouping mode; F( ) is the mapping function between the first embedded element and the second embedded element; represents the eigenvalue of the i-th embedding combination under the target grouping mode; mod represents the remainder symbol.

5. The method for managing security encryption of an all-in-one machine according to claim 1, characterized in that: The method of determining the multiple embedding methods corresponding to each grouping mode according to the difference between the characteristic value sequence of each grouping mode and the watermark sequence includes: Obtain the difference between the characteristic value of each embedding combination in the target grouping mode and the corresponding element in the watermark sequence, and divide the difference by 5 as the remainder as the change amount of each embedding combination in the target grouping mode. express; Get the feature value of each embedding combination to change When , all the ways of changing the first embedded bit and the second embedded bit in each embedding combination are recorded as all the ways of changing each embedding combination under the target grouping mode; for each embedding combination, any one way of changing the embedding combination under the target grouping mode is selected, and the ways of changing selected by all embedding combinations constitute an embedding method under the target grouping mode; Get all possible embedding methods under the target grouping method.

6. The method for managing security encryption of an all-in-one machine according to claim 1, characterized in that: Determining the degree of visual loss of each embedding method according to the change of pixel values ​​of the pixels in each embedding method includes: Perform skeleton extraction on the foreground in the document image. For each skeleton pixel, obtain the distance from the skeleton pixel to the nearest background pixel in the document image, and use this distance as the local half-width of the stroke at the skeleton pixel. The average of the local half-widths of the strokes at all skeleton pixels is used as the stroke half-width. Take any embedding method as the target embedding method, obtain the embedding loss of each pixel in the document image under the target embedding method according to the distance from each pixel in the document image to the nearest skeleton pixel and the half-width of the stroke, and take the average of the embedding loss of all pixels in the document image under the target embedding method as the visual loss degree of the target embedding method.

7. The method for managing security encryption of an all-in-one machine according to claim 6, characterized in that: The embedding loss of each pixel under the target embedding method satisfies the expression: ; Where, Represents the embedding loss of the k-th pixel in the document image under the target embedding method; represents the kth pixel in the document image, Indicates that under the target embedding method, the pixel value of the k-th pixel changes from 1 to 0; Indicates that under the target embedding method, the pixel value of the k-th pixel changes from 0 to 1; Indicates that under the target embedding method, the pixel value of the k-th pixel remains 0; Indicates that under the target embedding method, the pixel value of the k-th pixel remains 1; Represents the distance from the kth pixel to the nearest foreground pixel; represents the distance from the kth pixel to the nearest skeleton pixel; w represents the half-width of the stroke; Indicates the number of newly added black pixels in the eight-neighborhood of the k-th pixel under the target embedding method; represents the number of pixels in the eight-neighborhood of the k-th pixel; exp() represents an exponential function with a natural constant as the base.

8. The method for managing security encryption of an integrated machine according to claim 1, characterized in that: The method of selecting the optimal embedding method according to the degree of visual loss of each embedding method includes: The embedding method with the least visual loss is taken as the optimal embedding method.

9. A method for managing security encryption of an all-in-one machine according to any one of claims 1 to 8, characterized in that: The step of obtaining an embedded image according to the optimal embedding method includes: The pixel value of each pixel in the document image is changed according to the changing method under the optimal embedding method, and the document image after the change is used as the embedded image.

10. An all-in-one security encryption management system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an all-in-one security encryption management method according to any one of claims 1 to 9 is implemented.