A method for realizing traceable fonts
By encrypting the font, the information leakage problem caused by screenshots and taking photos is solved, and the reliability of traceability is improved without affecting reading.
Patent Information
- Application Number
- CN202110966040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-23
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2041-08-23
AI Technical Summary
Screenshots and photography methods lead to leaking important information and it is difficult to trace the source. The existing watermarking solution affects reading or traceability.
By encrypting the font, including denoising, column calculation and pixel-level traversal, encrypted fonts are generated to achieve traceability.
It realizes that the information leaked by screenshots and photos can be effectively traced without affecting reading, improving the reliability of traceability.
Smart Images

Figure CN115712904B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information technology, and in particular to a method for realizing a traceable font. Background Art
[0002] With the in-depth development of information technology and the increasing application of data, the leakage of electronic documents is also on the rise. Screenshots and photos can lead to the leakage of important information, and tracing the source is difficult. Therefore, how to effectively prevent and control these leaks and quickly trace them is an urgent problem that needs to be solved.
[0003] The current commonly used solution is to add watermarks to pages. However, if the watermarks are too dense, it will affect the readability of the text, and if they are too sparse, it will affect the traceability of the watermark. This invention uses a new method to directly encrypt the fonts to achieve the traceability of the text. Summary of the Invention
[0004] In order to solve the problem that screenshots, photos and other means may lead to the leakage of important information and the difficulty of tracing the source, the purpose of the present invention is to provide a method for implementing traceable fonts.
[0005] In order to achieve the above object, the present invention adopts the following technical solution: a method for realizing traceable fonts, comprising the following steps:
[0006] S1, denoising the screenshots or photos with text information;
[0007] S2, find the starting column x0 and ending column x1 of the word, calculate the width w of the word, divide it into 10 equal parts, and the width of each part is w / 10, which is rounded to w1;
[0008] S3, find the encrypted column;
[0009] S4, find the first encrypted column x, then the column coordinate of the encryption end column is x+w1;
[0010] S5, calculation of encrypted numbers to achieve traceability.
[0011] Preferably, the S1 is used to improve the recognition accuracy of key text information in the image.
[0012] Preferably, in S3, pixel-level traversal is performed on each point in each column. If the color variance of a point is greater than a certain threshold, it is determined to be an encrypted point, and the column where it is located is also an encrypted column.
[0013] Preferably, in S5, the encrypted column may be multiple columns, that is, from column x to column x+w1, and the column coordinates of the middle column are first calculated:
[0014] x'=x+(w1+2) / 2;
[0015] Calculate the encrypted number S through x':
[0016] S=(x'–x0) / w1;
[0017] By performing the above calculation on a series of encrypted fonts, the digital sequence corresponding to the string of fonts can be obtained.
[0018] Preferably, in S1, the text information is in encrypted font, and the steps for generating the encrypted font are specifically as follows:
[0019] A1. Calculate the word width w;
[0020] A2. Find the starting column x0 and ending column x1 of the text.
[0021] A3. Calculate the width of a single word w = x1 - x0;
[0022] A4, the width of each copy is w1 = w / 10, rounded up;
[0023] A5. Find the x coordinate of the starting column corresponding to the encrypted number.
[0024] A6. Change the black pixels from column x to column x+w1 to other colors.
[0025] A7. Generate encrypted fonts.
[0026] Compared with the prior art, the present invention achieves the following beneficial effects: the present invention achieves the text tracing effect by directly encrypting the fonts. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0028] Figure 1 A schematic diagram of an implementation method of the present invention;
[0029] Figure 2 A schematic diagram of the steps for generating an encrypted font according to the present invention;
[0030] Figure 3 A schematic diagram of dividing a font into 10 equal parts according to its width according to the present invention;
[0031] Figure 4 It is a structural schematic diagram of the font width of the present invention;
[0032] Figure 5 A schematic diagram of an object that needs to be encrypted according to the present invention;
[0033] Figure 6 This is a schematic diagram of the encrypted object of the present invention. DETAILED DESCRIPTION
[0034] The following describes the implementation of the present invention through specific embodiments. People skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
[0035] See also Figures 1 to 6 . It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they have no substantive technical significance. Any modification of the structure, change in the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the efficacy and purpose that can be achieved by the present invention. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of description, and are not used to limit the scope of the implementation of the present invention. Changes or adjustments in their relative relationships should also be regarded as the scope of the implementation of the present invention without substantially changing the technical content.
[0036] Example 1, a method for realizing a traceable font, comprising the following steps:
[0037] S1, denoising the screenshots or photos with text information;
[0038] S2, find the starting column x0 and ending column x1 of the word, calculate the width w of the word, divide it into 10 equal parts, and the width of each part is w / 10, which is rounded to w1;
[0039] S3, find the encrypted column;
[0040] S4, find the first encrypted column x, then the column coordinate of the encryption end column is x+w1;
[0041] S5, calculation of encrypted numbers to achieve traceability.
[0042] The S1 is used to improve the recognition accuracy of key text information in the image.
[0043] In S3, pixel-level traversal is performed on each point in each column. If the color variance of a point is greater than a certain threshold, it is determined to be an encrypted point, and the column it belongs to is also an encrypted column.
[0044] In S5, the encrypted columns may be multiple columns, that is, from column x to column x+w1, first calculate the column coordinates of the middle column:
[0045] x'=x+(w1+2) / 2;
[0046] Calculate the encrypted number S through x':
[0047] S=(x'–x0) / w1;
[0048] By performing the above calculation on a series of encrypted fonts, the digital sequence corresponding to the string of fonts can be obtained.
[0049] In S1, the text information is in encrypted font, and the steps for generating the encrypted font are as follows:
[0050] A1. Calculate the word width w;
[0051] A2. Find the starting column x0 and ending column x1 of the text.
[0052] A3. Calculate the width of a single word w = x1 - x0;
[0053] A4, the width of each copy is w1 = w / 10, rounded up;
[0054] A5. Find the x coordinate of the starting column corresponding to the encrypted number.
[0055] A6. Change the black pixels from column x to column x+w1 to other colors.
[0056] A7. Generate encrypted fonts.
[0057] Example 2,
[0058] Method for generating traceable fonts:
[0059] Choose a font such as bold, and encode each word individually. Each word represents a number from 0 to 9, and the words are combined to form an encrypted string. The encryption rules for single words are as follows: Divide the word into 10 equal parts according to the width of the font. Each part represents a number from 0 to 9 in turn. The first column from the left is 0, and the last column is 9, as shown below. Figure 3 As shown;
[0060] Font width calculation: Start from the column where the leftmost black pixel of the text is located to the column where the rightmost black pixel of the text is located, as follows Figure 4 As shown;
[0061] The single word encryption process is as follows:
[0062] (1) Calculate the width w of a single word and divide it into 10 equal parts. The width of each part is w / 10, which is rounded to w1.
[0063] (2) Find the horizontal coordinate x (pixel level) of the starting column corresponding to the encrypted number, and the pixel coordinate of the ending column is x+w1;
[0064] (3) The black pixels in the xth column to the x+w1th column are set to other colors (a color that is significantly different from black, such as red), thereby forming an encrypted font.
[0065] Example 3: The traceable font implementation method of the present invention can be widely used in various information systems. First, the login users of the system are uniformly coded with Arabic numerals, such as 235796. Then, by analyzing the text of each line, some text is selected for encryption. For example, according to the above rule algorithm, the following Figure 5 Encrypt the text;
[0066] The encrypted text is as follows Figure 6 As shown:
[0067] The encrypted text does not affect the overall reading, but by decrypting the encrypted text image, the ciphertext, that is, the digital code 235796, can be successfully interpreted.
[0068] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.
Claims
1. A method for realizing a traceable font, characterized in that: The following steps are included: S1, denoising the screenshot or photo with text information; the text information is in encrypted font, and the steps for generating the encrypted font are as follows: A1. Calculate the word width w; A2. Find the starting column x0 and ending column x1 of the text. A3. Calculate the width of a single word w = x1 - x0; A4, the width of each copy is w1 = w / 10, rounded up; A5. Find the x coordinate of the starting column corresponding to the encrypted number. A6. Change the black pixels from column x to column x+w1 to other colors. A7. Generate encrypted fonts; S2, find the starting column x0 and ending column x1 of the word, calculate the width w of the word, divide it into 10 equal parts, and the width of each part is w / 10, which is rounded to w1; S3: Perform pixel-level traversal on each point in each column. If the color variance of a point is greater than a certain threshold, it is determined to be an encrypted point and the column it belongs to is also an encrypted column. S4: Find the first encrypted column x. The column coordinates of the encrypted end column are x+w1. The encrypted column may be multiple columns, that is, from column x to column x+w1, first calculate the column coordinates of the middle column: x'=x+(w1+2) / 2; Calculate the encrypted number S through x': S=(x'–x0) / w1; By performing the above calculation on a series of encrypted fonts, the digital sequence corresponding to the string of fonts can be obtained; S5, calculation of encrypted numbers to achieve traceability.
2. The method for realizing a traceable font according to claim 1, characterized in that: The S1 is used to improve the recognition accuracy of key text information in the image.
Citation Information
Patent Citations
Binary image digit water mark embedding, extraction method and device
CN101122995A
Text watermark embedding and extracting method based on character structure characteristics
CN102968582A