File forgery prevention method and device
By identifying and adjusting the color of anti-counterfeiting characters in a file to generate a character code watermark, the problem of file anti-counterfeiting in existing technologies is solved, achieving effective anti-counterfeiting of electronic documents without affecting their aesthetics.
Patent Information
- Application Number
- CN202111682683.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2041-12-31
Smart Images

Figure CN114510454B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of anti-counterfeiting technology, and in particular to a file anti-counterfeiting method and device. BACKGROUND
[0002] Files are used for information transmission and information storage, and with the development of the economy and society, files play an increasingly important role in social life. Therefore, the authenticity and validity of files need to be guaranteed.
[0003] In the prior art, anti-counterfeiting technology is used to prevent file counterfeiting. The existing file anti-counterfeiting technology mainly includes three categories:
[0004] 1. Paper feature recognition, which identifies the texture of paper to determine the authenticity of a file. This method can only be used for paper files and has no effect on electronic files.
[0005] 2. Watermark technology, which uses special watermarks for anti-counterfeiting. However, this anti-counterfeiting technology is easy to counterfeit, and the watermark also affects the aesthetics of the file.
[0006] 3. Seal anti-counterfeiting. Since seal recognition is a relatively professional task, it is difficult for most people to achieve the desired anti-counterfeiting effect.
[0007] SUMMARY
[0008] To solve the above technical problems, the present application provides a file anti-counterfeiting method that can solve the file anti-counterfeiting problem in the prior art without affecting the aesthetics. The present application also provides a file anti-counterfeiting device.
[0009] The present application provides a file anti-counterfeiting method, comprising:
[0010] Obtaining a file to be counterfeited;
[0011] Identifying the file content of the file to be counterfeited, and determining anti-counterfeiting characters based on the file content;
[0012] Determining the color type of the anti-counterfeiting characters based on the color of the anti-counterfeiting characters, and modifying the value of the color based on the color type.
[0013] Optionally, a character code is set for each anti-counterfeiting character.
[0014] Connecting each character code to generate a character string, and adding the character string as a watermark to the file content.
[0015] Optionally, the character code includes numbers, letters, characters, and graphics.
[0016] Optionally, the string forms a regular group according to a preset rule when being used as a watermark.
[0017] Optionally, the implicit modification of the value of the color means that the value of the color of the whole or part of the anti-counterfeit character is modified.
[0018] The application also provides a file anti-counterfeiting device, comprising:
[0019] An acquisition module is configured to acquire a file to be protected against counterfeiting.
[0020] A device module is configured to identify file content of the file to be protected against counterfeiting, and determine an anti-counterfeit character according to the file content.
[0021] A modification module is configured to determine a color type of the anti-counterfeit character according to a color of the anti-counterfeit character, and modify the value of the color according to the color type.
[0022] Optionally, the device further comprises:
[0023] A character code module is configured to set a character code for each anti-counterfeit character.
[0024] A watermark module is configured to connect each character code to generate a string, and add the string as a watermark to the file content.
[0025] Optionally, the character code comprises a number, a letter, a character, and a pattern.
[0026] Optionally, the string forms a regular group according to a preset rule when being used as a watermark.
[0027] Optionally, the implicit modification of the value of the color means that the value of the color of the whole or part of the anti-counterfeit character is modified.
[0028] The application has the following advantages:
[0029] The application provides a file anti-counterfeiting method, comprising: acquiring a file to be protected against counterfeiting; identifying file content of the file to be protected against counterfeiting, and determining an anti-counterfeit character according to the file content; determining a color type of the anti-counterfeit character according to a color of the anti-counterfeit character, and modifying the value of the color according to the color type. The color change of the anti-counterfeit character realizes the anti-counterfeiting of the file, and does not affect the readability and aesthetic appearance of the file. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 FIG. 1 is a schematic diagram of a file anti-counterfeiting process in the application.
[0031] Figure 2 FIG. 2 is a schematic diagram of a file anti-counterfeiting device in the application. DETAILED DESCRIPTION
[0032] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific implementations disclosed below.
[0033] This application provides a document anti-counterfeiting method, comprising: acquiring a document to be anti-counterfeited; identifying the document content of the document to be anti-counterfeited; determining anti-counterfeiting characters based on the document content; determining and adjusting the color type of the anti-counterfeiting characters based on their color; and modifying the color value based on the color type. By changing the color of the anti-counterfeiting characters, document anti-counterfeiting is achieved without affecting the readability and aesthetics of the document.
[0034] Figure 1 This is a schematic diagram of the document anti-counterfeiting method described in this application.
[0035] Please refer to Figure 1 As shown, the core principle of the document anti-counterfeiting method described in this application is to change the color of characters through regular, subtle changes that are imperceptible to the human eye, thereby creating an anti-counterfeiting mark to achieve the purpose of anti-counterfeiting.
[0036] S101 Obtains the document to be protected against counterfeiting;
[0037] The document to be protected against counterfeiting shown refers to a document that requires anti-counterfeiting measures. In this application, the anti-counterfeiting document includes both paper and electronic documents. The document with anti-counterfeiting features shown primarily uses text recordings; a limited scope is that the content of the document with anti-counterfeiting features shown is identifiable. Documents meeting the above requirements can be used as the document to be protected against counterfeiting in this application.
[0038] The text content of the document to be protected against counterfeiting is not allowed to be modified. This application uses a text image as the optimal document for anti-counterfeiting. In this application, the document to be protected against counterfeiting can also be a WORD file, a table file, a PDF file, or other types of files.
[0039] S102 identifies the file content of the document to be protected against counterfeiting, and determines the anti-counterfeiting characters based on the file content;
[0040] The content of the file to be protected against counterfeiting is text content in the form of images, characters, etc. Therefore, by recognizing the text content, all the characters in the text image can be identified, and a character order table can be obtained.
[0041] After obtaining the data file, a preset rule is used to select characters in the data file as anti-counterfeiting characters based on the file content. These anti-counterfeiting characters are key characters for file anti-counterfeiting.
[0042] The preset rules can be set according to specific actual conditions. For example, the second character of each line can be set as an anti-counterfeiting character; an anti-counterfeiting character can be set every 10 characters; or characters corresponding to a certain number sequence can be selected as anti-counterfeiting characters. The specific selection can be made by those skilled in the art based on the actual situation of the document, and this application does not further limit this.
[0043] Through the above file processing, the entire text content has been identified, the characters in the file content have been sorted, and then the key characters in the file content have been selected.
[0044] S103 determines the color type of the anti-counterfeiting character to be adjusted based on its color, and modifies the value of the color based on the color type.
[0045] The key characters, also known as anti-counterfeiting characters, can be represented by mixing the three primary colors. Therefore, this application first determines the color type of the anti-counterfeiting characters, and then reads the color parameters of the three primary colors. The color type refers to the proportion of the three primary colors.
[0046] It should be noted that when identifying color parameters, it is first necessary to determine which color model the color belongs to, and then read the color parameters according to the color model. This application takes the RGB three-primary-color model as an example for explanation, so the color can be represented by the three primary color parameters.
[0047] After reading the values of the three primary colors, the value of at least one of the primary colors is slightly modified so that the color change is not obvious. Then the modified color is reassigned to the corresponding character, that is, the value of the color is implicitly modified, for example, the value of red, yellow or blue is increased or decreased by 1.
[0048] By setting the above, the color of the key characters in the file, which are the anti-counterfeiting characters, has been slightly modified. This change will not be particularly noticeable, but it can serve as an anti-counterfeiting identification code to prevent file forgery.
[0049] Furthermore, a character code is set for each of the anti-counterfeiting characters; each of the character codes is concatenated to generate a string, and the string is added as a watermark to the file content.
[0050] The character code is a label code that represents the position of the anti-counterfeiting character. For example, it can be the sequential number of the anti-counterfeiting character, the horizontal or vertical sequence number, or a specific graphic. The character code includes: numbers, letters, characters, and graphics.
[0051] The character codes are concatenated to form a string, which serves as the anti-counterfeiting number of the file itself. The anti-counterfeiting number is then compared with the string composed of the character codes of the anti-counterfeiting characters recognized by the machine to achieve the function of anti-counterfeiting identification.
[0052] The string can be saved separately from the file to be protected against counterfeiting. In a further technical solution, the string can be pasted into the file as an anti-counterfeiting watermark.
[0053] The string can be applied as a watermark in various novel ways to the file to be protected against counterfeiting. For example, the watermark can be set to a circle, a rectangle, or directly applied to the file in its original state. The string can also be selected to be displayed in a specific location in the file, such as in the header or footer.
[0054] This application also provides a document anti-counterfeiting device, including: an acquisition module 101, a device module 102, and a modification module 103.
[0055] Figure 2 This is a schematic diagram of the anti-counterfeiting device described in this application.
[0056] Please refer to Figure 2 As shown, the document anti-counterfeiting device described in this application corresponds to the document anti-counterfeiting method described above.
[0057] Module 101 is used to acquire the document to be protected against counterfeiting.
[0058] The document shown as the object to be protected against counterfeiting is the document for which anti-counterfeiting measures need to be implemented. In this application, the anti-counterfeiting documents include: paper documents and electronic documents. The documents shown with anti-counterfeiting features are primarily text-based. Preferably, the content of the documents with anti-counterfeiting features is identifiable, and any document meeting the above requirements can be used as the object to be protected against counterfeiting in this application.
[0059] The text content of the document to be protected against counterfeiting is generally not allowed to be modified. This application uses text images as the optimal document for anti-counterfeiting. In this application, the document to be protected against counterfeiting can also be a WORD file, a table file, a PDF file, or other file formats.
[0060] Device module 102 is used to identify the file content of the document to be protected against counterfeiting, and determine the anti-counterfeiting characters based on the file content;
[0061] The content of the anti-counterfeiting document shown is text content in the form of images, characters, etc. Therefore, by recognizing the text content, all the characters in the text image can be identified, and a character order table can be obtained.
[0062] After obtaining the data file, a preset rule is used to select characters in the data file as anti-counterfeiting characters based on the file content. These anti-counterfeiting characters are key characters for file anti-counterfeiting.
[0063] The preset rules can be set according to specific actual conditions. For example, the second character of each line can be set as the anti-counterfeiting character; an anti-counterfeiting character can be set every 10 characters; or characters corresponding to a certain number sequence can be selected as anti-counterfeiting characters. The specific selection can be made by those skilled in the art based on the actual situation of the document, and this application does not further limit it.
[0064] The entire text content is identified, the characters in the file content are sorted, and then the key characters in the file content are selected.
[0065] Modification module 103 is used to determine the color type of the anti-counterfeiting character based on its color, and to modify the color value based on the color type.
[0066] The key characters, also known as anti-counterfeiting characters, can be represented by mixing the three primary colors. Therefore, this application first determines the color type of the anti-counterfeiting characters, and then reads the color parameters of the three primary colors. The color type refers to the proportion of the three primary colors.
[0067] It should be noted that when identifying color parameters, it is first necessary to determine which color model the color belongs to, and then read the color parameters according to the color model. This application takes the RGB three-primary-color model as an example for explanation, so the color can be represented by the three primary color parameters.
[0068] After reading the values of the three primary colors, the value of at least one of the primary colors is slightly modified so that the color change is not obvious. Then the modified color is reassigned to the corresponding character, that is, the value of the color is implicitly modified, for example, the value of red, yellow or blue is increased or decreased by 1.
[0069] By setting the above, the color of the key characters in the file, which are the anti-counterfeiting characters, has been slightly modified. This change will not be particularly noticeable, but it can serve as an anti-counterfeiting identification code to prevent file forgery.
[0070] Furthermore, the document anti-counterfeiting device also includes:
[0071] The character code module is used to set a character code for each of the anti-counterfeiting characters;
[0072] The watermark module is used to concatenate each of the character codes to generate a string, and add the string as a watermark to the file content.
[0073] The character code is a label code that represents the position of the anti-counterfeiting character. For example, it can be represented by the sequential number of the anti-counterfeiting character, or by horizontal or vertical numbering, or by a graphic representation. The character code includes: numbers, letters, characters, and graphics.
[0074] The character codes are concatenated to form a string, which serves as the anti-counterfeiting number of the file itself. The anti-counterfeiting number is then compared with the string composed of the character codes of the anti-counterfeiting characters recognized by the machine to achieve the anti-counterfeiting identification requirement.
[0075] The string can be saved separately from the file to be protected against counterfeiting. In a further technical solution, the string can be pasted into the file as an anti-counterfeiting watermark.
[0076] The string can be applied as a watermark in various novel ways to the file to be protected against counterfeiting. For example, the watermark can be set to a circle, a rectangle, or directly applied to the file in its original state. The string can also be selected to be displayed in a specific location in the file, such as in the header or footer.
[0077] The above description is a complete technical solution of this application and is for illustrative purposes only. Those skilled in the art can combine and modify the various technical features of this application in various ways based on the concepts adopted in the technical solution of this application, and such modifications will still be within the protection scope of this application.
Claims
1. A file forgery prevention method characterized by comprising: The method comprises the following steps: Obtaining a file to be prevented from being counterfeited; Identifying the file content of the file to be prevented from being counterfeited, and determining anti-counterfeiting characters according to the file content; According to the color of the anti-counterfeiting characters, determining the color type of adjusting the anti-counterfeiting characters, and modifying the value of the color according to the color type; the modification of the value of the color refers to modifying the value of the color of the whole or part of the anti-counterfeiting characters; Setting a character code for each anti-counterfeiting character; Connecting each character code to generate a character string, and adding the character string as a watermark to the file content; The character string forms a regular group in a preset rule when it is a watermark; The color of the anti-counterfeiting characters itself is presented by adjusting three primary colors, after determining the color type of the anti-counterfeiting characters, the color parameters of the three primary colors are read, and the color type is the proportion of the three primary colors; When identifying the color parameters, it is determined that the color belongs to which color model, the color parameters are read according to the color model, after reading the numerical values of the three primary colors, at least one of the numerical values of the primary colors is changed as a basis of not obvious color change, and the changed color is re-assigned to the corresponding character, and the not obvious color change specifically refers to adding 1 or subtracting 1 from the numerical value of any one of red, yellow and blue.
2. The document security method of claim 1, wherein The character code includes: numbers, letters, characters and graphics.
3. A document security device employing a document security method according to any one of claims 1-2, characterized in that, The method comprises the following steps: An acquisition module is configured to obtain a file to be prevented from being counterfeited; An equipment module is configured to identify the file content of the file to be prevented from being counterfeited, and determine anti-counterfeiting characters according to the file content; A modification module is configured to determine the color type of adjusting the anti-counterfeiting characters according to the color of the anti-counterfeiting characters, and modify the value of the color according to the color type.
4. The document security device of claim 3, wherein Further comprising: A character code module is configured to set a character code for each anti-counterfeiting character; A watermark module is configured to connect each character code to generate a character string, and add the character string as a watermark to the file content.
5. The document security device of claim 4, wherein, The character code includes: numbers, letters, characters and graphics.
6. The document security device of claim 4, wherein: The character string forms a regular group in a preset rule when it is a watermark.
7. The document security device of claim 3, wherein: The modification of the value of the color refers to modifying the value of the color of the whole or part of the anti-counterfeiting characters.
Citation Information
Patent Citations
Document data waterprint embedded method
CN1924925A