Contract signing methods, apparatus, equipment and computer-readable storage media
By determining the user's permission type for decrypting and signing smart contract files, the problem of frequent switching between downloading and uploading in the smart contract processing flow is solved, improving processing efficiency and ensuring security and authenticity.
Patent Information
- Application Number
- CN202010370030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2040-04-30
AI Technical Summary
The existing smart contract processing flow suffers from frequent issues of downloading, signing, and uploading for conversion, which affects processing efficiency and poses a risk of forgery.
By obtaining the contract documents and determining the user account's operation permission type, the contract documents are decrypted to generate the corresponding decrypted file, and then signed after verification, ensuring that the signing is done at the designated signing node and avoiding frequent downloads and uploads.
It improves the security and efficiency of contract document processing, avoids the risk of forgery, and ensures the authenticity and integrity of signatures.
Smart Images

Figure CN111581653B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and computer-readable storage medium for signing contracts. Background Technology
[0002] Currently, smart contracts are suitable for integrated processes of contract drafting, review, and stamping across various companies. From drafting contract templates to filling them out, the review process, soliciting reviewers, and receiving feedback, all functions can be completed through smart contracts. This reduces the amount of manual work required at each stage of contract management, drafting, review, and completion, and improves processing efficiency at each stage. Therefore, smart contracts have been widely adopted.
[0003] While smart contracts are widely used, they suffer from numerous conversions between the physical and electronic versions—from downloading and signing to uploading the electronic version—which impacts processing efficiency. Furthermore, external factors such as personnel being away on business and unable to print documents can further degrade efficiency; additionally, downloaded signatures are susceptible to forgery. Therefore, the risks and efficiency issues inherent in current smart contract processing workflows are urgent technical problems that need to be addressed. Summary of the Invention
[0004] The main objective of this invention is to provide a contract signing method, apparatus, device, and computer-readable storage medium, aiming to solve the technical problems of risk and processing efficiency in the existing smart contract processing flow.
[0005] To achieve the above objectives, embodiments of the present invention provide a contract signing method, which includes the following steps:
[0006] Obtain the contract document, and when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request;
[0007] The contract document is decrypted to generate a decrypted file corresponding to the operation permission type, and the decrypted file is verified.
[0008] After the decrypted file is verified, it is signed and sealed. After all the signing process nodes corresponding to the contract document are signed and sealed, the signing of the contract document is completed.
[0009] Preferably, the step of decrypting the contract document to generate a decrypted file corresponding to the operation permission type includes:
[0010] The contract document is decrypted, and the decrypted contract document is converted according to the operation permission type;
[0011] If the operation permission type is edit type, the decrypted contract file will be converted into an editable contract text, and the editable contract text will be used as the decrypted file.
[0012] If the operation permission type is a signature type, then determine whether the signature permission corresponding to the signature type is a full permission. If it is a full permission, then convert the decrypted contract document into a contract text that supports signature, and use the contract text that supports signature as the decrypted file.
[0013] If the signing permission is not full permission, then determine whether the signing permission supports signing the contract document. If it supports signing the contract document, then convert the decrypted contract document into a contract text that supports signing, and use the contract text that supports signing as the decrypted file.
[0014] If the signing permission does not support signing the contract document, the decrypted contract document will be displayed in a preset format.
[0015] Preferably, the step of verifying the decrypted file includes:
[0016] If the operation permission type is edit type, then extract the text information and the first signed information from the decrypted file, display the text information, and when receiving modification information based on the displayed text information, modify the text information according to the modification information;
[0017] Locate the first reference signature corresponding to the first signed information, and verify the first signed information based on the first reference signature;
[0018] If the operation permission type is a signature type, then the second signed information in the decrypted file is extracted, and the second reference signature corresponding to the second signed information is found. The second signed information is then verified based on the second reference signature.
[0019] Preferably, the step of signing the decrypted file after successful verification includes:
[0020] After the decrypted file is verified, the decrypted file is displayed, and when an electronic signature is obtained based on the displayed decrypted file, it is determined whether the position of the electronic signature in the decrypted file is a signature position.
[0021] If the location is a signature location, then it is determined whether the signature font of the electronic signature is recognizable. If it is recognizable, then the electronic signature and the decrypted file are converted into a signature contract document in a preset format, so as to sign the decrypted file.
[0022] Preferably, the step of signing the decrypted file after successful verification includes:
[0023] After the decrypted file is verified, the signature image corresponding to the user account is read, and the signature image and the decrypted file are combined.
[0024] The image of the signature is processed at the splicing position in the decrypted file, and the image-processed decrypted file is converted into a signature contract document in a preset format for signing the decrypted file.
[0025] Preferably, the step of signing the decrypted file after verifying its authenticity includes:
[0026] Based on the file type of the contract document, determine whether there are any unsigned signing process nodes after the current signing process node that signs the decrypted file.
[0027] If there are any signing process nodes that have not yet been signed, then according to the file type, find the encryption rules for the signed contract document, and encrypt the signed contract document according to the encryption rules;
[0028] The encrypted signed contract document is transmitted as a new contract document to the signing process nodes that have not yet been signed, so that the signing process nodes that have not yet been signed can perform the step of obtaining the contract document, until all signing process nodes corresponding to the contract document have signed it.
[0029] Preferably, the step of determining the operation permission type of the user account corresponding to the decryption request includes:
[0030] Read the process node identifier carried by the user account, and determine whether the user account has the decryption permission to the contract document based on the process node identifier.
[0031] If the user has decryption permission for the contract document, the operation permission type corresponding to the user account is determined according to the preset account and operation permission correspondence table.
[0032] To achieve the above objectives, the present invention also provides a contract signing device, the contract signing device comprising:
[0033] The determination module is used to obtain the contract document and, when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request;
[0034] The generation module is used to decrypt the contract document, generate a decrypted file corresponding to the operation permission type, and verify the decrypted file;
[0035] The signing module is used to sign the decrypted file after the decrypted file has been verified, and to complete the signing of the contract document after signing all the signing process nodes corresponding to the contract document.
[0036] Furthermore, to achieve the above objectives, the present invention also provides a contract signing device, which includes a memory, a processor, and a contract signing program stored in the memory and executable on the processor. When the contract signing program is executed by the processor, it implements the steps of the contract signing method described above.
[0037] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a contract signing program, which, when executed by a processor, implements the steps of the contract signing method described above.
[0038] This invention provides a contract signing method, apparatus, device, and computer-readable storage medium. Upon obtaining a contract document and receiving a decryption request, the method first determines the operation permission type of the user account sending the decryption request, then decrypts the contract document, generating a decrypted file corresponding to the operation permission type, and verifies the decrypted file. After successful verification, the decrypted file is signed, and signatures are obtained at all required signing nodes in the contract document signing process, thus completing the contract signing. This invention sets different operation permission types for different user accounts. By decrypting the contract document and generating a decrypted file corresponding to the operation permission type for verification, it ensures the security of the contract document from aspects such as password, operation permission type, and verification, avoiding the risk of forgery. Simultaneously, setting the signing nodes of the contract document as signing process nodes avoids frequent downloading and uploading of the contract document, ensuring processing efficiency. Furthermore, because each signing process node is decrypted one by one, generating a decrypted file corresponding to the operation permission type of each node for verification, it ensures both processing efficiency and overall security of the processing flow. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the hardware operating environment of the contract signing device involved in the embodiments of the present invention;
[0040] Figure 2 This is a flowchart illustrating the first embodiment of the contract signing method of the present invention;
[0041] Figure 3This is a schematic diagram of the functional modules of a preferred embodiment of the contract signing device of the present invention.
[0042] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0043] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] like Figure 1 As shown, Figure 1 This is a schematic diagram of the hardware operating environment of the contract signing device involved in the embodiments of the present invention.
[0045] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0046] The contract signing device in this embodiment of the invention can be a PC, or a mobile terminal device such as a tablet computer or a portable computer.
[0047] like Figure 1 As shown, the contract signing device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The structure of the contract signing device shown does not constitute a limitation on the contract signing device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0049] like Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a detection program.
[0050] exist Figure 1 In the device shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client (user terminal) and communicate data with it; while processor 1001 can be used to call the detection program stored in memory 1005 and perform the following operations:
[0051] Obtain the contract document, and when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request;
[0052] The contract document is decrypted to generate a decrypted file corresponding to the operation permission type, and the decrypted file is verified.
[0053] After the decrypted file is verified, it is signed and sealed. After all the signing process nodes corresponding to the contract document are signed and sealed, the signing of the contract document is completed.
[0054] Furthermore, the step of decrypting the contract document to generate a decrypted file corresponding to the operation permission type includes:
[0055] The contract document is decrypted, and the decrypted contract document is converted according to the operation permission type;
[0056] If the operation permission type is edit type, the decrypted contract file will be converted into an editable contract text, and the editable contract text will be used as the decrypted file.
[0057] If the operation permission type is a signature type, then determine whether the signature permission corresponding to the signature type is a full permission. If it is a full permission, then convert the decrypted contract document into a contract text that supports signature, and use the contract text that supports signature as the decrypted file.
[0058] If the signing permission is not full permission, then determine whether the signing permission supports signing the contract document. If it supports signing the contract document, then convert the decrypted contract document into a contract text that supports signing, and use the contract text that supports signing as the decrypted file.
[0059] If the signing permission does not support signing the contract document, the decrypted contract document will be displayed in a preset format.
[0060] Furthermore, the step of verifying the decrypted file includes:
[0061] If the operation permission type is edit type, then extract the text information and the first signed information from the decrypted file, display the text information, and when receiving modification information based on the displayed text information, modify the text information according to the modification information;
[0062] Locate the first reference signature corresponding to the first signed information, and verify the first signed information based on the first reference signature;
[0063] If the operation permission type is a signature type, then the second signed information in the decrypted file is extracted, and the second reference signature corresponding to the second signed information is found. The second signed information is then verified based on the second reference signature.
[0064] Furthermore, the step of signing the decrypted file after successful verification includes:
[0065] After the decrypted file is verified, the decrypted file is displayed, and when an electronic signature is obtained based on the displayed decrypted file, it is determined whether the position of the electronic signature in the decrypted file is a signature position.
[0066] If the location is a signature location, then it is determined whether the signature font of the electronic signature is recognizable. If it is recognizable, then the electronic signature and the decrypted file are converted into a signature contract document in a preset format, so as to sign the decrypted file.
[0067] Furthermore, the step of signing the decrypted file after successful verification includes:
[0068] After the decrypted file is verified, the signature image corresponding to the user account is read, and the signature image and the decrypted file are combined.
[0069] The image of the signature is processed at the splicing position in the decrypted file, and the image-processed decrypted file is converted into a signature contract document in a preset format for signing the decrypted file.
[0070] Furthermore, after the step of signing the decrypted file after verifying its authenticity, the processor 1001 can call the detection program stored in the memory 1005 and perform the following operations:
[0071] Based on the file type of the contract document, determine whether there are any unsigned signing process nodes after the current signing process node that signs the decrypted file.
[0072] If there are any signing process nodes that have not yet been signed, then according to the file type, find the encryption rules for the signed contract document, and encrypt the signed contract document according to the encryption rules;
[0073] The encrypted signed contract document is transmitted as a new contract document to the signing process nodes that have not yet been signed, so that the signing process nodes that have not yet been signed can perform the step of obtaining the contract document, until all signing process nodes corresponding to the contract document have signed it.
[0074] Furthermore, the step of determining the operation permission type of the user account corresponding to the decryption request includes:
[0075] Read the process node identifier carried by the user account, and determine whether the user account has the decryption permission to the contract document based on the process node identifier.
[0076] If the user has decryption permission for the contract document, the operation permission type corresponding to the user account is determined according to the preset account and operation permission correspondence table.
[0077] The specific implementation of the contract signing device of the present invention is basically the same as the various embodiments of the contract signing method described below, and will not be repeated here.
[0078] To better understand the above technical solutions, exemplary embodiments of this disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.
[0079] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0080] Reference Figure 2 The first embodiment of the present invention provides a flowchart of a contract signing method. In this embodiment, the contract signing method includes the following steps:
[0081] Step S10: Obtain the contract document, and when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request;
[0082] The contract signing method in this embodiment is applied to a server, suitable for the server to sign contract documents. Here, "signature" refers to an electronic signature, similar to a digital certificate, used as a means of identity verification. It broadly refers to anything existing in electronic form, attached to and logically linked to an electronic document, used to identify the signatory, ensure document integrity, and indicate the signatory's agreement to the facts stated in the electronic document. Generally, the recognition of electronic signatures is from a technical perspective. It mainly refers to the security measures used to identify the parties involved and ensure that transaction data is not tampered with, through specific technical solutions. An electronic signature is a form of electronic signature, using image processing technology to transform the electronic signature operation into a visual effect similar to stamping a paper document, while simultaneously using electronic signature technology to ensure the authenticity and integrity of electronic information and the non-repudiation of the signatory.
[0083] Understandably, contract documents typically involve multiple signing stages, and the signing stages differ depending on the type of contract. For example, the signing stages for an employment contract and a procurement contract will inevitably differ. Furthermore, even for the same type of contract document, different signing stages may exist due to variations in the contract content; for instance, the signing stages for a procurement contract with a purchase price of 1 million may differ from those for a procurement contract with a purchase price of 50 million. This embodiment pre-defines the signing stages of various contract documents as signing process nodes, with one signing stage corresponding to one signing process node. The relevant personnel at each signing stage log in using user accounts on terminals such as computers, laptops, and smartphones to access the server and sign the contract documents.
[0084] Furthermore, at the initial stage of the signing process, the contract drafter inputs the draft contract document through the terminal display interface, setting the contract document type and each signing process node requiring signing. The terminal locally searches for the corresponding encryption method based on a pre-set lookup table of contract types and encryption methods, and encrypts the contract document using that method. The encryption method can be either symmetric or asymmetric. The terminal then converts the encrypted contract document into a preset format and transmits it along with the set codes representing the signing process nodes to the server. The server then processes the contract document for signing step-by-step based on these codes. The preferred preset format is PDF (Portable Document Format), which is non-editable and, combined with encrypted transmission, prevents malicious copying or interception of the contract document during transmission.
[0085] Furthermore, upon receiving the contract document, the server determines the next signing process node based on its embedded code and outputs a prompt message to the user accounts of those involved in the next signing process node, reminding them to process the contract document promptly. After viewing the prompt message, the relevant personnel submit a decryption request based on their user account, requesting the decryption and display of the contract document. Upon receiving this decryption request, the server reads the account information corresponding to the request, i.e., the user account information, to determine the user account's operation permission type, i.e., the types of operations that the relevant personnel can perform. Specifically, the steps for determining the operation permission type of the user account corresponding to the decryption request include:
[0086] Step S11: Read the process node identifier carried by the user account, and determine whether the user account has the decryption permission to the contract document based on the process node identifier.
[0087] Understandably, any operation on contract documents by relevant personnel is predicated on their ability to decrypt encrypted contract documents. Before determining the user account's operation permission type through account information, it is first determined whether the user account has decryption permission. Decryption permission is determined through the process node identifier in the account information. The process node identifier carried in the account information is read as the process node identifier carried by the user account, and it is determined whether the process node identifier is an authorized identifier. If it is an authorized identifier, it indicates that the user account has the authority to handle transactions at that process node, and therefore has decryption permission. If it is not an authorized identifier, it is determined that the relevant personnel are not the personnel handling that process node, and the user account does not have the authority to decrypt and view the contract documents.
[0088] Step S12: If the user has the permission to decrypt the contract document, then determine the type of operation permission corresponding to the user account according to the preset account and operation permission correspondence table.
[0089] Furthermore, if it is determined that a user account has decryption privileges, the user account's operation permission type is then determined. The operation permissions of each account are pre-defined into a corresponding relational table. This table is then traversed to determine the operation permission type that the account information possesses within the corresponding relational table. The operation permission types include editing permissions, partial signing permissions, and full signing permissions, etc.
[0090] Step S20: Decrypt the contract document to generate a decrypted file corresponding to the operation permission type, and verify the decrypted file;
[0091] Furthermore, after determining the user account's access permission type, the contract document can be decrypted based on that permission type. Different access permission types result in different file types after decryption. Essentially, this process involves first decrypting the contract document using the encryption method corresponding to the contract document, and then converting the decrypted contract document according to the access permission type to obtain a decrypted file corresponding to that type. The decrypted file is then verified. For the first signing process node after the contract document is uploaded to the server, the verification checks whether the user account that uploaded the contract document has the permission to draft and upload it. For subsequent signing process nodes, the verification checks whether the signature from the previous signing process node is genuine.
[0092] Step S30: After the decrypted file is verified, the decrypted file is signed and sealed. After all the signing process nodes corresponding to the contract document are signed and sealed, the signing of the contract document is completed.
[0093] Furthermore, after the decrypted file is verified, if the current signing process node is the first node processing the contract document, the user account uploading the contract document is verified to have the authority to draft and upload the contract document; if the current signing process node is not the first node processing the contract document, the signature of the previous signing process node is verified as a genuine signature. Then, the decrypted file is signed, the signature of the current signing process node is added to the decrypted file, and it is determined whether all signing process nodes corresponding to the contract document have been signed. If all have been signed, the contract document signing process is complete. If there are signing process nodes that have not yet been signed, the signed decrypted file is encrypted and transmitted to the next signing process node according to the set process order, continuing the signing process in the above manner until all signing process nodes have been signed, thus completing the contract document signing process.
[0094] The contract signing method in this embodiment, upon obtaining the contract document and receiving a decryption request, first determines the operation permission type of the user account sending the decryption request, then decrypts the contract document, generates a decrypted file corresponding to the operation permission type, and verifies the decrypted file. After the decrypted file is verified, it is signed, and after signing all required signing nodes in the contract document, the contract signing is completed. This invention sets different operation permission types for different user accounts, and by decrypting the contract document and generating a decrypted file corresponding to the operation permission type for verification, it ensures the security of the contract document from aspects such as password, operation permission type, and verification, avoiding the risk of forgery. Simultaneously, setting the nodes requiring signing as signing nodes in the signing process avoids frequent downloading and uploading of the contract document, ensuring processing efficiency. Furthermore, because each signing process node is decrypted one by one, generating a decrypted file corresponding to the operation permission type of each node for verification, it ensures both processing efficiency and the security of the entire processing flow.
[0095] Furthermore, based on the first embodiment of the contract signing method of the present invention, a second embodiment of the contract signing method of the present invention is proposed. In the second embodiment, the step of decrypting the contract document and generating a decrypted file corresponding to the operation permission type includes:
[0096] Step S21: Decrypt the contract file and convert the decrypted contract file according to the operation permission type;
[0097] Furthermore, this implementation, after decrypting the contract document according to the encryption method corresponding to the contract document, converts the decrypted contract document based on whether the operation permission type is editing or signing. Editing type means that the user account at the current signing process node can edit the contract document and then sign it; signing type means that the user account at the current signing process node can only sign the contract document. It should be noted that, in addition to determining the operation permission type through a pre-defined mapping table of operation permissions for each account, this embodiment can also distinguish them by setting different permission identifiers in the user account. If the permission identifier is an editing identifier, it indicates that the operation permission type is editing; if the permission identifier is a signing identifier, it indicates that the operation permission type is signing.
[0098] Step S22: If the operation permission type is edit type, the decrypted contract file is converted into an editable contract text, and the editable contract text is used as the decrypted file.
[0099] Furthermore, if the operation permission type is determined to be editable based on the corresponding relationship table or permission identifier, the decrypted contract text is converted into editable contract text. The text in the decrypted contract file, which exists in a preset format, is identified and added to an editable document or an editable text box to obtain editable contract text. This editable contract text is then used as the decrypted file corresponding to the operation permission type for editing and signing.
[0100] Step S23: If the operation permission type is a signature type, then determine whether the signature permission corresponding to the signature type is a complete permission. If it is a complete permission, then convert the decrypted contract document into a contract text that supports signature, and use the contract text that supports signature as the decrypted file.
[0101] Furthermore, if the operation permission type is determined to be a signature type based on the corresponding relationship table or permission identifier, then it is further determined whether the signature permission corresponding to this signature permission type is a complete permission. Complete permission indicates that the user account at the signature process node has the authority to perform all signatures, corresponding to the operation permission type. Another signature type is partial permission, meaning the user account only has the authority to perform partial signatures. Complete and partial permissions are determined by different permission sub-identifiers. If the permission sub-identifier determines that the signature permission corresponding to the signature type is a complete permission, then the decrypted contract document is converted into a contract text that supports signatures. The contract text that supports signatures exists in image form. This contract text that supports signatures is used as the decrypted file corresponding to the operation permission type, obtained after decryption, for subsequent signing.
[0102] Step S24: If the signing permission is not a complete permission, determine whether the signing permission supports signing the contract document. If it supports signing the contract document, convert the decrypted contract document into a contract text that supports signing, and use the contract text that supports signing as the decrypted file.
[0103] Furthermore, if the permission sub-identifier determines that the signing permission corresponding to the signing type is not complete permission, meaning the user account only has partial signing permission, then it is determined whether this partial signing permission supports signing the contract document at the current signing process node. If it does, the decrypted contract document is converted into a contract text that supports signing. This contract text that supports signing also exists in image form, and is also used as the decrypted file corresponding to the operation permission type for subsequent signing.
[0104] Step S25: If the signing permission does not support signing the contract document, the decrypted contract document will be displayed in a preset format.
[0105] Furthermore, if it is determined that some signing permissions do not support signing the contract document at the current signing process node, the decrypted contract document will be displayed in a preset format, namely, in PDF format, for relevant personnel at the current signing process node to view.
[0106] Furthermore, for operation permission types of edit and signature, the decrypted file is verified after it is obtained. Specifically, the steps for verifying the decrypted file include:
[0107] Step S26: If the operation permission type is edit type, extract the text information and the first signed information from the decrypted file, display the text information, and when receiving modification information based on the displayed text information, modify the text information according to the modification information.
[0108] Furthermore, this implementation verifies the authenticity of the decrypted file by verifying the authenticity of the signatures at nodes other than the first in the signing process. Specifically, it verifies whether the signature added by the previous signing node in the decrypted file is a genuine signature. For cases where the operation permission type is editable, the text information and the first signed information are extracted from the decrypted file. The text information is the text contained in the decrypted file, and the first signed information is the signature added by the previous signing node. The extracted text information is displayed so that relevant users can modify it based on their user accounts. The modification information is sent to the server. Upon receiving the modification information, the server modifies the text information accordingly and displays the modified text. If the modified text information meets the user's needs, the user can input a command to complete the modification. After receiving the modification command, the server saves the modified text information as part of the new decrypted file.
[0109] Step S27: Locate the first reference seal corresponding to the first signed information, and verify the first signed information based on the first reference seal.
[0110] Furthermore, corresponding reference seals representing the authenticity are pre-set for different signing process nodes. After extracting the first signed information from the decrypted file, the reference seal corresponding to the previous signing process node is searched and used as the first reference seal corresponding to the first signed information. The first reference seal and the first signed information are compared to verify the first signed information, i.e., to verify whether the first signed information is a genuine seal. If the similarity between the first reference seal and the first signed information is greater than a preset threshold, the verification is considered successful, and subsequent signing operations continue; if the similarity between the first reference seal and the first signed information is not greater than the preset threshold, the verification is considered unsuccessful, and the signing process is returned.
[0111] Step S28: If the operation permission type is a signature type, then extract the second signed information from the decrypted file, find the second reference signature corresponding to the second signed information, and verify the second signed information based on the second reference signature.
[0112] Furthermore, for cases where the operation permission type is a signature, only the second signed information in the decrypted file is extracted. This second signed information is the signature added in the previous signature process node. Similarly, the reference signature corresponding to the previous signature process node is found and used as the second reference signature corresponding to the second signed information. The second reference signature and the second signed information are compared to verify the second signed information, i.e., to verify whether the second signed information is a genuine signature. If the similarity between the second reference signature and the second signed information is greater than a preset threshold, the verification is considered successful, and subsequent signature operations continue; if the similarity between the second reference signature and the second signed information is not greater than the preset threshold, the verification is considered unsuccessful, and the signature process is returned.
[0113] This embodiment decrypts contract documents into different types of decrypted files based on different operation permission types, avoiding the risk of unauthorized access and helping to ensure the security of contract documents. Simultaneously, the decrypted files are verified to prevent forged signatures and ensure their authenticity. Furthermore, for edit-type operation permissions, a modification mechanism is set up to make the contract documents more accurate.
[0114] Furthermore, based on the first or second embodiment of the contract signing method of the present invention, a third embodiment of the contract signing method of the present invention is proposed. In the third embodiment, the step of signing the decrypted document after the decrypted document has been verified includes:
[0115] Step S31: After the decrypted file is verified, the decrypted file is displayed, and when an electronic signature is obtained based on the displayed decrypted file, it is determined whether the position of the electronic signature in the decrypted file is a signature position.
[0116] In this embodiment, after the decrypted file is verified, it is then signed. Signing can be done in at least two ways: first, by a relevant person electronically signing the decrypted file; second, by pre-storing the relevant person's signature as an image and using that image to sign the decrypted file. Specifically, for electronic signature signing, after verification, the decrypted file is output to the terminal held by the relevant person for display, allowing them to input their electronic signature based on the displayed decrypted file and transmit it to the server. Upon detecting the input electronic signature, the server retrieves it and checks if the electronic signature's position within the decrypted file is a valid signing location; this location is a pre-defined valid position for signing within the decrypted file.
[0117] Step S32: If the location is a signature location, determine whether the signature font of the electronic signature is recognizable. If it is recognizable, convert the electronic signature and the decrypted file into a signature contract document in a preset format to sign the decrypted file.
[0118] Furthermore, if the electronic signature is detected as being located at the correct signature position within the decrypted file, the font of the acquired electronic signature is matched against a preset font to determine its recognizability. If the similarity between the signature font and the preset font exceeds a preset similarity threshold, the signature font is deemed to match the preset font, and the electronic signature font is considered recognizable. Subsequently, the electronic signature and the decrypted file are converted together to generate a signed contract document in a preset format, enabling the signing of the decrypted file at the current signing process node.
[0119] Furthermore, for the second signing method, after the decrypted document has been verified, the steps for signing the decrypted document include:
[0120] Step S32: After the decrypted file is verified, the signature image corresponding to the user account is read, and the signature image and the decrypted file are spliced together.
[0121] Specifically, for the method of signing decrypted files using stored signature images, the electronic signatures of relevant personnel at each signing process node are pre-generated as signature images and stored together with the user accounts of each relevant personnel. After the decrypted file is verified, the signature image corresponding to the user account of the current signing process node is read, added to the decrypted file, and then concatenated with the decrypted file.
[0122] Step S32: Perform image processing on the splicing position of the signature image in the decrypted file, and convert the image-processed decrypted file into a signature contract document in a preset format, so as to sign the decrypted file.
[0123] Furthermore, to make the stitching effect between the signature image and the decrypted document more natural, image processing is performed on the stitching position of the signature image within the decrypted document. Image processing includes, but is not limited to, pixel processing, saturation processing, and brightness processing to enhance the integration between the signature image and the decrypted document. After image processing of the stitching position is completed, the decrypted document containing the signature image is converted into a pre-formatted signed contract document, enabling the signing of the decrypted document at the current signing process node.
[0124] Understandably, contract documents correspond to multiple signing process nodes. After the contract document is signed at the current signing process node, the signing process continues according to the sequence of the signing process nodes. Specifically, after the decrypted document is verified, the step of signing the decrypted document includes:
[0125] Step S33: Based on the file type of the contract document, determine whether there are any unsigned signing process nodes after the current signing process node that signs the decrypted document.
[0126] Furthermore, based on the signing process nodes set according to the document type of the contract document, it is determined whether there are any signing process nodes that have not yet been signed after the decrypted document has been signed at the current signing process node. That is, based on the process order of each signing process node, it is determined whether the contract document has been signed at each signing process node.
[0127] Step S34: If there are unsigned signing process nodes, then according to the file type, find the encryption rule of the signed contract document, and encrypt the signed contract document according to the encryption rule;
[0128] Furthermore, if there are unsigned signing process nodes following the current signing process node (i.e., there are unsigned process nodes among all signing process nodes), then based on the process order of each signing process node, the unsigned signing process node following the current signing process node is determined as the next signing process node. Simultaneously, a pre-set mapping between contract document file types and encryption rules is invoked, and the contract document file type is compared with this mapping to obtain the encryption rule corresponding to the file type, which is then used as the encryption rule for the signed contract document. Subsequently, the signed contract document is encrypted according to this encryption rule to ensure the security of the signed contract document.
[0129] Step S35: The encrypted signed contract document is transmitted as a new contract document to the signing process nodes that have not yet been signed, so that the signing process nodes that have not yet been signed can execute the step of obtaining the contract document, until all signing process nodes corresponding to the contract document have signed.
[0130] Furthermore, the encrypted signed contract document is transmitted as a new contract document to the next signing process node that has not yet been signed. Upon detecting this new contract document, the unsigned signing process node acquires it and sends a notification to the user account of the person associated with that node, prompting them to send a decryption request. Once the decryption request is received, the user account's access permission type is determined, and the contract document is decrypted, generating a decrypted file corresponding to the access permission type. The decrypted file is then verified, and upon successful verification, it is signed. This process is repeated until all signing process nodes corresponding to the contract document have signed it, completing the document signing process.
[0131] This embodiment uses different signing methods to sign decrypted files, which facilitates the diversity of signing methods. Furthermore, during the signing process at each node, encryption and decryption are performed sequentially, and a decrypted file corresponding to the operation permission type of each node is generated for verification before signing, ensuring the security of the entire signing process.
[0132] Furthermore, the present invention also provides a contract signing device.
[0133] Reference Figure 3 , Figure 3 This is a functional module diagram of a first embodiment of the contract signing device of the present invention. The contract signing device includes:
[0134] The determination module 10 is used to obtain the contract document and, when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request.
[0135] The generation module 20 is used to decrypt the contract document, generate a decrypted file corresponding to the operation permission type, and verify the decrypted file;
[0136] The signing module 30 is used to sign the decrypted file after the decrypted file has been verified, and to complete the signing of the contract document after all signing process nodes corresponding to the contract document have been signed.
[0137] In this embodiment of the contract signing device, upon receiving a contract document and a decryption request, the determining module 10 first determines the operation permission type of the user account sending the decryption request. Then, the generating module 20 decrypts the contract document, generating a decrypted file corresponding to the operation permission type and verifying it. After successful verification, the signing module 30 signs the decrypted file, completing the signing process at all required signing nodes. This invention sets different operation permission types for different user accounts. By decrypting the contract document and generating a decrypted file corresponding to the operation permission type for verification, it ensures the security of the contract document from aspects such as password, operation permission type, and verification, avoiding the risk of forgery. Simultaneously, setting the signing nodes of the contract document as signing process nodes avoids frequent downloading and uploading of the contract document, ensuring processing efficiency. Furthermore, because each signing process node is decrypted one by one, generating a decrypted file corresponding to the operation permission type of each node for verification, it ensures both processing efficiency and overall security.
[0138] Furthermore, the generation module 20 includes:
[0139] The decryption unit is used to decrypt the contract document and convert the decrypted contract document according to the operation permission type.
[0140] The first conversion unit is configured to convert the decrypted contract file into an editable contract text if the operation permission type is editable, and use the editable contract text as the decrypted file.
[0141] The judgment unit is used to determine whether the signing permission corresponding to the signing permission type is a full permission if the operation permission type is a signature type. If it is a full permission, the decrypted contract document is converted into a contract text that supports signing, and the contract text that supports signing is used as the decrypted file.
[0142] The second conversion unit is used to determine whether the signing permission supports signing the contract document if the signing permission is not complete permission. If the signing permission supports signing the contract document, the decrypted contract document is converted into a contract text that supports signing, and the contract text that supports signing is used as the decrypted file.
[0143] The display unit is used to display the decrypted contract document in a preset format if the signing authority does not support signing the contract document.
[0144] Furthermore, the generation module 20 includes:
[0145] The first extraction unit is configured to extract text information and first signed information from the decrypted file if the operation permission type is edit type, display the text information, and modify the text information according to the modification information when receiving modification information sent based on the displayed text information.
[0146] The search unit is used to search for a first reference seal corresponding to the first signed information, and to verify the first signed information based on the first reference seal.
[0147] The second extraction unit is used to extract the second signed information in the decrypted file if the operation permission type is a signature type, and to find the second reference signature corresponding to the second signed information, and to verify the second signed information based on the second reference signature.
[0148] Furthermore, the signature module 30 also includes:
[0149] The display unit is used to display the decrypted file after the decrypted file has been verified, and to determine whether the position of the electronic signature in the decrypted file is a signature position when an electronic signature is obtained based on the displayed decrypted file.
[0150] The signing unit is used to determine whether the font of the electronic signature is recognizable if the position is a signing position. If it is recognizable, the electronic signature and the decrypted file are converted into a signed contract document in a preset format to sign the decrypted file.
[0151] Furthermore, the signature module 30 also includes:
[0152] The splicing unit is used to read the signature image corresponding to the user account after the decrypted file has been verified, and to splice the signature image and the decrypted file together.
[0153] The processing unit is used to perform image processing on the splicing position of the signature image in the decrypted file, and convert the image-processed decrypted file into a signature contract document in a preset format, so as to sign the decrypted file.
[0154] Furthermore, the contract signing device also includes:
[0155] The judgment module is used to determine, based on the file type of the contract document, whether there are any unsigned signing process nodes after the current signing process node that signs the decrypted file.
[0156] The encryption module is used to find the encryption rule of the signed contract document according to the file type if there are any unsigned signing process nodes, and to encrypt the signed contract document according to the encryption rule.
[0157] The transmission module is used to transmit the encrypted signed contract document as a new contract document to the signing process nodes that have not yet signed it, so that the signing process nodes that have not yet signed it can perform the step of obtaining the contract document, until all signing process nodes corresponding to the contract document have signed it.
[0158] Furthermore, the determining module 10 also includes:
[0159] The reading unit is used to read the process node identifier carried by the user account, and determine whether the user account has the decryption permission to the contract document based on the process node identifier.
[0160] The determining unit is used to determine the type of operation permission corresponding to the user account based on a preset account-operation permission correspondence table if it has the decryption permission to the contract document.
[0161] The specific implementation of the contract signing device of the present invention is basically the same as the various embodiments of the contract signing method described above, and will not be repeated here.
[0162] Furthermore, embodiments of the present invention also propose a computer-readable storage medium.
[0163] A contract signing program is stored on a computer-readable storage medium, and when the contract signing program is executed by a processor, it implements the steps of the contract signing method as described above.
[0164] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the embodiments of the contract signing method described above, and will not be repeated here.
[0165] It should be emphasized that, to further ensure the privacy and security of the aforementioned contract documents, the contract document information can also be stored in a blockchain node.
[0166] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0167] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0168] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0169] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0170] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for signing contract documents, characterized in that, The contract signing method includes the following steps: Obtain the contract document, and when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request; The contract document is decrypted to generate a decrypted file corresponding to the operation permission type, and the decrypted file is verified. If the operation permission type is edit type, then the text in the decrypted contract document in a preset format is identified, and the identified text is added to an editable document or an editable text box to obtain editable contract text. The extracted text information is displayed so that relevant users can make modifications based on the displayed text information. The modification information entered for the modification operation is sent to the server. After receiving the modification information, the server modifies the text information according to it and displays the modified text information. If the operation permission type is a signature type, the decrypted contract file will be converted into a contract text that supports signature in image format; The contract document corresponds to multiple signing process nodes. Different signing process nodes are set with corresponding reference signatures to verify the decrypted document and verify whether the signature added by the previous signing process node in the decrypted document is a real signature. After the decrypted file is verified, it is signed and sealed. After signing and sealing at each signing process node corresponding to the contract document, the signing of the contract document is completed.
2. The contract signing method as described in claim 1, characterized in that, The step of decrypting the contract document and generating a decrypted file corresponding to the operation permission type includes: The contract document is decrypted, and the decrypted contract document is converted according to the operation permission type; If the operation permission type is edit type, the decrypted contract file will be converted into an editable contract text, and the editable contract text will be used as the decrypted file. If the operation permission type is a signature type, then determine whether the signature permission corresponding to the signature type is a full permission. If it is a full permission, then convert the decrypted contract document into a contract text that supports signature, and use the contract text that supports signature as the decrypted file. If the signing permission is not a complete permission, then determine whether the signing permission supports signing the contract document. If it supports signing the contract document, then convert the decrypted contract document into a contract text that supports signing, and use the contract text that supports signing as the decrypted file. If the signing permission does not support signing the contract document, the decrypted contract document will be displayed in a preset format.
3. The contract signing method as described in claim 2, characterized in that, The steps for verifying the decrypted file include: If the operation permission type is edit type, then extract the text information and the first signed information from the decrypted file, display the text information, and when receiving modification information based on the displayed text information, modify the text information according to the modification information; Locate the first reference signature corresponding to the first signed information, and verify the first signed information based on the first reference signature; If the operation permission type is a signature type, then the second signed information in the decrypted file is extracted, and the second reference signature corresponding to the second signed information is found. The second signed information is then verified based on the second reference signature.
4. The contract signing method as described in claim 1, characterized in that, The step of signing the decrypted file after successful verification includes: After the decrypted file is verified, the decrypted file is displayed, and when an electronic signature is obtained based on the displayed decrypted file, it is determined whether the position of the electronic signature in the decrypted file is a signature position. If the location is a signature location, then it is determined whether the signature font of the electronic signature is recognizable. If it is recognizable, then the electronic signature and the decrypted file are converted into a signature contract document in a preset format, so as to sign the decrypted file.
5. The contract signing method as described in claim 1, characterized in that, The step of signing the decrypted file after successful verification includes: After the decrypted file is verified, the signature image corresponding to the user account is read, and the signature image and the decrypted file are combined. The image of the signature is processed at the splicing position in the decrypted file, and the image-processed decrypted file is converted into a signature contract document in a preset format for signing the decrypted file.
6. The contract signing method as described in claim 4 or 5, characterized in that, The step of signing the decrypted file after verifying its authenticity includes: Based on the file type of the contract document, determine whether there are any unsigned signing process nodes after the current signing process node that signs the decrypted file. If there are any signing process nodes that have not yet been signed, then according to the file type, find the encryption rules for the signed contract document, and encrypt the signed contract document according to the encryption rules; The encrypted signed contract document is transmitted as a new contract document to the signing process nodes that have not yet been signed, so that the signing process nodes that have not yet been signed can perform the step of obtaining the contract document, until all signing process nodes corresponding to the contract document have signed it.
7. The contract signing method as described in any one of claims 1-5, characterized in that, The step of determining the operation permission type of the user account corresponding to the decryption request includes: Read the process node identifier carried by the user account, and determine whether the user account has the decryption permission to the contract document based on the process node identifier. If the user has decryption permission for the contract document, the operation permission type corresponding to the user account is determined according to the preset account and operation permission correspondence table.
8. A contract signing device, characterized in that, The contract signing device includes: The determination module is used to obtain the contract document and, when a decryption request for the contract document is received, determine the operation permission type of the user account corresponding to the decryption request; The generation module is used to decrypt the contract document, generate a decrypted file corresponding to the operation permission type, and verify the decrypted file. Specifically, if the operation permission type is editable, it identifies the text in the decrypted contract document in a preset format, adds the identified text to an editable document or text box, obtains editable contract text, displays the extracted text information for relevant users to modify, sends the modification information to the server, modifies the text information accordingly, and displays the modified text. If the operation permission type is signature, it converts the decrypted contract document into an image-based contract text that supports signature. The contract document corresponds to multiple signature process nodes, each with a corresponding reference signature representing a genuine signature, used to verify the decrypted file and confirm whether the signature added by the previous signature process node is a genuine signature. The signing module is used to sign the decrypted file after the decrypted file has been verified, and to complete the signing of the contract document after signing each signing process node corresponding to the contract document.
9. A contract signing device, characterized in that, The contract signing device includes a memory, a processor, and a contract signing program stored in the memory and executable on the processor. When executed by the processor, the contract signing program implements the steps of the contract signing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a contract signing program, which, when executed by a processor, implements the steps of the contract signing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Online contract automatic signing method
CN109586919A
Permission management method, device and system for assembly type design file and storage medium
CN109918875A