Document anti-counterfeiting method and device

By generating electronic signatures in electronic documents and applying a variety of anti-counterfeiting technologies to embed anti-counterfeiting marks, the risk of tampering and forgery during the transmission of electronic documents is solved, and the security and authenticity verification of documents is achieved.

CN112597455BActive Publication Date: 2024-09-17AGRICULTURAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011586933.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2024-09-17
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

Existing technologies involve risks of tampering and forgery during electronic document transmission. Passwords set by users are vulnerable to attacks and cannot verify the authenticity of document content, resulting in low security in anti-counterfeiting processing.

Method used

By generating electronic signatures in documents, and applying watermarks, QR codes, string codes, seam seals or digital signature technology to anti-counterfeiting, the documents are embedded with anti-counterfeiting marks to verify the authenticity of the document.

Benefits of technology

Effectively prevent document tampering, ensure the security and authenticity of documents during transmission, and verify whether documents have been tampered with through anti-counterfeiting marks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112597455B
    Figure CN112597455B
Patent Text Reader

Abstract

The present invention provides a document anti-counterfeiting method and device, the method comprising: when receiving a document anti-counterfeiting request sent by a user, obtaining a target document, document information and user information corresponding to the document anti-counterfeiting request; based on the document information and user information, generating an electronic seal in the signature position of the target document to obtain a sealed document; determining the document anti-counterfeiting technology selected by the user, and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain at least one anti-counterfeiting mark; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a two-dimensional code generation technology, a string code generation technology, a perm generation technology or a digital signature technology; determining the identification position of each anti-counterfeiting mark, and embedding an anti-counterfeiting mark in each identification position. Applying the method provided by the present invention, an electronic signature is generated in the document, and the sealed document is subjected to anti-counterfeiting processing, and the authenticity of the document is verified in the subsequent document transmission process to determine whether the document has been tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data anti-counterfeiting, and in particular to a document anti-counterfeiting method and device. Background Art

[0002] With the continuous development of electronic information technology, various electronic documents in different formats are widely used in various technical fields. However, during the transmission process, electronic documents are at risk of being maliciously tampered with and forged. Therefore, when transmitting electronic documents, it is necessary to perform anti-counterfeiting processing on the electronic documents to ensure the security of the electronic documents during the transmission process.

[0003] In the prior art, before electronic documents are transmitted, users usually agree on and set a document password, and transmit the document between users in an encrypted manner. However, the password set by the user is also vulnerable to attack and cracking by illegal users during the transmission process, and once the user password is leaked and the document content is tampered with, the user who receives the document cannot verify the authenticity of the document content. Therefore, the security of the anti-counterfeiting method of the prior art is relatively low. Summary of the invention

[0004] In view of this, the present invention provides a document anti-counterfeiting method, through which an electronic signature is generated in a document, and the stamped document is subjected to anti-counterfeiting processing, so as to verify the authenticity of the document in the subsequent document transmission process and determine whether the document has been tampered with.

[0005] The present invention also provides a document anti-counterfeiting device to ensure the implementation and application of the above method in practice.

[0006] A document anti-counterfeiting method, comprising:

[0007] When receiving a document anti-counterfeiting request sent by a user, obtaining a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user;

[0008] Based on the document information and the user information, an electronic seal corresponding to the target document is generated in the signature position of the target document to obtain a sealed document;

[0009] Determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a QR code generation technology, a serial code generation technology, a saddle stamp generation technology or a digital signature technology;

[0010] Determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position.

[0011] Optionally, the method described above includes determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document, and obtaining at least one anti-counterfeiting mark corresponding to the sealed document, including:

[0012] When it is determined that the document anti-counterfeiting technology selected by the user is the watermark anti-counterfeiting technology, determining the watermark type of the watermark anti-counterfeiting technology selected by the user, the watermark type being a bright watermark or a dark watermark;

[0013] When the watermark type of the watermark anti-counterfeiting technology selected by the user is a clear watermark, the text watermark uploaded by the user that needs to be displayed in the stamped document and the document key information corresponding to the stamped document that the user has selected to hide are obtained, and the document key information is converted into a binary hidden code; the number of characters in the text watermark and the number of hidden codes in the binary hidden code are determined; when the number of hidden codes is less than the number of characters, the character spacing of each character in the text watermark is adjusted based on each character in the binary hidden code, and the adjusted text watermark is determined as the anti-counterfeiting mark corresponding to the stamped document;

[0014] When the watermark type of the watermark anti-counterfeiting technology selected by the user is a dark watermark, the document key information corresponding to the stamped document that the user has selected to hide is obtained, a document watermark corresponding to the stamped document is generated based on the document key information, and the document watermark is converted into a bit stream consisting of character 0 and character 1, and the bit stream is determined as the anti-counterfeiting mark corresponding to the stamped document.

[0015] Optionally, the method described above includes determining the identification position of each anti-counterfeiting identification in the stamped document, and embedding the anti-counterfeiting identification corresponding to the identification position in each identification position of the stamped document, including:

[0016] When the anti-counterfeiting mark corresponding to the stamped document is the adjusted text watermark, determining the mark position of the adjusted text watermark in the stamped document as the document background layer, the document background layer being the document background lining below the text;

[0017] The adjusted text watermark is embedded in the document background layer of each document page in the stamped document.

[0018] Optionally, the method described above includes determining the identification position of each anti-counterfeiting identification in the stamped document, and embedding the anti-counterfeiting identification corresponding to the identification position in each identification position of the stamped document, including:

[0019] When the anti-counterfeiting mark corresponding to the sealed document is the bit stream, reading the total number of document pages and the total number of document lines corresponding to the sealed document in the document information;

[0020] Based on the total number of pages and the total number of lines of the document, the document content of the stamped document is analyzed to determine each reference line and each modified line in the stamped document; wherein the modified line is a document line in the stamped document that needs to be moved up or down, and the reference line is a document line whose position does not change;

[0021] Each of the moving lines is used as a marking position of the bit stream, and each of the moving lines is moved based on each character in the bit stream, so as to embed the bit stream in the sealed document.

[0022] Optionally, the method described above includes determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document, and obtaining at least one anti-counterfeiting mark corresponding to the sealed document, including:

[0023] When it is determined that the document anti-counterfeiting technology selected by the user is the QR code generation technology, obtaining the document key information corresponding to the sealed document selected by the user to be hidden, and the hash value corresponding to the sealed document in the document information;

[0024] The document key information and the hash value are encoded to obtain a document QR code corresponding to the stamped document, and the document QR code is determined to be the anti-counterfeiting mark corresponding to the stamped document.

[0025] Optionally, the method described above includes determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document, and obtaining at least one anti-counterfeiting mark corresponding to the sealed document, including:

[0026] When it is determined that the document anti-counterfeiting technology selected by the user is a serial code generation technology, obtaining document key information corresponding to the stamped document selected by the user to be hidden, and compressing the document key information to generate a document initial serial code corresponding to the document key;

[0027] Determine the string code length preselected by the user, encode the initial string code of the document based on the string code length, generate a seal string code corresponding to the string code length, and determine the seal string code as the anti-counterfeiting mark corresponding to the stamped document.

[0028] Optionally, the method described above includes determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document, and obtaining at least one anti-counterfeiting mark corresponding to the sealed document, including:

[0029] When it is determined that the document anti-counterfeiting technology selected by the user is the interline seal generation technology, the document key information and the interline seal corresponding to the stamped document selected by the user to be hidden are obtained, and the document key information is encoded to obtain the document code corresponding to the stamped document; the number of each encoding character in the document code is consistent with the total number of document pages of the stamped document;

[0030] Determine the size of the saddle seal;

[0031] Based on the total number of pages of the document and the size of the saddle seal, calculate the base width of each document page of the document that the saddle seal is stamped on;

[0032] According to the basic stamping width of each document page, the saddle seal is cut to obtain a sub-saddle seal corresponding to each document page;

[0033] Determine the width adjustment rule corresponding to each of the encoded characters in the pre-set document encoding, and adjust the width of each of the sub-saddle seals according to the width adjustment rule corresponding to each of the encoded characters to obtain each adjusted sub-saddle seal, and determine each of the adjusted sub-saddle seals as the anti-counterfeiting mark corresponding to the stamped document.

[0034] Optionally, the method described above includes determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document, and obtaining at least one anti-counterfeiting mark corresponding to the sealed document, including:

[0035] When it is determined that the document anti-counterfeiting technology selected by the user is the digital signature technology, obtaining the signature private key preset by the user in the user information;

[0036] Applying a preset digest algorithm to calculate a digest of the sealed document, and obtaining a digest value corresponding to the sealed document;

[0037] The summary value is asymmetrically encrypted using the signature private key to obtain a signature value corresponding to the sealed document, and the signature value is used as the anti-counterfeiting mark corresponding to the sealed document.

[0038] The above method may optionally further include:

[0039] Based on the identification position of each anti-counterfeiting identification in the stamped document, the parameters of each anti-counterfeiting identification are adjusted.

[0040] A document anti-counterfeiting device, comprising:

[0041] An acquisition unit, configured to, when receiving a document anti-counterfeiting request sent by a user, acquire a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user;

[0042] A generating unit, configured to generate an electronic seal corresponding to the target document in a signature position of the target document based on the document information and the user information, to obtain a sealed document;

[0043] A processing unit, used to determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a QR code generation technology, a serial code generation technology, a saddle stamp generation technology or a digital signature technology;

[0044] The identification unit is used to determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position.

[0045] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned document anti-counterfeiting method.

[0046] An electronic device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to implement the document anti-counterfeiting method.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] The present invention provides a document anti-counterfeiting method, comprising: when receiving a document anti-counterfeiting request sent by a user, obtaining a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document and user information of the user; based on the document information and the user information, generating an electronic seal corresponding to the target document in a signature position of the target document to obtain a stamped document; determining a document anti-counterfeiting technology selected by the user, and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a two-dimensional code generation technology, a string code generation technology, a perm seal generation technology or a digital signature technology; determining the identification position of each anti-counterfeiting mark in the stamped document, and embedding the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document is verified through the anti-counterfeiting mark in each identification position. By applying the method provided by the present invention, an electronic signature is generated in a document, and anti-counterfeiting processing is performed on the sealed document. In the subsequent document transmission process, the authenticity of the document is verified to determine whether the document has been tampered with. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] Figure 1 A method flow chart of a document anti-counterfeiting method provided by an embodiment of the present invention;

[0051] Figure 2 A system structure diagram of a document anti-counterfeiting system provided by an embodiment of the present invention;

[0052] Figure 3 A device structure diagram of a document anti-counterfeiting device provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0056] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.

[0057] The embodiment of the present invention provides a document anti-counterfeiting method, which can be applied to a variety of system platforms, and its execution subject can be a processor of a computer terminal or various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0058] S101: When a document anti-counterfeiting request sent by a user is received, a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user are obtained.

[0059] In an embodiment of the present invention, when a user needs to perform anti-counterfeiting processing on a document, the application system obtains the target document corresponding to the document anti-counterfeiting request sent by the user, the document information corresponding to the target document, and the user information of the user.

[0060] The document information includes the document name, document type, document hash value, total number of document pages, total number of document lines, number of document lines per document page, etc. The user information includes the signature key pair set by the user, user name, and user identity information, etc.

[0061] It should be noted that the target document may specifically be a contract document or other important document with agreement.

[0062] S102: Based on the document information and the user information, an electronic seal corresponding to the target document is generated in the signature position of the target document to obtain a sealed document.

[0063] In the embodiment of the present invention, the pre-set electronic signature service device contains multiple electronic seal categories related to the user. After obtaining the target document, the document type of the target document is determined according to the document information, and the seal category of the electronic seal required to be stamped on the target document is determined according to the document type, and the user identity is verified according to the user information. After verification, in accordance with the management regulations of the special seal for credit contracts, an electronic seal corresponding to the signature category that meets the seal use requirements of various institutions is generated at the signature position of the target document, that is, the electronic seal is stamped on the signature position of the target document to obtain a stamped document.

[0064] S103: Determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain at least one anti-counterfeiting mark corresponding to the sealed document.

[0065] Among them, the document anti-counterfeiting technology is watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, interline seal generation technology or digital signature technology.

[0066] The present invention provides a variety of document anti-counterfeiting technologies when anti-counterfeiting processing is required for a document. A user can select at least one document anti-counterfeiting technology from various pre-set document anti-counterfeiting technologies to perform anti-counterfeiting processing on the target document and generate at least one anti-counterfeiting mark corresponding to the stamped document.

[0067] For example, when the document anti-counterfeiting technology selected by the user is watermark anti-counterfeiting technology, the anti-counterfeiting mark is the document watermark; when the document anti-counterfeiting technology selected by the user is QR code generation technology, the anti-counterfeiting mark is the document QR code; when the document anti-counterfeiting technology selected by the user is string code generation technology, the anti-counterfeiting mark is the document seal string code; when the document anti-counterfeiting technology selected by the user is saddle seal generation technology, each anti-counterfeiting mark is the sub-saddle seal after the saddle seal is split; when the document anti-counterfeiting technology selected by the user is digital signature technology, the anti-counterfeiting mark is the signature value of the document.

[0068] It should be noted that each anti-counterfeiting mark carries the key information of the stamped document, which may include document information, document summary, document content, electronic seal, etc. Users can choose to hide the entire stamped document in the anti-counterfeiting label, or they can choose to hide the key information in the stamped document in the anti-counterfeiting label.

[0069] S104: Determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position.

[0070] In the implementation of the present invention, after generating at least one anti-counterfeiting mark corresponding to the target document, in order to prevent the user from reading it later, a blank position of the document, the bottom of the document or the background layer of the document can be selected as the mark position of the anti-counterfeiting mark. The anti-counterfeiting mark is embedded in the target document at its corresponding mark position to achieve anti-counterfeiting treatment of the target document.

[0071] It is understandable that after anti-counterfeiting processing is performed on the stamped document, if the user performs data transmission or printing, photographing, screenshotting, etc. on the stamped document, the user can still extract the anti-counterfeiting mark in the document, and extract the document key information of the stamped document through the anti-counterfeiting mark, verify the authenticity of the document through the document key information, and check whether the document has been tampered with after data transmission, printing, photographing, screenshotting, etc.

[0072] In the document anti-counterfeiting method provided by the embodiment of the present invention, when a document anti-counterfeiting request is received, the target document that needs to be processed for anti-counterfeiting, the document information and the user information of the user are obtained. The document information includes the document name, document type, document hash value, total number of document pages, total number of document lines and number of document lines of each document page. The user information includes the signature key pair set by the user, the user name and the user identity information. Based on the document information, the electronic signature corresponding to the document type of the target document in the electronic signature service device is determined, and the user identity is verified according to the user information. After the verification is passed, the electronic signature will be generated in the signature position of the target document. The electronic signature has a contract-specific electronic seal modeling function, which can meet the requirements for the use of seals of various institutions in accordance with the management regulations of the credit contract-specific seal. For example, when a user needs to sign an online electronic contract, he can sign and stamp the electronic signature in the electronic contract. When users need to transmit, print, screenshot, or take photos of target documents, they can choose document anti-counterfeiting technology for anti-counterfeiting treatment of stamped documents, such as watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, interline seal generation technology, or digital signature technology. Anti-counterfeiting treatment is performed on the stamped document through document anti-counterfeiting technology to generate at least one anti-counterfeiting mark containing the key information of the stamped document. The anti-counterfeiting mark can be a document watermark, a document QR code, a serial code, an interline seal, or a digital signature. Determine the identification position corresponding to each anti-counterfeiting mark embedded in the stamped document, so as to embed the corresponding anti-counterfeiting mark in each marking position in the stamped document. When users transmit the stamped document online or print and circulate it, other users can identify the anti-counterfeiting mark in the stamped document through the identification device, extract the stamped document from the anti-counterfeiting mark and read it directly, or compare the key information extracted from the anti-counterfeiting mark with the original document to determine whether the document has been tampered with.

[0073] It is understandable that if only one anti-counterfeiting mark is generated, the first anti-counterfeiting mark includes the document information and document content of the entire target document. If multiple anti-counterfeiting marks are generated, each anti-counterfeiting mark can include different document information and document content; for example: a corresponding anti-counterfeiting mark is generated according to the document information, a corresponding anti-counterfeiting mark is generated according to the summary part of the document content, and then a corresponding anti-counterfeiting mark is generated according to the document content; or, an anti-counterfeiting mark corresponding to each document page is generated according to each document page. The data of the anti-counterfeiting mark of the target document in the present invention and its specific content can be set according to the actual situation of the document, and no limitation will be made here.

[0074] By applying the method provided in the embodiment of the present invention, an electronic signature is generated in a document, and anti-counterfeiting processing is performed on the sealed document. In the subsequent document transmission process, the authenticity of the document is verified to determine whether the document has been tampered with.

[0075] Optionally, in the embodiment of the present invention, when it is necessary to embed various anti-counterfeiting marks in the stamped document, parameters of various anti-counterfeiting marks may be adjusted, specifically including:

[0076] Based on the identification position of each anti-counterfeiting identification in the stamped document, the parameters of each anti-counterfeiting identification are adjusted.

[0077] It is understandable that, according to the different logo positions corresponding to each anti-counterfeiting logo, corresponding parameters need to be adjusted, and the parameters may be the size of the anti-counterfeiting logo, the color and transparency of the anti-counterfeiting logo, etc.

[0078] In the method provided by the embodiment of the present invention, based on the content of S103 above, after generating an electronic signature in the target document, it is necessary to further perform anti-counterfeiting processing on the document. Specifically, document anti-counterfeiting technology is used for anti-counterfeiting processing. The document anti-counterfeiting technology can be watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, saddle stamp generation technology or digital signature technology.

[0079] In one embodiment, the determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document specifically includes:

[0080] When it is determined that the document anti-counterfeiting technology selected by the user is the watermark anti-counterfeiting technology, the watermark type of the watermark anti-counterfeiting technology selected by the user is determined, and the watermark type is a bright watermark or a dark watermark.

[0081] When the watermark type of the watermark anti-counterfeiting technology selected by the user is a clear watermark, the text watermark uploaded by the user that needs to be displayed in the stamped document and the document key information corresponding to the stamped document that the user has selected to hide are obtained, and the document key information is converted into a binary hidden code; the number of characters in the text watermark and the number of hidden codes in the binary hidden code are determined; when the number of hidden codes is less than the number of characters, the character spacing of each character in the text watermark is adjusted based on each character in the binary hidden code, and the adjusted text watermark is determined as the anti-counterfeiting mark corresponding to the stamped document.

[0082] When the watermark type of the watermark anti-counterfeiting technology selected by the user is a dark watermark, the document key information corresponding to the stamped document that the user has selected to hide is obtained, a document watermark corresponding to the stamped document is generated based on the document key information, and the document watermark is converted into a bit stream consisting of character 0 and character 1, and the bit stream is determined as the anti-counterfeiting mark corresponding to the stamped document.

[0083] In the document anti-counterfeiting method provided by the embodiment of the present invention, when a user selects to apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on a stamped document, it is necessary to determine the watermark type of the document watermark that the user currently needs to add. The watermark types include visible watermarks and invisible watermarks. Among them, a visible watermark refers to a watermark that can be perceived by the user and is embedded in the document with pictures, texts, or characters as an anti-counterfeiting mark. An invisible watermark is a line-spacing watermark used to adjust the line spacing of the document to hide key information. That is: in each document page of the document, watermark information is alternately embedded every other line, and the two adjacent lines of the line where the information is embedded are used as reference lines. When the user selects to perform anti-counterfeiting processing with a visible watermark, the key information that the user needs to hide is obtained as a text watermark. The key information is information such as document content, electronic signature, and document abstract. The user can choose to hide the entire stamped document in the anti-counterfeiting mark, or choose to hide the key information in the stamped document in the anti-counterfeiting mark. The key information of the document is converted into a binary hidden code. Since the binary hidden code consists of at least one hidden code of "0" and "1", it can be stipulated that when the hidden code is "0", the character spacing of the text watermark is reduced, and when the hidden code is "1", the character spacing of the text watermark is increased. When each hidden code in the binary hidden code is less than the number of characters in the text watermark, the spacing between each character can be adjusted according to the specific value of each hidden code in the order of the character arrangement. For example, if the text watermark is "Welcome", and the binary hidden code of the document is "101", when the original character spacing of the text watermark is 0.5 points, the character spacing between "欢" and "迎" can be adjusted to 0.6 points, the character spacing between "迎" and "光" can be adjusted to 0.4 points, and the character spacing between "光" and "临" can be adjusted to 0.6 points. The adjusted text watermark is the anti-counterfeiting mark corresponding to the stamped document. When the user needs to perform anti-counterfeiting verification, the recognition device recognizes the line spacing in the text watermark, obtains the binary hidden code according to the line spacing, and then obtains the hidden key information through the reverse coding of the binary hidden code.

[0084] Further, in the embodiment of the present invention, when the anti-counterfeiting mark corresponding to the stamped document is the adjusted text watermark, it is necessary to determine the identification position of the text watermark in the stamped document. Among them, the determination of the identification position of each anti-counterfeiting mark in the stamped document and the embedding of the anti-counterfeiting mark corresponding to the identification position at each identification position in the stamped document includes:

[0085] When the anti-counterfeiting mark corresponding to the stamped document is the adjusted text watermark, it is determined that the identification position of the adjusted text watermark in the stamped document is the document background layer, and the document background layer is the document background lining under the text.

[0086] The adjusted text watermark is embedded in the document background layer of each document page in the stamped document.

[0087] It can be understood that when the text watermark is a bright watermark, the adjusted text watermark is arranged in the document background layer below the text. At the same time, when the adjusted text watermark is embedded in the document background layer, the transparency of the watermark can be adjusted, which will not affect the user's reading and the user can also see the watermark intuitively.

[0088] In the document anti-counterfeiting method provided by the embodiment of the present invention, when the user chooses to use dark watermark for anti-counterfeiting processing, the key information selected by the user is used to generate a corresponding document watermark, which is a serial number composed of letters and numbers, and then the document watermark is converted into a bit stream. The bit stream consists only of the characters "1" and "0". The bit stream is the anti-counterfeiting mark corresponding to the stamped document.

[0089] Further, in an embodiment of the present invention, when the anti-counterfeiting mark corresponding to the stamped document is a bit stream, determining the identification position of each anti-counterfeiting mark in the stamped document, and embedding the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, comprises:

[0090] When the anti-counterfeiting mark corresponding to the sealed document is the bit stream, the total number of document pages and the total number of document lines corresponding to the sealed document in the document information are read.

[0091] Based on the total number of document pages and the total number of document lines, the document content of the stamped document is analyzed to determine each reference line and each modified line in the stamped document; wherein the modified line is a document line in the stamped document that needs to be moved up or down, and the reference line is a document line whose position does not change.

[0092] Each of the moving lines is used as a marking position of the bit stream, and each of the moving lines is moved based on each character in the bit stream, so as to embed the bit stream in the sealed document.

[0093] It can be understood that when the watermark type selected by the user is a dark watermark, in each page of the document, the watermark information in the bit stream is embedded alternately with every other line, that is, the characters in the bit stream. However, the positions of the two adjacent lines above and below the document line in which the watermark information is embedded remain unchanged, and serve as reference lines for the changed lines. At the same time, the first line and the last line can be defined as reference lines. For example, if there are 10 lines of text in the document, the 2nd, 4th, 6th, and 8th lines are changed lines, and the 1st, 3rd, 5th, 7th, 9th, and 10th lines are reference lines. Since the bit stream only contains two characters "1" and "0", when adjusting the line spacing, the character "1" represents that the changed line moves upward, and the character "0" represents that it moves downward. Each changed line in the document is the position marked by the bit stream. If the 2nd, 4th, 6th, and 8th lines in the document are changed lines, and the bit stream is 1110, then the 2nd, 4th, and 6th lines in the document move upward, and the 8th line moves downward. The spacing between the moving lines can be set by the user. When the user needs to perform anti-counterfeiting verification on a document, the bit stream is extracted according to the line spacing of each document line in the document, and the bit stream is reversely encoded to obtain watermark information, and then the key information of the document is obtained through the watermark information.

[0094] It should be noted that, based on the above-mentioned process of applying a bright watermark or a dark watermark to a document for anti-counterfeiting, when the displacement distance is less than a certain value, the human eye cannot recognize the change in displacement. Therefore, when it is necessary to adjust the character spacing or line spacing, the character spacing or line spacing can be adjusted according to the minimum displacement distance that is unrecognizable to the human eye.

[0095] By applying the method provided in the embodiment of the present invention, when a user needs to perform anti-counterfeiting processing on a document, he or she can choose to embed a bright watermark or a dark watermark to perform document anti-counterfeiting, so as to verify the authenticity of the document in the subsequent document transmission process and determine whether the document has been tampered with.

[0096] In one embodiment, in addition to embedding watermarks to prevent counterfeiting of documents, the present invention can also apply QR code generation technology to prevent counterfeiting of documents. The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document includes:

[0097] When it is determined that the document anti-counterfeiting technology selected by the user is the QR code generation technology, obtaining the document key information corresponding to the sealed document selected by the user to be hidden, and the hash value corresponding to the sealed document in the document information;

[0098] The document key information and the hash value are encoded to obtain a document QR code corresponding to the stamped document, and the document QR code is determined to be the anti-counterfeiting mark corresponding to the stamped document.

[0099] In the document anti-counterfeiting method provided by the embodiment of the present invention, when the document anti-counterfeiting technology selected by the user is the QR code generation technology, the document key information and the document hash value of the sealed document are obtained, and the document key information is information such as the document content, electronic signature, and document summary. The document hash value is the unique identifier of the sealed document. If the document is tampered with, the hash value of the document will change. Therefore, the document key information and the hash value are encoded to obtain the document QR code of the document, and the QR code is used as the anti-counterfeiting mark of the sealed document.

[0100] Specifically, the present invention can apply QRcode technology to hide the entire document key information and hash value in a QR code. During the application of the document, the entire document can be obtained by scanning the QR code, and the hash code can be obtained after encoding the document, and the hash code can be compared with the hash value in the QR code to determine whether the document has been tampered with.

[0101] Furthermore, after generating the document QR code, the identification position of the document QR code of the stamped document is determined to be the blank space at the bottom of the document. The size, color, transparency and other parameters of the document QR code are adjusted according to the size of the blank space at the bottom of the document, and the document QR code is hidden in the blank space at the bottom of the document.

[0102] By applying the method provided in the embodiment of the present invention, the document is anti-counterfeiting processed by generating a document QR code, so as to verify the authenticity of the document in the subsequent document transmission process and determine whether the document has been tampered with.

[0103] In one embodiment, in addition to the document watermark and document QR code, the process of performing anti-counterfeiting processing on the stamped document can also be performed on the stamped document through a serial code. Therefore, the step of determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology, performing anti-counterfeiting processing on the stamped document, and obtaining at least one anti-counterfeiting mark corresponding to the stamped document may include:

[0104] When it is determined that the document anti-counterfeiting technology selected by the user is the serial code generation technology, the document key information corresponding to the stamped document selected by the user to be hidden is obtained, and the document key information is compressed to generate a document initial serial code corresponding to the document key.

[0105] Determine the string code length preselected by the user, encode the initial string code of the document based on the string code length, generate a seal string code corresponding to the string code length, and determine the seal string code as the anti-counterfeiting mark corresponding to the stamped document.

[0106] In the document anti-counterfeiting method provided by the embodiment of the present invention, when the document anti-counterfeiting technology selected by the user is the string code generation technology, the key information of the document is obtained, and the key information of the document is information such as the document content, the electronic signature and the document summary. The key information is compressed to obtain the initial string code of the document, and the initial string code of the document is a 19-bit decimal string. The first 18 characters in the string are the application number corresponding to the stamped document, and the last bit is the check bit. On the basis of the 19-bit initial string code of the document, the user can select the length of the string code mixed with the initial string code of the document. According to the string code length, the 19-bit initial string code of the document is encoded in 56-decimal to form a seal string code with the same string code length and each character is not repeated. When the user needs to perform anti-counterfeiting verification on the stamped document through the seal string code, the seal string code is reversely encoded to obtain a 19-bit string code, and then the key information of the document hidden in the seal string code is obtained through the 19-bit string code.

[0107] Furthermore, the identification position of the seal code is the signature position. When the seal code needs to be embedded in the stamped document, the seal code is embedded in the blank position of the electronic seal. That is, the blank position of the electronic seal is the identification position where the seal code is finally embedded in the document.

[0108] By applying the method provided in the embodiment of the present invention, the document is subjected to anti-counterfeiting processing by generating a seal serial code, so as to verify the authenticity of the document in the subsequent document transmission process and determine whether the document has been tampered with.

[0109] In one embodiment, in addition to document watermark, document QR code and seal serial code, the process of anti-counterfeiting the stamped document can also be performed by using a saddle seal. Therefore, the step of determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology, performing anti-counterfeiting on the stamped document, and obtaining at least one anti-counterfeiting mark corresponding to the stamped document can include:

[0110] When it is determined that the document anti-counterfeiting technology selected by the user is the saddle seal generation technology, the document key information and saddle seal corresponding to the stamped document that the user has selected to hide are obtained, and the document key information is encoded to obtain the document code corresponding to the stamped document; the number of each encoding character in the document code is consistent with the total number of document pages of the stamped document.

[0111] Determine the size of the interleaving seal.

[0112] Based on the total number of pages of the document and the size of the saddle seal, a basic stamping width of each document page of the stamped document with the saddle seal is calculated.

[0113] According to the basic stamping width of each document page, the interleaving seal is cut to obtain the sub-interleaving seal corresponding to each document page.

[0114] Determine the width adjustment rule corresponding to each of the encoded characters in the pre-set document encoding, and adjust the width of each of the sub-saddle seals according to the width adjustment rule corresponding to each of the encoded characters to obtain each adjusted sub-saddle seal, and determine each of the adjusted sub-saddle seals as the anti-counterfeiting mark corresponding to the stamped document.

[0115] In the document anti-counterfeiting method provided by the embodiment of the present invention, when the user needs to select anti-counterfeiting processing, the user selects the saddle seal that needs to be stamped. When the saddle seal generation technology is applied to the document anti-counterfeiting processing, the key information of the document is obtained and encoded to obtain the document code, which can be a string composed of characters "1" and "0". According to the size of the saddle seal and the number of document pages in the document, the basic stamping width of the saddle seal that needs to be cut in each document page is determined. Among them, the basic stamping width = saddle seal size / number of document pages; the saddle seal is cut according to the basic stamping width to obtain the sub-saddle seal corresponding to each document page. The width adjustment rule stipulates the adjustment method of the basic stamping width of the sub-saddle seal in the document page corresponding to each coding character in the document code. For example, if the coding character corresponding to the document page is "1", the basic stamping width of the sub-saddle seal corresponding to the document page is increased, otherwise the basic stamping width is reduced.

[0116] It should be noted that the number of coded characters in the document encoding is not greater than the number of document pages. When the number of coded characters is consistent with the number of document pages, each coded character corresponds to each document page one by one, and the adjustment method of the overprint width corresponding to each document page is consistent with the coded character corresponding to the document page; when the coded character is less than the number of document pages, only the overprint width of the document page corresponding to the number of coded characters is adjusted. For example: the total number of pages in the document is 10, and the overall width of the saddle seal is 5cm, then each slice is 0.5cm. Each slice is processed through key information. If the number of coded characters is 8, then the width of the sub-saddle seals corresponding to the first 8 document pages is adjusted, and the sub-saddle seals corresponding to the last two document pages are kept at 0.5.

[0117] Further, after each sub-saddle seal is adjusted, the stamping position of each sub-saddle seal is determined to be the paging position on the side of the document, and the adjusted sub-saddle seal corresponding to the document page is stamped at the document paging position of each document page.

[0118] It is understandable that when it is necessary to verify whether a document has been tampered with by using the stamped sub-saddle seal, the sub-saddle seal of each document page is extracted for synthesis to determine whether a complete saddle seal can be synthesized. If so, it indicates that there are no missing pages in the document; if not, it indicates that there are missing pages in the document. If there are no missing pages, then according to the stamped width of each sub-saddle seal on its corresponding document page, each coded character is read out and combined into a document code, and the key information of the document is obtained according to the document code, so as to perform document anti-counterfeiting verification through the key information of the document.

[0119] By applying the method provided by the embodiment of the present invention, a saddle stamp is added to each document page to perform anti-counterfeiting processing on the document, thereby effectively preventing a single page in the document from being replaced.

[0120] In one embodiment, in addition to document watermark, document QR code, seal string code and saddle seal, the process of anti-counterfeiting the stamped document can also be performed by digital signature. Therefore, the step of determining the document anti-counterfeiting technology selected by the user, applying the document anti-counterfeiting technology, performing anti-counterfeiting on the stamped document, and obtaining at least one anti-counterfeiting mark corresponding to the stamped document may include:

[0121] When it is determined that the document anti-counterfeiting technology selected by the user is the digital signature technology, obtaining the signature private key preset by the user in the user information;

[0122] Applying a preset digest algorithm to calculate a digest of the sealed document, and obtaining a digest value corresponding to the sealed document;

[0123] The summary value is asymmetrically encrypted using the signature private key to obtain a signature value corresponding to the sealed document, and the signature value is used as the anti-counterfeiting mark corresponding to the sealed document.

[0124] In the document anti-counterfeiting method provided by the embodiment of the present invention, data encryption is a way to protect data. The document can be encrypted using a signature private key preset by the user. When other users need to use the document, the document can be decrypted using the signature public key corresponding to the signature private key. Similarly, when a document is digitally signed, a digest algorithm is applied to calculate the digest of the stamped document. The digest algorithm can be SM3. After the digest of the document is calculated, the corresponding digest value is obtained. The asymmetric encryption algorithm SM4 is applied to sign the digest value to obtain the corresponding encrypted value, which is the anti-counterfeiting mark.

[0125] Furthermore, the signature value may be embedded in any blank position of the document, and the sealed document embedded in the signature value may be obtained by reading the signature value in the document and performing digest calculation after decryption using the signature public key.

[0126] The method provided in the embodiment of the present invention is applied to digitally sign a document to implement anti-counterfeiting processing on the document.

[0127] refer to Figure 2 Based on the above-mentioned process of anti-counterfeiting processing of documents, a document anti-counterfeiting system is provided in the implementation of the present invention, which includes an application system 200, an electronic signature device 300 and an electronic anti-counterfeiting device 400; the electronic anti-counterfeiting device includes a watermark anti-counterfeiting engine 401, a QR code generation engine 402, a seal string code generation engine 403, a digital signature engine 404 and a saddle seal generation engine 405.

[0128] The application system 200 is used to send a target document to the electronic signature device 300 based on the user's document anti-counterfeiting instruction, and receive an anti-counterfeiting document returned by the electronic anti-counterfeiting device 400 after anti-counterfeiting processing is performed on the sealed document.

[0129] The electronic signature device 300 is used to generate an electronic signature at the signature position of the target document and send the sealed document to the electronic anti-counterfeiting device 400.

[0130] The watermark anti-counterfeiting engine 401 is used to generate corresponding light watermarks or dark watermarks based on the key information of the document. The specific process of generating light watermarks and dark watermarks refers to the process in which the user selects the document anti-counterfeiting technology as the watermark anti-counterfeiting technology, which will not be repeated here.

[0131] The QR code generation engine 402 is used to generate a document QR code. The specific process of generating the document QR code refers to the process in which the user selects the document anti-counterfeiting technology as the QR code generation technology, which will not be repeated here.

[0132] The seal serial code generation engine 403 is used to generate the seal serial code. The specific process of generating the seal serial code refers to the process in which the user selects the document anti-counterfeiting technology as the serial code generation technology, which will not be repeated here.

[0133] The digital signature engine 404 is used to generate a signature value for a document. The specific process of generating the signature value is referred to the process in which the user selects the digital signature technology as the document anti-counterfeiting technology, and will not be repeated here.

[0134] The interleaving seal generation engine 405 is used to generate multiple interleaving seal sub-sections. The specific process of generating each interleaving seal sub-section is referred to the process in which the user selects the document anti-counterfeiting technology as the interleaving seal generation technology, which will not be repeated here.

[0135] It should be noted that in the embodiment of the present invention, the user can select which anti-counterfeiting technology to use through the application system, set the position of the seal, set the key information of the document, upload the target document, select the seal mold and other functions, and perform anti-counterfeiting processing on the target document by adding document watermark, QR code, seal string code, interline seal and digital signature. According to the user's choice, one or more document anti-counterfeiting technologies can be applied to the target document for anti-counterfeiting processing at the same time to improve the anti-counterfeiting performance of the document. If it is necessary to apply multiple document anti-counterfeiting technologies to the target document for anti-counterfeiting processing at the same time, the corresponding processing process can refer to the processing process of each of the above-mentioned document anti-counterfeiting technologies, which will not be repeated here.

[0136] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0137] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides a document anti-counterfeiting device for Figure 1 The document anti-counterfeiting device provided in the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 3 As shown, specifically including:

[0138] The acquisition unit 501 is used to, when receiving a document anti-counterfeiting request sent by a user, acquire a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user;

[0139] A generating unit 502 is used to generate an electronic seal corresponding to the target document in the signature position of the target document based on the document information and the user information, so as to obtain a sealed document;

[0140] The processing unit 503 is used to determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain at least one anti-counterfeiting mark corresponding to the sealed document; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a two-dimensional code generation technology, a serial code generation technology, a saddle seal generation technology or a digital signature technology;

[0141] The identification unit 504 is used to determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position.

[0142] In the document anti-counterfeiting device provided by the embodiment of the present invention, when a document anti-counterfeiting request is received, the target document that needs to be processed for anti-counterfeiting, document information and user information of the user are obtained. The document information includes the document name, document type, document hash value, MD5 value, total number of document pages, total number of document lines and number of document lines of each document page. The user information includes the signature key pair set by the user, the user name and user identity information. Based on the document information, the electronic signature corresponding to the document type of the target document in the electronic signature service device is determined, and the user identity is verified according to the user information. After the verification is passed, the electronic signature will be generated in the signature position of the target document. The electronic signature has a contract-specific electronic seal modeling function, which can provide seal usage requirements of various institutions in accordance with the management regulations of the credit contract special seal. For example, when a user needs to sign an online electronic contract, he can sign and stamp the electronic signature in the electronic contract. When users need to transmit, print, screenshot, or take photos of target documents, they can choose document anti-counterfeiting technology for anti-counterfeiting treatment of stamped documents, such as watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, interline seal generation technology, or digital signature technology. Anti-counterfeiting treatment is performed on the stamped document through document anti-counterfeiting technology to generate at least one anti-counterfeiting mark containing the key information of the stamped document. The anti-counterfeiting mark can be a document watermark, a document QR code, a serial code, an interline seal, or a digital signature. Determine the identification position corresponding to each anti-counterfeiting mark embedded in the stamped document, so as to embed the corresponding anti-counterfeiting mark in each marking position in the stamped document. When users transmit the stamped document online or print and circulate it, other users can identify the anti-counterfeiting mark in the stamped document through the identification device, extract the stamped document from the anti-counterfeiting mark and read it directly, or compare the key information extracted from the anti-counterfeiting mark with the original document to determine whether the document has been tampered with.

[0143] By using the device provided by the embodiment of the present invention, an electronic signature is generated in a document, and anti-counterfeiting processing is performed on the sealed document. In the subsequent document transmission process, the authenticity of the document is verified to determine whether the document has been tampered with.

[0144] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned document anti-counterfeiting method.

[0145] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 4 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to perform the following operations:

[0146] When receiving a document anti-counterfeiting request sent by a user, obtaining a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user;

[0147] Based on the document information and the user information, an electronic seal corresponding to the target document is generated in the signature position of the target document to obtain a sealed document;

[0148] Determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain at least one anti-counterfeiting mark corresponding to the stamped document; the document anti-counterfeiting technology is a watermark anti-counterfeiting technology, a QR code generation technology, a serial code generation technology, a saddle stamp generation technology or a digital signature technology;

[0149] Determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position.

[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0151] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.

[0152] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0153] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A document anti-counterfeiting method, It is characterized in that include: When receiving a document anti-counterfeiting request sent by a user, obtaining a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user; the document information includes a document name, a document type, a document hash value, a total number of document pages, a total number of document lines, and a number of document lines per document page; the user information includes a signature key pair set by the user, a user name, and a user identity; Based on the document type in the document information, determining the seal category required for the target document from the seal categories of a plurality of electronic seals associated with the user; Verifying the user identity of the user according to the user information, generating an electronic seal corresponding to the determined seal type and meeting the seal usage requirements of each institution at the signature position of the target document after passing the verification, and obtaining a sealed document; Determine the document anti-counterfeiting technology selected by the user, and apply the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain multiple anti-counterfeiting marks corresponding to the stamped document; wherein each anti-counterfeiting mark carries the entire stamped document selected by the user to be hidden or the document key information of the stamped document selected by the user to be hidden; different anti-counterfeiting marks contain different document information and document content; the document anti-counterfeiting technology is watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, saddle seal generation technology or digital signature technology; Determine the identification position of each anti-counterfeiting mark in the stamped document, and embed the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position; The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain multiple anti-counterfeiting marks corresponding to the stamped document includes: When it is determined that the document anti-counterfeiting technology selected by the user is the interline seal generation technology, the document key information and the interline seal corresponding to the stamped document selected by the user to be hidden are obtained, and the document key information is encoded to obtain the document code corresponding to the stamped document; the number of each encoding character in the document code is consistent with the total number of document pages of the stamped document; Determine the size of the saddle seal; Based on the total number of pages of the document and the size of the saddle seal, calculate the base width of each document page of the document that the saddle seal is stamped on; According to the basic stamping width of each document page, the saddle seal is cut to obtain a sub-saddle seal corresponding to each document page; Determine the width adjustment rule corresponding to each of the encoded characters in the pre-set document encoding, and adjust the width of each of the sub-saddle seals according to the width adjustment rule corresponding to each of the encoded characters to obtain each adjusted sub-saddle seal, and determine each of the adjusted sub-saddle seals as the anti-counterfeiting mark corresponding to the stamped document.

2. The method according to claim 1, It is characterized in that The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain a plurality of anti-counterfeiting marks corresponding to the sealed document includes: When it is determined that the document anti-counterfeiting technology selected by the user is the watermark anti-counterfeiting technology, determining the watermark type of the watermark anti-counterfeiting technology selected by the user, the watermark type being a bright watermark or a dark watermark; When the watermark type of the watermark anti-counterfeiting technology selected by the user is a clear watermark, the text watermark uploaded by the user that needs to be displayed in the stamped document and the document key information corresponding to the stamped document that the user has selected to hide are obtained, and the document key information is converted into a binary hidden code; the number of characters in the text watermark and the number of hidden codes in the binary hidden code are determined; when the number of hidden codes is less than the number of characters, the character spacing of each character in the text watermark is adjusted based on each character in the binary hidden code, and the adjusted text watermark is determined as the anti-counterfeiting mark corresponding to the stamped document; When the watermark type of the watermark anti-counterfeiting technology selected by the user is a dark watermark, the document key information corresponding to the stamped document that the user has selected to hide is obtained, a document watermark corresponding to the stamped document is generated based on the document key information, and the document watermark is converted into a bit stream consisting of character 0 and character 1, and the bit stream is determined as the anti-counterfeiting mark corresponding to the stamped document.

3. The method according to claim 2, It is characterized in that The step of determining the identification position of each anti-counterfeiting identification in the stamped document and embedding the anti-counterfeiting identification corresponding to the identification position in each identification position of the stamped document comprises: When the anti-counterfeiting mark corresponding to the stamped document is the adjusted text watermark, determining the mark position of the adjusted text watermark in the stamped document as the document background layer, the document background layer being the document background lining below the text; The adjusted text watermark is embedded in the document background layer of each document page in the stamped document.

4. The method according to claim 2, It is characterized in that The step of determining the identification position of each anti-counterfeiting identification in the stamped document and embedding the anti-counterfeiting identification corresponding to the identification position in each identification position of the stamped document comprises: When the anti-counterfeiting mark corresponding to the sealed document is the bit stream, reading the total number of document pages and the total number of document lines corresponding to the sealed document in the document information; Based on the total number of pages and the total number of lines of the document, the document content of the stamped document is analyzed to determine each reference line and each modified line in the stamped document; wherein the modified line is a document line in the stamped document that needs to be moved up or down, and the reference line is a document line whose position does not change; Each of the modified lines is used as an identification position of the bit stream, and each of the modified lines is moved based on each character in the bit stream, so as to embed the bit stream in the sealed document.

5. The method according to claim 1, It is characterized in that The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain a plurality of anti-counterfeiting marks corresponding to the sealed document includes: When it is determined that the document anti-counterfeiting technology selected by the user is the QR code generation technology, obtaining the document key information corresponding to the sealed document selected by the user to be hidden, and the hash value corresponding to the sealed document in the document information; The document key information and the hash value are encoded to obtain a document QR code corresponding to the stamped document, and the document QR code is determined to be the anti-counterfeiting mark corresponding to the stamped document.

6. The method according to claim 1, It is characterized in that The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain a plurality of anti-counterfeiting marks corresponding to the sealed document includes: When it is determined that the document anti-counterfeiting technology selected by the user is a serial code generation technology, obtaining document key information corresponding to the stamped document selected by the user to be hidden, and compressing the document key information to generate a document initial serial code corresponding to the document key; Determine the string code length preselected by the user, encode the initial string code of the document based on the string code length, generate a seal string code corresponding to the string code length, and determine the seal string code as the anti-counterfeiting mark corresponding to the stamped document.

7. The method according to claim 1, It is characterized in that The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the sealed document to obtain a plurality of anti-counterfeiting marks corresponding to the sealed document includes: When it is determined that the document anti-counterfeiting technology selected by the user is the digital signature technology, obtaining the signature private key preset by the user in the user information; Applying a preset digest algorithm to calculate a digest of the sealed document, and obtaining a digest value corresponding to the sealed document; The summary value is asymmetrically encrypted using the signature private key to obtain a signature value corresponding to the sealed document, and the signature value is used as the anti-counterfeiting mark corresponding to the sealed document.

8. The method according to any one of claims 1 to 7, It is characterized in that Also includes: Based on the identification position of each anti-counterfeiting identification in the stamped document, the parameters of each anti-counterfeiting identification are adjusted.

9. A document anti-counterfeiting device, It is characterized in that include: an acquisition unit, configured to, upon receiving a document anti-counterfeiting request sent by a user, acquire a target document corresponding to the document anti-counterfeiting request, document information corresponding to the target document, and user information of the user; the document information includes a document name, a document type, a document hash value, a total number of document pages, a total number of document lines, and a number of document lines per document page; the user information includes a signature key pair set by the user, a user name, and a user identity; A generating unit, configured to determine the seal category required for the target document from the seal categories of a plurality of electronic seals related to the user based on the document type in the document information; Verifying the user identity of the user according to the user information, generating an electronic seal corresponding to the determined seal type and meeting the seal usage requirements of each institution at the signature position of the target document after passing the verification, and obtaining a sealed document; A processing unit, used for determining the document anti-counterfeiting technology selected by the user, and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document, and obtaining a plurality of anti-counterfeiting marks corresponding to the stamped document; wherein each anti-counterfeiting mark carries the entire stamped document selected by the user to be hidden or the document key information of the stamped document selected by the user to be hidden; different anti-counterfeiting marks contain different document information and document contents; the document anti-counterfeiting technology is watermark anti-counterfeiting technology, QR code generation technology, serial code generation technology, saddle seal generation technology or digital signature technology; an identification unit, used for determining the identification position of each anti-counterfeiting mark in the stamped document, and embedding the anti-counterfeiting mark corresponding to the identification position in each identification position of the stamped document, so that during the application process of the stamped document, the authenticity of the currently applied stamped document can be verified through the anti-counterfeiting mark in each identification position; The step of determining the document anti-counterfeiting technology selected by the user and applying the document anti-counterfeiting technology to perform anti-counterfeiting processing on the stamped document to obtain multiple anti-counterfeiting marks corresponding to the stamped document includes: When it is determined that the document anti-counterfeiting technology selected by the user is the interline seal generation technology, the document key information and the interline seal corresponding to the stamped document selected by the user to be hidden are obtained, and the document key information is encoded to obtain the document code corresponding to the stamped document; the number of each encoding character in the document code is consistent with the total number of document pages of the stamped document; Determine the size of the saddle seal; Based on the total number of pages of the document and the size of the saddle seal, calculate the base width of each document page of the document that the saddle seal is stamped on; According to the basic stamping width of each document page, the saddle seal is cut to obtain a sub-saddle seal corresponding to each document page; Determine the width adjustment rule corresponding to each of the encoded characters in the pre-set document encoding, and adjust the width of each of the sub-saddle seals according to the width adjustment rule corresponding to each of the encoded characters to obtain each adjusted sub-saddle seal, and determine each of the adjusted sub-saddle seals as the anti-counterfeiting mark corresponding to the stamped document.

Citation Information

Patent Citations

  • Realization method for seal on the perforation

    CN103679779A

  • Web page digital watermark generation, recognition and printing method and device

    CN109190340A

  • Safe novel voter qualification certificate and using and verification method thereof

    CN109658582A

  • UOF document-based national password electronic signature processing system and method

    CN111914305A

  • Tamper Proof Seal For An Electronic Document

    US20090031135A1