A blockchain-based document processing method, device, and readable medium
By realizing the full process of traceability and traceability of electronic documents to paper documents on the blockchain network, the problem of ineffective prevention of tampering in the existing technology is solved, and the security performance of documents and the rights and interests of users are ensured.
Patent Information
- Application Number
- CN202110352162.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-03-31
AI Technical Summary
The prior art is difficult to realize the traceability and traceability of the entire process after the electronic document is printed as a paper document, it cannot effectively prevent tampering, and it cannot verify the signature or seal of subsequent users on the paper document.
The blockchain-based document processing method is adopted to receive the printing request of electronic documents through the composite machine node on the blockchain network, generate an anti-counterfeiting summary, and print the electronic documents and anti-counterfeiting summary into paper documents. At the same time, the entire process of traceability from electronic documents to paper documents is realized, including initial and final version registration, ensuring that the documents are tamper-proof.
It realizes the full process of traceability and traceability from electronic documents to paper documents and subsequent signatures, prevents tampering, improves the security performance of documents, and protects the rights and interests of document users.
Smart Images

Figure CN115146239B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain, and particularly to document processing based on blockchain. Background Art
[0002] As an information carrier, paper printed documents play a crucial role in various production and life application scenarios. For example, in various occasions such as business office work and meetings, it is essential to use various types of printed paper documents including notice files and contract documents to complete the corresponding work processes.
[0003] Taking the business cooperation scenario as an example, the two parties first determine the contract terms through negotiation and form an electronic document, then print and output the electronic document as a paper document, and finally both parties sign and seal on the paper document, and the contract comes into effect. If a cooperation dispute or other occasion where the contract needs to be consulted occurs, the signed and sealed contract needs to be presented and the terms therein need to be consulted. In such a situation, it is necessary to authenticate the presented paper contract document to confirm whether the paper contract document has been tampered with so as to protect the interests of both parties to the contract.
[0004] In response to the above problems, the solutions adopted in the prior art include using paper made of specific anti-tampering materials, embedding digital watermarks in electronic documents, and generating anti-counterfeiting QR codes for the content of electronic documents. However, special paper is costly, greatly increasing the printing cost; digital watermarks are easily affected by random interference during the printing process and thus lose their anti-counterfeiting function; the anti-counterfeiting QR code of an electronic document can only ensure that the electronic document has not been tampered with, cannot ensure whether it has been tampered with after printing, and cannot verify and protect the signatures and seals of subsequent users on the paper document.
[0005] In order to overcome the above-mentioned defects existing in the prior art, there is an urgent need in this field for a document processing method for realizing full-process traceability from an electronic document to a paper printed document and subsequent addition of handwritten signatures or seals on the paper printed document, so as to prevent tampering from occurring in each link of the full process of the document, improve the security performance of the document, and fully protect the rights and interests of document users. Summary of the Invention
[0006] The following gives a brief overview of one or more aspects to provide a basic understanding of these aspects. This overview is not an exhaustive survey of all contemplated aspects, and is neither intended to identify key or decisive elements of all aspects nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that follows.
[0007] To overcome the above-mentioned defects existing in the prior art, the present invention provides a document processing method, device and readable medium, which are used to realize the whole-process traceability from an electronic document to a paper printed document and subsequent attachment of a handwritten signature or seal on the paper printed document, so as to prevent tampering from occurring in all links of the whole process of the document, improve the security performance of the document, and fully protect the rights and interests of document users.
[0008] The blockchain-based document processing method provided by the present invention includes: a multifunction device node on the blockchain network receives a printing request for an electronic document initiated by a user, recommends an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate an anti-counterfeiting summary of the electronic document. The electronic document is uploaded by the user to the blockchain network, and an on-chain block of the electronic document is generated simultaneously during the upload. The on-chain block includes immutable asset information and mutable metadata information, and the mutable metadata information includes document status information. After the multifunction device node generates the anti-counterfeiting summary, it prints and outputs the electronic document and the anti-counterfeiting summary as a paper document and generates a new on-chain block as a subsequent transaction block of the original on-chain block, and adds the anti-counterfeiting summary to the mutable metadata information, and updates the document status information to printed. The multifunction device node on the blockchain network scans the paper document, uploads the scanned image to the distributed file system of the blockchain network for initial version registration, and updates the document status information to initial version registration to generate a new on-chain block. The multifunction device node on the blockchain network scans the paper document signed by the user, uploads the scanned image to the distributed file system of the blockchain network for final version registration, and updates the document status information to final version registration to generate a new on-chain block.
[0009] In one embodiment, preferably, the types of the anti-counterfeiting verification area include: an anti-counterfeiting verification text area that can be recognized as text content through OCR; an anti-counterfeiting verification static image area with printed content being an inherent graphic or image; and an anti-counterfeiting verification dynamic image area for the user to fill in or sign.
[0010] In one embodiment, preferably, recommending an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate an anti-counterfeiting summary of the electronic document includes: the multifunction device node recommends multiple anti-counterfeiting verification areas on the electronic document according to the content of the electronic document and the printing parameters in the printing request. The multiple anti-counterfeiting verification areas partially or completely overlap. The verification priority order of the multiple anti-counterfeiting verification areas is specified by the user, and the size and quantity of the multiple anti-counterfeiting verification areas are adjusted by the user.
[0011] In one embodiment, preferably, the ID of the on-chain block of the electronic document, the area summary value and area location information of the anti-counterfeiting verification area selected and adjusted by the user are included in the anti-counterfeiting summary generated during printing and output.
[0012] In one embodiment, preferably, the document processing method also includes: the multifunction machine node on the blockchain network scans the paper document to be authenticated and uploads the scanned image to the distributed file system, initiates a traceability and authentication request to the consensus node in the blockchain network, the consensus node authenticates the paper document to be authenticated, and feeds back the authentication and traceability results based on the consensus mechanism.
[0013] In one embodiment, preferably, the traceability and authentication request includes the address of the scanned image of the paper document to be authenticated in the distributed file system, and the consensus node authenticates the paper document to be authenticated, including: the consensus node obtains the scanned image of the paper document to be authenticated according to the address, parses the anti-counterfeiting summary of the paper document to be authenticated to obtain the summary value of the paper document to be authenticated and the summary value in the blockchain of the corresponding electronic document, and compares the two summary values for authentication.
[0014] In one embodiment, preferably, the summary value includes an anti-counterfeiting verification text summary value, the anti-counterfeiting verification text summary value of the paper document to be authenticated includes a first summary value and a second summary value, the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document is a third summary value, the anti-counterfeiting summary of the paper document to be authenticated includes a regional summary value, regional location information and an ID of an on-chain block of the corresponding electronic document of the anti-counterfeiting verification text area of the paper document to be authenticated, and comparing the two summary values for authentication includes: using OCR to obtain anti-counterfeiting text content from a scanned image of the paper document to be authenticated according to the regional location information, obtaining a first summary value according to the anti-counterfeiting text content, the regional summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is a second summary value, and according to the ID of the on-chain block of the corresponding electronic document, tracing back to access the on-chain block after the final version registration of the corresponding electronic document to obtain the regional summary value after the final version registration, the regional summary value after the final version registration is a third summary value, and if the first summary value, the second summary value and the third summary value are the same, the text area of the paper document to be authenticated has not been tampered with after printing.
[0015] In one embodiment, preferably, the digest value further includes an anti-counterfeiting verification static image digest value. The anti-counterfeiting verification static image digest value of the paper document to be authenticated includes a fourth digest value and a fifth digest value, and the anti-counterfeiting verification static image digest value in the blockchain of the corresponding electronic document is a sixth digest value. The anti-counterfeiting digest of the paper document to be authenticated includes the regional digest value, regional location information of the anti-counterfeiting verification static image area of the paper document to be authenticated, and the ID of the on-chain block of the corresponding electronic document. Comparing the two digest values for authentication further includes: obtaining the fourth digest value from the scanned image of the paper document to be authenticated using the perceptual hash algorithm according to the regional location information, the directly recorded regional digest value in the anti-counterfeiting digest of the paper document to be authenticated is the fifth digest value, tracing and accessing the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional digest value after final registration, the regional digest value after final registration is the sixth digest value, calculating the Hamming distance among the fourth digest value, the fifth digest value, and the sixth digest value. If the Hamming distance among them is less than the preset threshold, the static image area of the paper document to be authenticated has not been tampered with after printing.
[0016] In one embodiment, preferably, the digest value further includes an anti-counterfeiting verification dynamic image digest value. The anti-counterfeiting verification dynamic image digest value of the paper document to be authenticated is a seventh digest value, and the anti-counterfeiting verification dynamic image digest value in the blockchain of the corresponding electronic document is an eighth digest value. The anti-counterfeiting digest of the paper document to be authenticated includes the regional location information of the anti-counterfeiting verification dynamic image area of the paper document to be authenticated and the ID of the on-chain block of the corresponding electronic document. Comparing the two digest values for authentication includes: obtaining the seventh digest value from the scanned image of the paper document to be authenticated using the perceptual hash algorithm according to the regional location information, tracing and accessing the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional digest value after final registration, the regional digest value after final registration is the eighth digest value, calculating the Hamming distance between the seventh digest value and the eighth digest value. If the Hamming distance is less than the preset threshold, the dynamic image area of the paper document to be authenticated has not been tampered with.
[0017] In one embodiment, preferably, the electronic document is uploaded to the distributed file system in the blockchain network after the users reach a consensus. The identity of the users in the blockchain network is identified by an asymmetric key pair of a public key and a private key, and the ownership of the electronic document is identified by the public key of the user; the transfer of the ownership of the electronic document needs to be confirmed by the user, and then the new user uses the private key to sign the document digest value to generate a new on-chain block to achieve it.
[0018] In one embodiment, preferably, the identity of a user in a blockchain network is identified by an asymmetric key pair of a public key and a private key. Printing an output electronic document and an anti-counterfeiting summary as a paper document and generating a new on-chain block includes: a multifunction machine node verifying the legality of a printing request, where the printing request includes the ID of the on-chain block of the electronic document, the original printing request composed of printing parameters, and the digital signature generated by the user initiating the printing request using the private key for the original printing request; the variable metadata in the generated new on-chain block includes the anti-counterfeiting summary, and the multifunction machine node publishes the document image containing the anti-counterfeiting summary to the distributed file system of the blockchain network.
[0019] In one embodiment, preferably, the initial version registration further includes: the multifunction machine node performing the initial version registration initiating a consensus verification request; the consensus nodes in the blockchain network verifying by parsing the anti-counterfeiting summary from the document image uploaded to the distributed file system during the initial version registration, and generating a new on-chain block after passing the verification; the variable metadata in the generated new on-chain block includes the address of the document image of the initial version registration in the distributed file system.
[0020] In one embodiment, preferably, the final version registration further includes: after the multifunction machine node performing the final version registration scans the paper document associated with the user's signature, initiating a consensus verification request; the consensus nodes in the blockchain network verifying by parsing the anti-counterfeiting summary from the document image uploaded to the distributed file system during the final version registration, and generating a new on-chain block after passing the verification; the variable metadata in the generated new on-chain block includes the address of the document image of the final version registration in the distributed file system and the newly added anti-counterfeiting summary information, where the newly added anti-counterfeiting summary information includes the regional summary value of the additional anti-counterfeiting verification dynamic image area.
[0021] Another aspect of the present invention provides a blockchain-based document processing apparatus, comprising: a memory; and a processor coupled to the memory, the processor being configured to: receive a print request for an electronic document initiated by a user, recommend an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate an anti-counterfeiting summary of the electronic document, the electronic document being uploaded by the user to a blockchain network, and generating an on-chain block of the electronic document while uploading, the on-chain block including immutable asset information and mutable metadata information, the mutable metadata information including document status information; after generating the anti-counterfeiting summary, print and output the electronic document and the anti-counterfeiting summary as a paper document and generate a new on-chain block as a subsequent transaction block of the original on-chain block, and add the anti-counterfeiting summary to the mutable metadata information, and update the document status information to printed; scan the paper document, upload the scanned image to the distributed file system of the blockchain network for initial version registration, and update the document status information to initial version registration to generate a new on-chain block; scan the paper document signed by the user, upload the scanned image to the distributed file system of the blockchain network for final version registration, and update the document status information to final version registration to generate a new on-chain block.
[0022] In one embodiment, preferably, the types of the anti-counterfeiting verification area include: an anti-counterfeiting verification text area that can be recognized as text content by OCR; an anti-counterfeiting verification static image area with printed content being an inherent graphic or image; and an anti-counterfeiting verification dynamic image area for the user to fill in or sign.
[0023] In one embodiment, preferably, the processor is further configured to: recommend a plurality of anti-counterfeiting verification areas on the electronic document according to the content of the electronic document and the print parameters in the print request, the plurality of anti-counterfeiting verification areas partially or fully overlap, the verification priority order of the plurality of anti-counterfeiting verification areas is specified by the user, and the size and quantity of the plurality of anti-counterfeiting verification areas are adjusted by the user.
[0024] In one embodiment, preferably, the anti-counterfeiting summary generated during print output includes the ID of the on-chain block of the electronic document, the area summary value and area location information of the anti-counterfeiting verification area adjusted by the user.
[0025] In one embodiment, preferably, the processor is further configured to: scan the paper document to be authenticated and upload the scanned image to the distributed file system, initiate a traceability and authentication request to the consensus nodes in the blockchain network, the consensus nodes authenticate the paper document to be authenticated, and feedback the authentication and traceability results based on the consensus mechanism.
[0026] In one embodiment, preferably, the processor is further configured to: obtain a scanned image of the paper document to be authenticated according to the address via a consensus node, parse the anti-counterfeiting summary of the paper document to be authenticated to obtain the summary value of the paper document to be authenticated and the summary value in the blockchain of the corresponding electronic document, and compare the two summary values to perform authentication.
[0027] In one embodiment, preferably, the summary value includes an anti-counterfeiting verification text summary value. The anti-counterfeiting verification text summary value of the paper document to be authenticated includes a first summary value and a second summary value, and the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document is a third summary value. The anti-counterfeiting summary of the paper document to be authenticated contains the regional summary value, regional location information of the anti-counterfeiting verification text area of the paper document to be authenticated, and the ID of the on-chain block of the corresponding electronic document. The processor is further configured to: use OCR to obtain anti-counterfeiting text content from the scanned image of the paper document to be authenticated according to the regional location information, obtain the first summary value according to the anti-counterfeiting text content, the directly recorded regional summary value in the anti-counterfeiting summary of the paper document to be authenticated is the second summary value, trace and access the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional summary value after final registration, and the regional summary value after final registration is the third summary value. If the first summary value, the second summary value, and the third summary value are the same, the text area of the paper document to be authenticated has not been tampered with after printing.
[0028] In one embodiment, preferably, the summary value further includes an anti-counterfeiting verification static image summary value. The anti-counterfeiting verification static image summary value of the paper document to be authenticated includes a fourth summary value and a fifth summary value, and the anti-counterfeiting verification static image summary value in the blockchain of the corresponding electronic document is a sixth summary value. The anti-counterfeiting summary of the paper document to be authenticated contains the regional summary value, regional location information of the anti-counterfeiting verification static image area of the paper document to be authenticated, and the ID of the on-chain block of the corresponding electronic document. The processor is further configured to: use the perceptual hash algorithm to obtain the fourth summary value from the scanned image of the paper document to be authenticated according to the regional location information, the directly recorded regional summary value in the anti-counterfeiting summary of the paper document to be authenticated is the fifth summary value, trace and access the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional summary value after final registration, and the regional summary value after final registration is the sixth summary value. Calculate the Hamming distance among the fourth summary value, the fifth summary value, and the sixth summary value. If the Hamming distance among the three is less than a preset threshold, the static image area of the paper document to be authenticated has not been tampered with after printing.
[0029] In one embodiment, preferably, the summary value also includes an anti-counterfeiting verification dynamic image summary value, the anti-counterfeiting verification dynamic image summary value of the paper document to be authenticated is a seventh summary value, the anti-counterfeiting verification dynamic image summary value in the blockchain of the corresponding electronic document is an eighth summary value, and the anti-counterfeiting summary of the paper document to be authenticated includes the regional location information of the anti-counterfeiting verification dynamic image area of the paper document to be authenticated and the ID of the on-chain block of the corresponding electronic document. The processor is further configured to: obtain the seventh summary value from the scanned image of the paper document to be authenticated using a perceptual hash algorithm according to the regional location information, trace back and access the on-chain block of the corresponding electronic document after the final version registration according to the ID of the on-chain block of the corresponding electronic document to obtain the regional summary value after the final version registration, the regional summary value after the final version registration is the eighth summary value, and calculate the Hamming distance between the seventh summary value and the eighth summary value. If the Hamming distance is less than the preset threshold, the dynamic image area of the paper document to be authenticated has not been tampered with.
[0030] In one embodiment, preferably, the electronic document is uploaded to the distributed file system in the blockchain network after consensus among users, the user's identity in the blockchain network is identified by an asymmetric key pair of public and private keys, and the ownership of the electronic document is identified by the user's public key; the transfer of ownership of the electronic document must be confirmed by the user, and the new user uses the private key to sign the document summary value to generate a new on-chain block to achieve transfer.
[0031] In one embodiment, preferably, the identity of the user in the blockchain network is identified by an asymmetric key pair of a public key and a private key, and the processor is further configured to: verify the legitimacy of the print request, the print request includes the ID of the on-chain block of the electronic document, the original print request text consisting of print parameters, and the digital signature generated by the user who initiated the print request using the private key on the original print request text; the variable metadata in the generated new on-chain block includes an anti-counterfeiting summary, and the MFP node publishes the document image containing the anti-counterfeiting summary to the distributed file system of the blockchain network.
[0032] In one embodiment, preferably, the processor is further configured to: initiate a consensus verification request after performing the first edition registration scan; the consensus node in the blockchain network parses the anti-counterfeiting summary of the document image uploaded to the distributed file system during the first edition registration for verification, and generates a new on-chain block after the verification is passed; the variable metadata in the generated new on-chain block includes the address of the document image of the first edition registration in the distributed file system.
[0033] In one embodiment, preferably, the processor is further configured to: after scanning a paper document associated with a user signature, initiate a consensus verification request; the consensus nodes in the blockchain network verify by parsing the anti-counterfeiting summary from the document image uploaded to the distributed file system during final registration, and generate a new on-chain block after successful verification; the variable metadata in the generated new on-chain block includes the address of the final-registered document image in the distributed file system and the newly added anti-counterfeiting summary information, and the newly added anti-counterfeiting summary information includes the regional summary value of the appended anti-counterfeiting verification dynamic image area.
[0034] The present invention also provides a computer-readable medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the document processing method in any one of the above. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] After reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings, the above features and advantages of the present invention can be better understood. In the drawings, the components are not necessarily drawn to scale, and components with similar related characteristics or features may have the same or similar reference numerals.
[0036] Figure 1 is a schematic flowchart of a method illustrated by the document processing method provided in one aspect of the present invention;
[0037] Figure 2 is a schematic flowchart of a document processing method in the stage of on-chain of an electronic document illustrated by an embodiment of the present invention;
[0038] Figure 3 is a schematic flowchart of a document processing method in the stage of printing a paper document illustrated by an embodiment of the present invention;
[0039] Figure 4 is a schematic flowchart of a document processing method in the stage of on-chain of a paper document illustrated by an embodiment of the present invention;
[0040] Figure 5 is a schematic flowchart of a document processing method in the stage of document traceability and authentication illustrated by an embodiment of the present invention;
[0041] Figure 6 is a schematic diagram of a blockchain network structure illustrated by an embodiment of the present invention; and
[0042] Figure 7 is a schematic diagram of the structure of a document processing device illustrated by another aspect of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The following specific embodiments illustrate the implementation manners of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Although the description of the present invention will be introduced in conjunction with preferred embodiments, this does not mean that the features of this invention are limited to this implementation manner. On the contrary, the purpose of introducing the invention in conjunction with the implementation manner is to cover other alternatives or modifications that may be extended based on the claims of the present invention. In order to provide a deep understanding of the present invention, many specific details will be included in the following description. The present invention can also be implemented without using these details. In addition, in order to avoid confusing or obscuring the key points of the present invention, some specific details will be omitted in the description.
[0044] It can be understood that although the terms "first", "second", "third", etc. can be used herein to describe various components, regions, layers, and / or parts, these components, regions, layers, and / or parts should not be limited by these terms, and these terms are only used to distinguish different components, regions, layers, and / or parts. Therefore, the first component, region, layer, and / or part discussed below can be referred to as the second component, region, layer, and / or part without departing from some embodiments of the present invention.
[0045] The full process of the document in this article refers to the whole process from printing an electronic document to a paper document, then forming a signed paper document through user signatures, and finally tracing and authenticating the signed paper document. Therefore, the full process of the document can be divided into four stages in chronological order, namely the stage of uploading the electronic document to the blockchain, the stage of printing the paper document, the stage of uploading the paper document to the blockchain, and the stage of document tracing and authentication. Below, in combination with the four stages of the full process of the document, the steps of the document processing method of the present invention will be specifically described.
[0046] Figure 1 It is a schematic flowchart of the method of the document processing method provided by one aspect of the present invention.
[0047] As Figure 1 shown, the document processing method 100 provided by the present invention mainly includes the following steps:
[0048] Step 101: The multifunction machine node on the blockchain network receives a print request for an electronic document initiated by a user, recommends an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate an anti-counterfeiting summary of the electronic document. The electronic document is uploaded by the user to the blockchain network, and an on-chain block of the electronic document is generated at the same time. The on-chain block includes immutable asset information and mutable metadata information, and the mutable metadata information includes document status information;
[0049] Step 102: After the composite machine node generates the anti-counterfeiting summary, it prints and outputs the electronic document and the anti-counterfeiting summary as a paper document, generates a new on-chain block as the subsequent transaction block of the original on-chain block, adds the anti-counterfeiting summary to the variable metadata information, and updates the document status information to printed.
[0050] Steps 101 and 102 include the process methods in the stages of on-chain of the electronic document and printing of the paper document.
[0051] Figure 2 It is a schematic flowchart of the document processing method in the on-chain stage of the electronic document illustrated according to an embodiment of the present invention. Figure 3 It is a schematic flowchart of the document processing method in the printing stage of the paper document illustrated according to an embodiment of the present invention.
[0052] Please first refer to Figure 2 , the document processing method 200 in the on-chain stage of the electronic document includes:
[0053] 201: First, the associated users negotiate off-chain and form an electronic document after reaching an agreement. The electronic document can be any electronic format supported by the composite machine node in the blockchain network for printing and output.
[0054] 202: The composite machine node in the blockchain network receives the electronic document uploaded by the user who owns the electronic document to the blockchain network and generates an on-chain block of the electronic document.
[0055] The user identifies their identity in the blockchain network using a pair of public and private keys of the asymmetric key, and the ownership of the electronic document can be identified by the user's public key information. Only the user who owns the document can perform subsequent operations on the electronic document.
[0056] After the user uploads the electronic document to the distributed file system of the blockchain network, an on-chain block of the electronic document is generated. The generated on-chain block includes immutable asset information and variable metadata information. The immutable asset information includes the document digest value of the electronic document and the address of the electronic document in the distributed file system. The variable metadata information includes the document status information at the current stage. For example, the document status information at this stage is the electronic document.
[0057] The document digest value is the message digest value calculated by applying the message digest algorithm with the binary content of the electronic document as the input, and it is automatically generated when the blockchain network receives the electronic document uploaded by the user. The message digest algorithm includes MD, SHA or other series of algorithms, and can be selected by changing the configuration.
[0058] 203: The ownership of the electronic document is confirmed, signed, and transferred among the interested users.
[0059] After confirmation by each associated user, the user can use the private key to digitally sign the document digest value. After signing, the signed document digest value is obtained, and the signed document digest value is appended and recorded into the variable metadata of the blockchain block, thereby forming a new blockchain block and completing the transfer of the ownership of the electronic document from the original user to the new user. The new blockchain block generated after each transfer serves as the subsequent transaction block of the original blockchain block, thus forming a complete blockchain for the document.
[0060] Please also refer to Figure 3 , the document processing method 300 in the paper document printing stage includes:
[0061] 301: The multifunction machine node in the blockchain network receives a printing request initiated by a user who owns the electronic document.
[0062] The printing request includes the ID of the blockchain block of the electronic document, the original printing request composed of printing parameters, and the digital signature of the user. The digital signature is encrypted by the user using their private key for the digital digest of the original printing request.
[0063] 302: Verify the legality of the user's printing request and generate a print preview in the recommended anti-counterfeiting verification area on the printing page.
[0064] After the multifunction machine verifies that the user's printing request passes, it displays the image preview of the printing page page by page in the order of the document pages, and the recommended anti-counterfeiting verification area is shown in the print preview.
[0065] The anti-counterfeiting verification area can be divided into three categories: the anti-counterfeiting verification text area that can be accurately recognized as text content by OCR, the anti-counterfeiting verification static image area with the printed content being an inherent graphic or image, and the anti-counterfeiting verification dynamic image area with dynamic content for the user to fill in and sign. The anti-counterfeiting verification area is divided and displayed on each printing page according to the printed content and printing parameters of the document according to preset rules to recommend to the user.
[0066] 303: Generate an anti-counterfeiting digest according to the anti-counterfeiting verification area and anti-counterfeiting digest attributes adjusted by the user's selection.
[0067] The user who owns the document ownership can manually adjust the size and quantity of the above three types of anti-counterfeiting verification areas on the touch screen of the multifunction machine according to the recommendation of the print preview, and select the anti-counterfeiting digest attributes including information such as the printing method and position.
[0068] The anti-counterfeiting verification area and the anti-counterfeiting digest area can be a series of rectangular areas on the printing page. Multiple anti-counterfeiting verification areas can overlap, and the verification priority order of multiple anti-counterfeiting verification areas can be specified by the user. The printing method of the anti-counterfeiting digest can include printing the plain text network address or printing a QR code, and the printing position can be the header, footer or blank areas on the left and right, which can be adjusted by the user dragging on the touch screen of the multifunction machine.
[0069] The printing parameters include stapling and punching parameters. In the preset rules, the areas for stapling and punching cannot be set as the printing positions of the anti-counterfeiting summary area.
[0070] The anti-counterfeiting summary includes the original anti-counterfeiting information and the user's digital signature. The digital signature is generated by encrypting the message digest of the original anti-counterfeiting information with the private key of the owner user. The original anti-counterfeiting information includes: the ID of the on-chain block of the document, the unified page number range, and information on a series of anti-counterfeiting verification areas.
[0071] The unified page number range refers to the page number range including each printed page calculated based on the number of printed copies and the number of pages printed per side. In one embodiment, when printing an M-page electronic document with one page printed per side and the number of copies being N, the unified page number range of the first printed side of the first copy is 1 to 1, and the unified page number range of the first printed side of the Nth copy is (N - 1)×M + 1 to (N - 1)×M + 1. If an M-page electronic document (M≥2) is printed with two pages printed per side and the same number of N copies, the unified page number range of the first printed side of the first copy is 1 to 2, and the unified page number range of the first printed side of the Nth copy is (N - 1)×5 + 1 to (N - 1)×5 + 2.
[0072] The information on a series of anti-counterfeiting verification areas in the anti-counterfeiting summary includes the position information, area summary value, type information, etc. of each anti-counterfeiting verification area. The position information can be the x and y coordinates of the upper left corner of its rectangular area and the width and height information of the rectangle.
[0073] The document processing method 300 in the paper document printing stage further includes:
[0074] 304: Output the electronic document and the anti-counterfeiting summary as a paper document to generate a new on-chain block.
[0075] The newly generated on-chain block is the subsequent transaction block of the original on-chain block of the electronic document. The anti-counterfeiting summary information is updated to the variable metadata information of the new block. The document status information in the variable metadata information of the new block is updated to printed. At the same time, the generated printed page image is published to the distributed file system of the blockchain, and the address of the printed page image in the distributed file system is updated in the variable metadata information of the new block.
[0076] Please go back to Figure 1 , the document processing method 100 provided by the present invention further includes:
[0077] Step 103: The multifunction machine node on the blockchain network scans the paper document, uploads the scanned image to the distributed file system of the blockchain network for initial version registration, and updates the document status information to initial version registration to generate a new on-chain block;
[0078] Step 104: The multifunction machine node on the blockchain network scans the paper document signed by the user, uploads the scanned image to the distributed file system of the blockchain network for final version registration, and updates the document status information to final version registration to generate a new on-chain block.
[0079] Steps 103 and 104 correspond to the process method for uploading a paper document to the chain.
[0080] Figure 4 It is a schematic flowchart of the document processing method in the stage of uploading a paper document to the chain according to an embodiment of the present invention.
[0081] Please refer to Figure 4 , the document processing method 400 in the stage of uploading a paper document to the chain includes:
[0082] 401: Scan the paper document, upload the scanned image to the distributed file system of the blockchain network, and initiate a consensus verification request for the initial version registration of the paper document.
[0083] The user of the document ownership hands over the printed paper document to the multifunction machine node for scanning, thereby submitting a request for the initial version registration of the document.
[0084] 402: The consensus node obtains the scanned image, parses the anti-counterfeiting summary for verification, and generates a new on-chain block after passing the verification.
[0085] The initial version registration request must first be verified by each consensus node in the blockchain network. The consensus node is a node with a consensus authentication function in the blockchain network, which can be all nodes in the blockchain network or some nodes in the blockchain network.
[0086] After passing the verification, the variable metadata information of the newly generated on-chain block records the address of the initial version paper document image in the blockchain distributed file system, and the document status information is updated to the initial version registration of the paper document.
[0087] 403: Scan the paper document associated with the user's signature, upload the scanned image to the distributed file system of the blockchain network, and initiate a consensus verification request for the final version registration of the paper document;
[0088] 404: The consensus node obtains the scanned image, parses the anti-counterfeiting summary for verification, and generates a new on-chain block after passing the verification.
[0089] The method process for the final version registration of the paper document is similar to that of the initial version registration. The difference is that the scanned object is the paper document signed and sealed by multiple associated users. The variable metadata information of the newly generated on-chain block also records the address of the final version paper document image in the blockchain distributed file system.
[0090] It should be noted that the newly generated new block in the final registration also includes anti-counterfeiting summary information. The newly added anti-counterfeiting summary information includes the regional summary value of the additional anti-counterfeiting verification dynamic image area. The anti-counterfeiting verification dynamic image area here is the area where the user signs and seals. In the whole process of the document, only in the final registration link can the blockchain network obtain the image of the signature and seal area on the paper document, so as to generate a summary value for subsequent authentication. The regional summary value of the additional anti-counterfeiting verification dynamic image area ensures the non-tamperability of the user's signature and seal information.
[0091] The document processing method based on blockchain provided by the present invention further includes tracing and authenticating the document.
[0092] Figure 5 It is a schematic flowchart of the document processing method in the document tracing and authentication stage illustrated according to an embodiment of the present invention.
[0093] Please refer to Figure 5 , the document processing method 500 in the document tracing and authentication stage includes:
[0094] 501: Scan the paper document to be authenticated, upload the scanned image to the distributed file system, and initiate a consensus request for tracing and authentication;
[0095] The user can scan the paper document to be authenticated at any composite machine node of the blockchain network. The composite machine node that performs the scanning uploads the scanned image to the distributed file system and initiates a consensus request for tracing and authentication. The consensus request contains the address of the scanned image of the paper document to be authenticated in the distributed file system, so that other nodes can obtain it to carry out authentication.
[0096] 502: The consensus node obtains the image of the paper document to be authenticated, and parses the anti-counterfeiting summary to obtain the summary value of the paper document to be authenticated and the on-chain block information;
[0097] 503: Trace and access the on-chain block of the final registration of the paper document to be authenticated to obtain the summary value of the final registration document, and compare the summary value of the paper document to be authenticated with the summary value obtained from the on-chain block to authenticate the document.
[0098] The consensus node obtains the scanned image of the paper document to be authenticated according to the address, parses the anti-counterfeiting summary of the paper document to be authenticated to obtain the summary value of the paper document to be authenticated and the summary value in the blockchain of the corresponding electronic document, and compares the two summary values to authenticate.
[0099] More specifically, the key to authentication lies in the anti-counterfeiting verification area mentioned above. Corresponding to the three types of the anti-counterfeiting verification area, the summary values for authentication also include three categories: anti-counterfeiting verification text summary value, anti-counterfeiting verification static image summary value, and anti-counterfeiting verification dynamic image summary value.
[0100] For the anti-counterfeiting verification text summary value, the anti-counterfeiting text content is obtained from the scanned image of the paper document to be authenticated using OCR according to the regional location information, and the first summary value is obtained based on the anti-counterfeiting text content. The regional summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is the second summary value. The ID of the on-chain block corresponding to the corresponding electronic document is traced to access the on-chain block after final registration of the corresponding electronic document to obtain the regional summary value after final registration, and the regional summary value after final registration is the third summary value. If the first summary value, the second summary value, and the third summary value are the same, the text area of the paper document to be authenticated has not been tampered with after printing.
[0101] Among them, the first summary value and the second summary value belong to the anti-counterfeiting verification text summary value of the paper document to be authenticated, and the third summary value is the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document.
[0102] For the anti-counterfeiting verification static image summary value, the fourth summary value is obtained from the scanned image of the paper document to be authenticated using the perceptual hash algorithm according to the regional location information. The regional summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is the fifth summary value. The ID of the on-chain block corresponding to the corresponding electronic document is traced to access the on-chain block after final registration of the corresponding electronic document to obtain the regional summary value after final registration, and the regional summary value after final registration is the sixth summary value. The Hamming distance among the fourth summary value, the fifth summary value, and the sixth summary value is calculated. If the Hamming distance among them is less than the preset threshold, the static image area of the paper document to be authenticated has not been tampered with after printing.
[0103] Among them, the fourth summary value and the fifth summary value belong to the anti-counterfeiting verification text summary value of the paper document to be authenticated, and the sixth summary value is the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document.
[0104] For the anti-counterfeiting verification dynamic image summary value, the seventh summary value is obtained from the scanned image of the paper document to be authenticated using the perceptual hash algorithm according to the regional location information. The ID of the on-chain block corresponding to the corresponding electronic document is traced to access the on-chain block after final registration of the corresponding electronic document to obtain the regional summary value after final registration, and the regional summary value after final registration is the eighth summary value. The Hamming distance between the seventh summary value and the eighth summary value is calculated. If the Hamming distance is less than the preset threshold, the dynamic image area of the paper document to be authenticated has not been tampered with.
[0105] Among them, the seventh summary value belongs to the anti-counterfeiting verification text summary value of the paper document to be authenticated, and the eighth summary value is the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document.
[0106] Please go back to Figure 5 , the document processing method 500 in the authentication and traceability phase further includes:
[0107] 504: The feedback result of the consensus node, which is the final result of the document traceability authentication based on the consensus mechanism.
[0108] Only when all consensus nodes pass the authentication can a consensus be reached that the document has not been tampered with, and the entire traceability authentication process can be completed.
[0109] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order and / or concurrently with other actions that are illustrated and described herein or that are not illustrated and described herein but are understandable to those skilled in the art.
[0110] The above method will be described below with a specific embodiment.
[0111] Figure 6 It is a schematic diagram of the blockchain network structure illustrated according to an embodiment of the present invention.
[0112] As Figure 6 shown, a blockchain network based on BigChainDB consists of a peer - to - peer network containing multiple multifunctional digital all - in - one nodes with independent mongodb databases. The multifunctional digital all - in - one nodes have at least printing and scanning functions and communicate with other nodes through the Tendermint protocol.
[0113] The multifunctional digital all - in - one node is an ABCI (Blockchain Application Interface) Server. It completes information query, transaction verification, and consensus - related processing by implementing the ABCI interface. The blockchain distributed file system based on the InterPlanetary File System IPFS is used for the storage and fast access of electronic documents and scanned images of paper documents.
[0114] In the stage of uploading an electronic document to the blockchain: First, users reach an agreement off - chain to form an off - chain electronic document. The off - chain electronic document can be any electronic format that contains printable content and is supported by the multifunctional digital all - in - one node for printing output, such as Word, PDF, txt, xdw, etc. Users identify their identities in the blockchain network using an asymmetric key pair of a public key and a private key. In this embodiment, the Ed25519 digital signature algorithm can be used to generate the public - private key pair. Other RSA algorithms can also be used. Hereinafter, the public keys of users A and B are denoted as PUB_A and PUB_B respectively, and the private keys are denoted as PRI_A and PRI_B respectively.
[0115] User A publishes the negotiated off - chain electronic document to the blockchain, and the on - chain electronic document is formed through the following steps:
[0116] In the first step, upload the electronic document to the InterPlanetary File System (IPFS) to generate an IPFS address string, hereinafter denoted as IPFS_ADDR;
[0117] In the second step, perform a message digest on the electronic document. The message digest algorithm can use MD series algorithms or SHA algorithms according to the configuration. The message digest value of the electronic document is denoted as HASH_EDOC;
[0118] In the third step, sign the message digest value of the electronic document HASH_EDOC using the private key PRI_A of user A to generate the signed message digest value of the electronic document for user HASH_EDOC_SIG;
[0119] In the fourth step, use the CREATE TRANSACTION of BigChainDB to generate an on-chain electronic document. The on-chain electronic document consists of immutable asset information (ASSET) and mutable metadata information (METADATA).
[0120] Among them, the immutable asset information includes at least the signed message digest value of the electronic document HASH_EDOC_SIG when the electronic document is uploaded to the chain, and the address IPFS_ADDR of the electronic document published to the distributed file system on the chain. The mutable metadata information is the current document status information. The current document status information is the on-chain electronic document EDOC. The ownership of the on-chain electronic document is identified using the public key information of the user, and only the owner user can perform subsequent operations on the on-chain electronic document. The ownership of the on-chain electronic document can be transferred between users.
[0121] The specific process of transferring the ownership of the electronic document is as follows:
[0122] Use the TRANSFER TRANSACTION of BigChainDB to transfer the ownership of the on-chain electronic document among all interested users. After each user confirms the on-chain electronic document, sign the document digest value using the private key. Each signature forms a new block, and the signed digest value is appended to the mutable metadata of the block.
[0123] After the process of uploading the electronic document to the chain is completed, except for necessary block data such as timestamps, the BigChainDB block will contain the following business data information:
[0124]
[0125]
[0126] In the stage of uploading the paper document to the chain:
[0127] The user of the electronic document ownership issues a printing request to the multi-functional digital all-in-one machine node in the blockchain network. The printing request consists of the original printing request text composed of the on-chain electronic document block ID and printing parameters, and the digital signature formed by digitally digesting the original printing request text and encrypting the digital digest with the private key.
[0128] The multi-functional digital all-in-one machine node verifies the legality of the printing request. The printing request verification includes the following steps:
[0129] The multi-functional digital all-in-one machine analyzes the printing request to obtain the original printing request text and the printing request digital signature;
[0130] The multi-functional digital all-in-one machine uses a digest algorithm to generate the original printing request text digest PRT_REQ_M;
[0131] The multi-functional digital all-in-one machine uses the public key of the on-chain electronic document ownership user to parse the digital signature and generate PRT_REQ_M1;
[0132] If PRT_REQ_M is consistent with PRT_REQ_M1, it indicates that the printing request is initiated by the on-chain electronic document ownership user and the printing request is complete and unaltered.
[0133] The multi-functional digital all-in-one machine node processes the printing request and presents a print preview on the touch screen. It can display page by page the preview effect of the upcoming printed output as a paper document, and divide the recommended anti-counterfeiting verification areas according to the preset rules based on the printed content of the document. The anti-counterfeiting verification areas are divided into three categories: the anti-counterfeiting verification text area that can be accurately recognized as text content through OCR, the anti-counterfeiting verification static image area with the printed content being an inherent graphic or image, and the anti-counterfeiting verification dynamic image area with dynamic content handwritten and filled in by future users.
[0134] Taking the Chinese market as an example, the area with a long underline and no printed content online is recognized as the anti-counterfeiting verification dynamic image area. The part where "date" appears and is accompanied by a blank is recognized as the anti-counterfeiting verification dynamic image area. The part where the words "Party A" and "Party B" appear and are accompanied by a blank area is recognized as the anti-counterfeiting verification dynamic image area.
[0135] The ownership user manually adjusts the size and quantity of the above three types of anti-counterfeiting areas on the touch screen of the multi-functional digital all-in-one machine, and selects the printing method and position of the anti-counterfeiting summary area. The anti-counterfeiting area and the anti-counterfeiting summary area are a series of rectangular areas in each printed page. For the printing method of the anti-counterfeiting summary area, you can choose to print the plain text network address or print a QR code. The anti-counterfeiting summary printing position is the header, footer, and blank areas on the left and right. The user can drag the anti-counterfeiting area icon on the touch screen of the multi-functional digital all-in-one machine to determine the output position.
[0136] Due to the characteristics of large information capacity, strong error tolerance, and high decoding reliability in QR code encoding, preferably, the QR code is used as the printing method for the anti-counterfeiting summary area. Optional QR code encoding methods are PDF417 QR code, Datamatri QR code, and QR Code. Plaintext network address printing is only recommended for occasions with extremely large amounts of data, and its address is a network address of the InterPlanetary File System (IPFS). In another implementation, a QR code can also be used to record a network address of IPFS, and the detailed content of the anti-counterfeiting summary information is recorded in this network address.
[0137] The original information of the anti-counterfeiting summary information includes the on-chain electronic document block ID, unified page number range information, and a series of anti-counterfeiting area information. The anti-counterfeiting area information includes the x and y coordinates of the upper left corner of its rectangular area, as well as the width and height information of the rectangle, area type information, and summary value. The original text of the anti-counterfeiting summary information is simultaneously digitally signed using the private key of the on-chain electronic document owner, and its unencrypted pseudocode structure is as follows:
[0138]
[0139]
[0140] Among them, the information structure of each anti-counterfeiting information area rect is:
[0141]
[0142] The multifunctional digital all-in-one machine outputs the on-chain electronic document and the anti-counterfeiting summary information as a paper document. Based on the original on-chain electronic document block, a new on-chain electronic document block is generated using BigChainDB to transfer the transaction (TRANSFER TRANSACTION), and the anti-counterfeiting summary information is updated to the variable metadata information of the new block. The document status information at this stage in the variable metadata information of the new block is "PRINTED".
[0143] During the paper document chaining stage, the owner of the electronic document on the chain uses a multifunctional digital all-in-one machine to scan the printed paper document and apply for the registration of the first edition paper document block. The multifunctional digital all-in-one machine registers the scanned image in the blockchain distributed file system IPFS and initiates a consensus verification request to the BigChainDB blockchain network. : Each consensus node of the BigChainDB blockchain verifies the anti-counterfeiting summary information based on the scanned image in IPFS. After the verification is passed, a new electronic document block on the chain is generated using the BigChainDB transfer transaction (TRANSFER TRANSACTION). The new electronic document block on the chain has a variable metadata information that records the address hash of the first edition paper document image in the blockchain distributed file system. The document status information at this stage in the variable metadata information is the first edition registration of paper documents (PAP_INIT).
[0144] After multiple users of the document association complete the signature and seal of the offline paper document, scan the paper document again and apply for paper document block registration. The multifunctional digital all-in-one machine registers the scanned image into the blockchain distributed file system and initiates a consensus verification request to the BigChainDB blockchain network again. Each consensus node of the BigChainDB blockchain verifies the anti-counterfeiting summary information according to the scanned image in the blockchain distributed file system. After the verification is passed, a new on-chain electronic document block is generated using the BigChainDB transfer transaction (TRANSFER TRANSACTION). The new on-chain electronic document block, whose variable metadata information records the address of the final version of the paper document image in the blockchain distributed file system. The anti-counterfeiting summary information of the anti-counterfeiting verification dynamic image area is added to the variable metadata information of the new block, and the document status information at this stage is updated to the final version registration of the paper document (PAP_FINAL).
[0145] Finally, in the document traceability and authentication stage, the user scans the paper document to be authenticated as an image at any multifunctional digital all-in-one machine node and initiates a traceability and authentication request. The multifunctional digital all-in-one machine node registers the paper document to be authenticated as an image in the blockchain distributed file system IPFS and initiates an authentication consensus request. The authentication consensus request contains the network address of the image to be authenticated in the blockchain distributed file system IPFS.
[0146] Each consensus node of the BigChainDB blockchain obtains the image to be authenticated from IPFS according to the IPFS network address of the blockchain distributed file system in the authentication request. Each consensus node of the BigChainDB blockchain obtains the block ID of the on-chain electronic document block during on-chain printing from the anti-counterfeiting summary information, and can use BigChainDB Query to trace and access the block at the time of the final registration of the paper document. Each consensus node of the BigChainDB blockchain obtains the anti-counterfeiting summary information in the metadata information of the block at the time of the final registration of the paper document, and combines it with the image to be authenticated for authentication confirmation.
[0147] For the anti-counterfeiting verification text area, first, perform OCR processing on the image to be authenticated according to the position information of the anti-counterfeiting verification text area to obtain the text information content, and then perform a message digest on the text information content to obtain the digest value M1. Then, parse the anti-counterfeiting summary area of the image to be authenticated to obtain the digest value M2 corresponding to the position of the text area in the anti-counterfeiting summary information content. If M1 = M2, it indicates that the text area of the paper document has not been tampered with after printing.
[0148] The anti-counterfeiting verification dynamic image area is similar to the anti-counterfeiting static image area. Calculate the digest values of the dynamic image area sub-images of the image to be authenticated and the scanned image in the blockchain distributed file system recorded in the block at the time of the final registration of the paper document, and compare the Hamming distance between the above digest values. If the Hamming distance is less than the set threshold, it indicates that the dynamic image area part of the paper document is consistent with the result recorded in the final block of the paper document and has not been tampered with.
[0149] Finally, each consensus node of the BigChainDB blockchain feeds back its respective consensus results, and feeds back the traceability and authentication results through the consensus mechanism.
[0150] Figure 7 It is a schematic structural diagram of a document processing device shown according to another aspect of the present invention.
[0151] As Figure 7 shown, another aspect of the present invention provides a blockchain-based document processing device 700, including a memory 701 and a processor 702 coupled to the memory 701. The processor 702 is configured to execute the steps of the above-mentioned document processing method.
[0152] The present invention also provides a computer-readable medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned blockchain-based document processing methods can be implemented.
[0153] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, the various illustrative components, blocks, modules, circuits, and steps are described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and the design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
[0154] The processors described in this case can be implemented using electronic hardware, computer software, or any combination thereof. Whether such processors are implemented as hardware or software will depend upon the particular application and the overall design constraints imposed on the system. By way of example, a processor, any part of a processor, or any combination of processors presented in this disclosure can be implemented using a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a state machine, gated logic, discrete hardware circuits, and other suitable processing components configured to perform the various functions described throughout this disclosure. The functionality of a processor, any part of a processor, or any combination of processors presented in this disclosure can be implemented using software executed by a microprocessor, a microcontroller, a DSP, or other suitable platform.
[0155] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of both. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read from, and write to, the storage medium. In an alternative, the storage medium can be integrated into the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In an alternative, the processor and the storage medium can reside as discrete components in a user terminal.
[0156] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. The computer-readable medium includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. The storage media may be any available media that can be accessed by a computer. By way of example and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc where disks typically reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0157] The foregoing description of the disclosure has been provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A blockchain-based document processing method, including: A composite machine node on the blockchain network receives a print request for an electronic document initiated by a user, recommends an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate the anti-counterfeiting summary of the electronic document. The electronic document is uploaded by the user to the blockchain network, and an on-chain block of the electronic document is generated simultaneously during the upload. The on-chain block includes immutable asset information and variable metadata information, and the variable metadata information includes document status information; After generating the anti-counterfeiting summary, the composite machine node prints and outputs the electronic document and the anti-counterfeiting summary as a paper document and generates a new on-chain block as a subsequent transaction block of the original on-chain block, and adds the anti-counterfeiting summary to the variable metadata information of the subsequent transaction block, and updates the document status information to printed; The composite machine node on the blockchain network scans the paper document, uploads the scanned image to the distributed file system of the blockchain network for initial version registration, and updates the document status information to initial version registration to generate a new on-chain block; The composite machine node on the blockchain network scans the paper document signed by the user, uploads the scanned image to the distributed file system of the blockchain network for final version registration, and updates the document status information to final version registration to generate a new on-chain block.
2. The document processing method according to claim 1, characterized in that, The types of the anti-counterfeiting verification area include: An anti-counterfeiting verification text area that can be recognized as text content through OCR; An anti-counterfeiting verification static image area with printed content being an inherent graphic or image; and An anti-counterfeiting verification dynamic image area for the user to fill in or sign.
3. The document processing method according to claim 2, characterized in that, The step of recommending an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate the anti-counterfeiting summary of the electronic document includes: The composite machine node recommends multiple anti-counterfeiting verification areas on the electronic document according to the content of the electronic document and the print parameters in the print request. The multiple anti-counterfeiting verification areas partially or completely overlap. The verification priority order of the multiple anti-counterfeiting verification areas is specified by the user, and the size and quantity of the multiple anti-counterfeiting verification areas are adjusted by the user.
4. The document processing method according to claim 1, characterized in that, The anti-counterfeiting summary generated during printing output includes the ID of the on-chain block of the electronic document, the area summary value and area location information of the anti-counterfeiting verification area adjusted and selected by the user.
5. The document processing method according to claim 1, characterized in that, The document processing method also includes: the multifunction machine node on the blockchain network scans the paper document to be authenticated and uploads the scanned image to the distributed file system, initiates a traceability and authentication request to the consensus node in the blockchain network, the consensus node authenticates the paper document to be authenticated, and feeds back the authentication and traceability results based on the consensus mechanism.
6. The document processing method according to claim 5, It is characterized in that The traceability and authentication request includes the address of the scanned image of the paper document to be authenticated in the distributed file system, and the consensus node authenticates the paper document to be authenticated, including: The consensus node obtains a scanned image of the paper document to be authenticated according to the address, parses the anti-counterfeiting summary of the paper document to be authenticated to obtain a summary value of the paper document to be authenticated and a summary value in the blockchain of the corresponding electronic document, and compares the two summary values for authentication.
7. The document processing method according to claim 6, It is characterized in that The summary value includes an anti-counterfeiting verification text summary value, the anti-counterfeiting verification text summary value of the paper document to be authenticated includes a first summary value and a second summary value, the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document is a third summary value, the anti-counterfeiting summary of the paper document to be authenticated includes a regional summary value, regional location information, and an ID of a block on the chain of the corresponding electronic document of the anti-counterfeiting verification text region of the paper document to be authenticated, and the authentication by comparing the two summary values includes: Obtain anti-counterfeiting text content from the scanned image of the paper document to be authenticated by using OCR according to the area location information, obtain the first summary value according to the anti-counterfeiting text content, the area summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is the second summary value, and according to the ID of the on-chain block of the corresponding electronic document, access is made to the on-chain block after the final version registration of the corresponding electronic document to obtain the area summary value after the final version registration, the area summary value after the final version registration is the third summary value, and if the first summary value, the second summary value and the third summary value are the same, the text area of the paper document to be authenticated has not been tampered with after printing.
8. The document processing method according to claim 6, It is characterized in that The summary value also includes an anti-counterfeiting verification static image summary value, the anti-counterfeiting verification static image summary value of the paper document to be authenticated includes a fourth summary value and a fifth summary value, the anti-counterfeiting verification static image summary value in the blockchain of the corresponding electronic document is a sixth summary value, the anti-counterfeiting summary of the paper document to be authenticated includes a regional summary value of the anti-counterfeiting verification static image area of the paper document to be authenticated, regional location information, and an ID of the on-chain block of the corresponding electronic document, and the authentication by comparing the two summary values also includes: The fourth summary value is obtained from the scanned image of the paper document to be authenticated by using a perceptual hash algorithm according to the area location information; the area summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is the fifth summary value; the on-chain block of the corresponding electronic document after final version registration is accessed retroactively according to the ID of the on-chain block of the corresponding electronic document to obtain the area summary value after the final version registration; the area summary value after the final version registration is the sixth summary value; the Hamming distance between the fourth summary value, the fifth summary value and the sixth summary value is calculated; if the Hamming distance between the three is less than a preset threshold, the static image area of the paper document to be authenticated has not been tampered with after printing.
9. The document processing method according to claim 6, It is characterized in that The summary value also includes an anti-counterfeiting verification dynamic image summary value, the anti-counterfeiting verification dynamic image summary value of the paper document to be authenticated is a seventh summary value, and the anti-counterfeiting verification dynamic image summary value in the blockchain of the corresponding electronic document is an eighth summary value, the anti-counterfeiting summary of the paper document to be authenticated includes the regional location information of the anti-counterfeiting verification dynamic image area of the paper document to be authenticated and the ID of the on-chain block of the corresponding electronic document, and the authentication by comparing the two summary values includes: The seventh digest value is obtained from the scanned image of the paper document to be authenticated by using a perceptual hash algorithm according to the area location information, and the on-chain block of the corresponding electronic document after final version registration is retroactively accessed according to the ID of the on-chain block of the corresponding electronic document to obtain the regional digest value after the final version registration, the regional digest value after the final version registration is the eighth digest value, and the Hamming distance between the seventh digest value and the eighth digest value is calculated. If the Hamming distance is less than a preset threshold, the dynamic image area of the paper document to be authenticated has not been tampered with.
10. The document processing method according to claim 1, It is characterized in that The electronic document is uploaded to the distributed file system in the blockchain network after consensus among the users. The identity of the user in the blockchain network is identified by an asymmetric key pair of public key and private key, and the ownership of the electronic document is identified by the public key of the user; The transfer of ownership of the electronic document must be confirmed by the user, and the new user uses the private key to sign the document summary value to generate a new on-chain block.
11. The document processing method according to claim 1, It is characterized in that The identity of the user in the blockchain network is identified by an asymmetric key pair of a public key and a private key, and the printing and outputting of the electronic document and the anti-counterfeiting summary as a paper document and generating a new on-chain block includes: The multifunction machine node verifies the legitimacy of the print request, wherein the print request includes the ID of the on-chain block of the electronic document, the original print request text consisting of print parameters, and the digital signature generated by the user who initiated the print request using the private key on the original print request text; The variable metadata in the newly generated on-chain block includes the anti-counterfeiting summary, and the MFP node publishes the document image containing the anti-counterfeiting summary to the distributed file system of the blockchain network.
12. The document processing method according to claim 1, wherein, the initial version registration further includes: the MFP node performing the initial version registration initiates a consensus verification request; the consensus nodes in the blockchain network verify by parsing the anti-counterfeiting summary from the document image uploaded to the distributed file system during the initial version registration, and generate a new on-chain block after successful verification; the variable metadata in the newly generated on-chain block includes the address of the document image of the initial version registration in the distributed file system.
13. The document processing method according to claim 1, wherein, the final version registration further includes: after the MFP node performing the final version registration scans the paper document with the associated user signature, it initiates a consensus verification request; the consensus nodes in the blockchain network verify by parsing the anti-counterfeiting summary from the document image uploaded to the distributed file system during the final version registration, and generate a new on-chain block after successful verification; the variable metadata in the newly generated on-chain block includes the address of the document image of the final version registration in the distributed file system and the newly added anti-counterfeiting summary information, and the newly added anti-counterfeiting summary information includes the region summary value of the additional anti-counterfeiting verification dynamic image area.
14. A blockchain-based document processing device, comprising: a memory; and a processor coupled to the memory, the processor being configured to: receive a print request for an electronic document initiated by a user, recommend an anti-counterfeiting verification area on the electronic document for the user to adjust the anti-counterfeiting verification area and select the attributes of the anti-counterfeiting summary to generate the anti-counterfeiting summary of the electronic document, the electronic document being uploaded by the user to the blockchain network, and a on-chain block of the electronic document is generated simultaneously during the upload, the on-chain block including immutable asset information and variable metadata information, and the variable metadata information includes document status information; after generating the anti-counterfeiting summary, print and output the electronic document and the anti-counterfeiting summary as a paper document and generate a new on-chain block as a subsequent transaction block of the original on-chain block, and add the anti-counterfeiting summary to the variable metadata information of the subsequent transaction block, and update the document status information to printed; scan the paper document, upload the scanned image to the distributed file system of the blockchain network for initial version registration, and update the document status information to initial version registration to generate a new on-chain block; scan the paper document with the user signature, upload the scanned image to the distributed file system of the blockchain network for final version registration, and update the document status information to final version registration to generate a new on-chain block.
15. The document processing device according to claim 14, wherein, the types of the anti-counterfeiting verification area include: an anti-counterfeiting verification text area that can be recognized as text content by OCR; an anti-counterfeiting verification static image area with printed content being an inherent graphic or image; and An anti-counterfeiting verification dynamic image area for users to fill in or affix their signatures.
16. The document processing device according to claim 15, wherein, the processor is further configured to: Recommend multiple anti-counterfeiting verification areas on the electronic document according to the content of the electronic document and the printing parameters in the printing request, the multiple anti-counterfeiting verification areas partially or completely overlap, the verification priority order of the multiple anti-counterfeiting verification areas is specified by the user, and the size and quantity of the multiple anti-counterfeiting verification areas are adjusted by the user.
17. The document processing device according to claim 14, wherein, the anti-counterfeiting summary generated during print output includes the ID of the on-chain block of the electronic document, the area summary value and area location information of the anti-counterfeiting verification area selected and adjusted by the user.
18. The document processing device according to claim 14, wherein, the processor is further configured to: Scan the paper document to be authenticated and upload the scanned image to the distributed file system, initiate a traceability and authentication request to the consensus nodes in the blockchain network, and the consensus nodes authenticate the paper document to be authenticated and feedback the authentication and traceability results based on the consensus mechanism.
19. The document processing device according to claim 18, wherein, the traceability and authentication request includes the address of the scanned image of the paper document to be authenticated in the distributed file system, and the processor is further configured to: Obtain the scanned image of the paper document to be authenticated according to the address via the consensus node, parse the anti-counterfeiting summary of the paper document to be authenticated to obtain the summary value of the paper document to be authenticated and the summary value in the blockchain of the corresponding electronic document, and compare the two summary values for authentication.
20. The document processing device according to claim 19, wherein, the summary value includes an anti-counterfeiting verification text summary value, the anti-counterfeiting verification text summary value of the paper document to be authenticated includes a first summary value and a second summary value, the anti-counterfeiting verification text summary value in the blockchain of the corresponding electronic document is a third summary value, the anti-counterfeiting summary of the paper document to be authenticated contains the area summary value, area location information of the anti-counterfeiting verification text area of the paper document to be authenticated and the ID of the on-chain block of the corresponding electronic document, and the processor is further configured to: Obtain the anti-counterfeiting text content from the scanned image of the paper document to be authenticated using OCR according to the area location information, obtain the first summary value according to the anti-counterfeiting text content, the area summary value directly recorded in the anti-counterfeiting summary of the paper document to be authenticated is the second summary value, trace and access the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the area summary value after final registration, the area summary value after final registration is the third summary value, and if the first summary value, the second summary value and the third summary value are the same, the text area of the paper document to be authenticated has not been tampered with after printing.
21. The document processing device according to claim 19, wherein, The abstract value further includes an anti-counterfeiting verification static image abstract value. The anti-counterfeiting verification static image abstract value of the paper document to be authenticated includes a fourth abstract value and a fifth abstract value. The anti-counterfeiting verification static image abstract value in the blockchain of the corresponding electronic document is a sixth abstract value. The anti-counterfeiting abstract of the paper document to be authenticated contains the regional abstract value, regional location information of the anti-counterfeiting verification static image area of the paper document to be authenticated, and the ID of the on-chain block of the corresponding electronic document. The processor is further configured to: Obtain the fourth abstract value from the scanned image of the paper document to be authenticated using the perceptual hashing algorithm according to the regional location information. The regional abstract value directly recorded in the anti-counterfeiting abstract of the paper document to be authenticated is the fifth abstract value. Trace and access the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional abstract value after final registration. The regional abstract value after final registration is the sixth abstract value. Calculate the Hamming distance among the fourth abstract value, the fifth abstract value, and the sixth abstract value. If the Hamming distance among the three is less than a preset threshold, the static image area of the paper document to be authenticated has not been tampered with after printing.
22. The document processing device according to claim 19, wherein, The abstract value further includes an anti-counterfeiting verification dynamic image abstract value. The anti-counterfeiting verification dynamic image abstract value of the paper document to be authenticated is a seventh abstract value. The anti-counterfeiting verification dynamic image abstract value in the blockchain of the corresponding electronic document is an eighth abstract value. The anti-counterfeiting abstract of the paper document to be authenticated contains the regional location information of the anti-counterfeiting verification dynamic image area of the paper document to be authenticated and the ID of the on-chain block of the corresponding electronic document. The processor is further configured to: Obtain the seventh abstract value from the scanned image of the paper document to be authenticated using the perceptual hashing algorithm according to the regional location information. Trace and access the on-chain block after final registration of the corresponding electronic document according to the ID of the on-chain block of the corresponding electronic document to obtain the regional abstract value after final registration. The regional abstract value after final registration is the eighth abstract value. Calculate the Hamming distance between the seventh abstract value and the eighth abstract value. If the Hamming distance is less than a preset threshold, the dynamic image area of the paper document to be authenticated has not been tampered with.
23. The document processing device according to claim 14, wherein, The electronic document is uploaded to the distributed file system in the blockchain network after user consensus. The identity of the user in the blockchain network is identified by an asymmetric key pair of a public key and a private key. The ownership of the electronic document is identified by the public key of the user; The transfer of the ownership of the electronic document needs to be confirmed by the user, and then the new user signs the document abstract value with the private key to generate a new on-chain block to achieve it.
24. The document processing device according to claim 14, wherein, The identity of the user in the blockchain network is identified by a pair of asymmetric keys, i.e., a public key and a private key. The processor is further configured to: Verify the legitimacy of the printing request, where the printing request includes the ID of the on-chain block of the electronic document, the original printing request composed of printing parameters, and the digital signature generated by the user who initiates the printing request using the private key for the original printing request. The anti-counterfeiting summary is included in the variable metadata of the newly generated on-chain block, and the document image containing the anti-counterfeiting summary is published to the distributed file system of the blockchain network.
25. The document processing device according to claim 14, wherein, The processor is further configured to: Initiate a consensus verification request after the first edition registration scan; The consensus nodes in the blockchain network verify according to the anti-counterfeiting summary parsed from the document image uploaded to the distributed file system during the first edition registration. After passing the verification, a new on-chain block is generated. The address of the document image of the first edition registration in the distributed file system is included in the variable metadata of the newly generated on-chain block.
26. The document processing device according to claim 14, wherein, The processor is further configured to: Initiate a consensus verification request after scanning the paper document associated with the user's signature; The consensus nodes in the blockchain network verify according to the anti-counterfeiting summary parsed from the document image uploaded to the distributed file system during the final edition registration. After passing the verification, a new on-chain block is generated. The address of the document image of the final edition registration in the distributed file system and the newly added anti-counterfeiting summary information are included in the variable metadata of the newly generated on-chain block. The newly added anti-counterfeiting summary information includes the regional summary value of the additional anti-counterfeiting verification dynamic image area.
27. A computer-readable medium, on which a computer program is stored, wherein, The computer program, when executed by a processor, implements the steps of the document processing method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Block chain based printer and realization method
CN105912283A
Contract management system and method based on block chain technology
CN110532238A