Collaborative key signature electronic contract generation method and system based on block chain traceability

By leveraging blockchain technology and a multi-party collaborative signature mechanism, the problems of data tampering and contract lifecycle traceability in electronic contracts are solved, improving contract security and signing process efficiency, and achieving the integrity and traceability of contract content.

CN121441508APending Publication Date: 2026-01-30HENAN INFORMATIZATION GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511638356.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing electronic contract technologies suffer from problems such as the possibility of data tampering, lack of multi-party consensus verification mechanisms, low contract signing efficiency, and limited support for contract lifecycle traceability, making it difficult to meet the security requirements in complex scenarios.

Method used

It adopts a blockchain-based multi-party collaborative key signature mechanism, which generates an immutable contract record by segmenting data fragments and allocating unique identifiers, combined with the execution of a multi-party collaborative signature process by smart contracts, and provides time traceability support to achieve complete traceability of the contract lifecycle.

Benefits of technology

It enhances the security and credibility of contracts, ensures the integrity and immutability of contract content, optimizes the efficiency of the signature process, and provides reliable contract lifecycle management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121441508A_ABST
    Figure CN121441508A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block chains and information security, discloses a collaborative key signature electronic contract generation method and system based on block chain traceability, and constructs a complete traceability chain by introducing a multi-party collaborative signature mechanism and a block chain technology. By performing data fragment segmentation and unique identifier distribution on the initial contract content, granular management of the contract content is ensured. The multi-party collaborative signature process is executed by calling the smart contract, so that signature operations of multiple users based on respective private keys are realized, and the security and credibility of the contract are improved. And the finally generated non-tampering initial contract record and the hash value thereof are stored in the block head of the block chain, so that the integrity and non-tampering property of the contract content are ensured, and a reliable technical basis is provided for subsequent contract life cycle management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of blockchain and information security technology, specifically to a method and system for generating electronic contracts using collaborative key signatures based on blockchain traceability. Background Technology

[0002] With the acceleration of digitalization, electronic contracts are being used in increasingly widespread scenarios, posing numerous challenges to traditional centralized contract platforms in terms of data security and multi-party collaboration. For example, centralized platforms are susceptible to data tampering and rely on a single institution for endorsement, lacking a multi-party consensus verification mechanism, which to some extent affects the credibility of contracts. Furthermore, centralized storage of private keys makes them vulnerable to attacks; if a single node is compromised, the contract may become invalid or forged. Simultaneously, existing technologies have limitations in tracing modifications after contract signing, making it difficult to effectively verify historical versions in case of disputes. Multi-party signing processes also exhibit low efficiency, lacking support for automated execution and authorized collaboration.

[0003] Currently, while common blockchain contracts, such as Ethereum smart contracts, have solved some evidence preservation issues through distributed ledger technology, they still have shortcomings in practical applications. For example, existing technologies have not yet incorporated multi-party key collaborative signature mechanisms, failing to fully meet the security requirements of complex scenarios. Furthermore, comprehensive traceability support for the contract lifecycle is relatively limited, making it difficult to fully cover all aspects of contract management. These factors collectively constrain the further development and widespread application of electronic contract technology. Summary of the Invention

[0004] To overcome the aforementioned technical deficiencies, this invention provides a method and system for generating collaborative key signature electronic contracts based on blockchain traceability.

[0005] Therefore, the present invention adopts the following technical solution:

[0006] In a first aspect, the present invention provides a method for generating collaborative key signature electronic contracts based on blockchain traceability, the method comprising the following steps:

[0007] Receive contract creation requests submitted by multiple users through distributed network nodes, wherein the contract creation requests include initial contract content and user identity identifiers;

[0008] A public-private key pair is generated for each user based on the user's identity identifier. The public key is stored in the blockchain network, and the private key is distributed to the corresponding user's local secure storage.

[0009] The initial contract content is divided into multiple data fragments, and a unique data identifier is assigned to each data fragment to form an initial contract data set;

[0010] The process involves calling a smart contract in the blockchain network to execute a multi-party collaborative signature process, using the initial contract data set and the data identifier as input parameters, and triggering multiple users to sign the initial contract data set based on their respective private keys.

[0011] After receiving all user signatures, the signed initial contract data set and the data identifier are uploaded to the blockchain network to generate an immutable initial contract record, and the hash value of the initial contract record is stored in the block header of the blockchain to complete the notarization.

[0012] Furthermore, the invocation of a smart contract in the blockchain network to execute a multi-party collaborative signature process includes:

[0013] Obtain the signature request submitted by each user and verify whether the user identity identifier contained in the signature request matches the public key stored in the blockchain network;

[0014] If the user identity identifier matches the public key, then the user signature data is extracted from the signature request, and the user signature data is bound to the corresponding data fragment;

[0015] For each data segment, verify whether the bound user signature data meets the preset signature count threshold;

[0016] If the number of signatures is met, the data fragment is marked as signed and the signed status is updated to the smart contract state variable in the blockchain network.

[0017] Repeat the above steps until all data fragments are marked as signed.

[0018] Furthermore, storing the hash value of the initial contract record in the block header of the blockchain completes the notarization process, including:

[0019] Calculate the hash value of the initial contract record and generate the corresponding digital fingerprint;

[0020] The digital fingerprint is associated with the latest block header in the current blockchain network, and new block header information is generated;

[0021] The new block header information is broadcast to all nodes in the blockchain network to complete consensus verification;

[0022] If the consensus verification passes, the new block header information will be written into the next block in the blockchain network.

[0023] The timestamp of the new block header information is recorded and bound to the hash value of the initial contract record to provide time traceability support.

[0024] Furthermore, it also includes the following steps:

[0025] Upon receiving a contract revision request submitted by a user, obtain the revision content and the user's identity identifier contained in the contract revision request;

[0026] Verify whether the user identity identifier has revision authority. If it does, then divide the revision content into multiple revision data fragments.

[0027] Each revised data fragment is assigned a unique data identifier, and the revised data fragment and the data identifier are uploaded to the blockchain network to generate a revision record;

[0028] Calculate the hash value of the revision record and associate the hash value of the revision record with the hash value of the initial contract record;

[0029] The associated results are stored in a new block in the blockchain network to generate a complete contract lifecycle traceability chain.

[0030] Furthermore, it also includes the following steps:

[0031] Upon receiving a contract signing request submitted by a user, obtain the signing content and the identity identifier of the signing user contained in the contract signing request;

[0032] Verify whether the signed user's identity matches the public key stored in the blockchain network;

[0033] If a match is found, the smart contract in the blockchain network is invoked to perform the signing operation and the signing result is stored in the blockchain network.

[0034] After receiving all the signing results, a final signed contract record is generated and the hash value of the final signed contract record is stored in the block header of the blockchain network;

[0035] Record the timestamp of the final signed contract record and bind it to the hash value of the final signed contract record to provide support for signing time traceability.

[0036] Furthermore, after generating the final signed contract record, the following steps are also included:

[0037] Obtain the signature data of the multiple signer users contained in the final signed contract record, and match and verify the signature data with the public keys in the blockchain network one by one;

[0038] If all signature data passes the matching verification, the integrity of the final signed contract record is verified according to preset rules. The integrity verification includes verifying whether there are any unsigned data fragments in the final signed contract record.

[0039] After the integrity verification is passed, the smart contract in the blockchain network is invoked to execute the automated execution process. The automated execution process includes parsing the execution conditions in the final signed contract record and triggering the corresponding execution operation based on the execution conditions.

[0040] The results of the execution operation are stored in the blockchain network, and a corresponding execution record is generated. The execution record includes an execution timestamp, execution result, and execution user identity identifier.

[0041] The hash value of the execution record is associated with the hash value of the final signed contract record to ensure that the traceability relationship between the execution record and the signing record is complete and tamper-proof.

[0042] Furthermore, after completing the multi-party collaborative signature process, the following steps are also included:

[0043] Determine the response time of the signature requests submitted by multiple users during the signing process, and calculate the time interval from submission to completion of each signature request;

[0044] The average response time of the signature process is calculated based on the time interval, and the average response time is compared with a preset time threshold.

[0045] If the average response time exceeds the time threshold, a smart contract execution anomaly detection process is triggered in the blockchain network. The anomaly detection process includes analyzing whether the source node of the signature request has abnormal behavior.

[0046] After the anomaly detection process is completed, an anomaly detection report is generated and stored in the blockchain network. The anomaly detection report includes an anomaly node identifier, an anomaly behavior description, and a detection timestamp.

[0047] Adjust the parameter configuration of the multi-party collaborative signature process based on the anomaly detection report.

[0048] Furthermore, after generating the anomaly detection report, the following steps are also included:

[0049] Obtain the abnormal node identifier contained in the anomaly detection report, and query the historical records in the blockchain network based on the abnormal node identifier. The historical records include the signature behavior data of the abnormal node in the past multiple monitoring periods.

[0050] Based on the signature behavior data, calculate the behavior pattern feature value of the abnormal node, which includes signature frequency, signature success rate and signature latency.

[0051] Based on the behavioral pattern feature values, the behavior of the abnormal node is classified using a preset machine learning model. The classification results include normal behavior, suspected abnormal behavior, and clear abnormal behavior.

[0052] If the classification result indicates clear abnormal behavior, then the abnormal node is marked as a high-risk node and removed from the current signature process;

[0053] The classification results and high-risk node identifiers are stored in the blockchain network, and the node trust scores in the blockchain network are updated to reflect the latest node status.

[0054] Furthermore, after updating the node trust score, the following steps are also included:

[0055] Obtain the trust score of all nodes in the blockchain network, and group the nodes according to the trust score, including a high trust group, a medium trust group, and a low trust group;

[0056] Calculate the average trust score of nodes within each group, and compare the average trust score with a preset trust score threshold;

[0057] If the average trust score of a group is lower than the trust score threshold, a smart contract execution node optimization process is triggered in the blockchain network. The node optimization process includes reassigning the permissions and tasks of nodes within the group.

[0058] After the node optimization process is completed, a node optimization report is generated and stored in the blockchain network. The node optimization report includes the optimized node identifier, optimization content, and optimization timestamp.

[0059] Adjust the node management strategy of the blockchain network based on the node optimization report.

[0060] Secondly, the present invention also provides a collaborative key signature electronic contract generation system based on blockchain traceability. The system employs the aforementioned collaborative key signature electronic contract generation method based on blockchain traceability. The system includes: a contract creation module, a key generation module, a data segmentation module, a signature processing module, and a notarization module; wherein,

[0061] The contract creation module is used to receive contract creation requests submitted by multiple users through distributed network nodes, and to parse the initial contract content and user identity identifiers in the contract creation requests.

[0062] The key generation module is used to generate a public-private key pair corresponding to each user based on the user identity identifier, store the public key in the blockchain network, and distribute the private key to the local secure storage of the corresponding user.

[0063] The data segmentation module is used to segment the initial contract content into multiple data fragments and assign a unique data identifier to each data fragment to form an initial contract data set;

[0064] The signature processing module is used to call the smart contract in the blockchain network to execute a multi-party collaborative signature process, taking the initial contract data set and the data identifier as input parameters, and triggering multiple users to perform signature operations on the initial contract data set based on their respective private keys.

[0065] The notarization module is used to upload the signed initial contract data set and the data identifier to the blockchain network after receiving all user signatures to generate an immutable initial contract record, and to store the hash value of the initial contract record in the block header of the blockchain to complete the notarization.

[0066] This invention provides a method and system for generating electronic contracts based on blockchain traceability and collaborative key signatures. By introducing a multi-party collaborative signature mechanism and blockchain technology, a complete traceability chain is constructed. By segmenting the initial contract content into data fragments and assigning unique identifiers, granular management of the contract content is ensured. By calling a smart contract to execute the multi-party collaborative signature process, multiple users can perform signature operations based on their respective private keys, thereby improving the security and trustworthiness of the contract. The final, immutable initial contract record and its hash value are stored in the blockchain's block header, ensuring the integrity and immutability of the contract content and providing a reliable technical foundation for subsequent contract lifecycle management. Attached Figure Description

[0067] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a flowchart of a collaborative key signature electronic contract generation method based on blockchain traceability in an embodiment of the present invention.

[0069] Figure 2 This is a schematic diagram of a collaborative key signature electronic contract generation system based on blockchain traceability in an embodiment of the present invention. Detailed Implementation

[0070] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0071] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 This invention provides a method for generating collaborative key signature electronic contracts based on blockchain traceability, the method comprising the following steps:

[0072] S1. Receive contract creation requests submitted by multiple users through distributed network nodes, wherein the contract creation requests include initial contract content and user identity identifiers;

[0073] S2. Generate a public-private key pair corresponding to each user based on the user identity identifier, store the public key in the blockchain network, and distribute the private key to the local secure storage of the corresponding user. This process ensures that each user has an independent key pair, thereby avoiding the security risks that may be caused by centralized storage of private keys in traditional centralized platforms.

[0074] S3. Divide the initial contract content into multiple data fragments and assign a unique data identifier to each data fragment to form an initial contract data set; this granular management method can effectively improve the efficiency and security of the subsequent signature process.

[0075] S4. Call the smart contract in the blockchain network to execute the multi-party collaborative signature process, taking the initial contract data set and the data identifier as input parameters, and triggering multiple users to sign the initial contract data set based on their respective private keys.

[0076] S5. After receiving all user signatures, upload the signed initial contract data set and the data identifier to the blockchain network to generate an immutable initial contract record, and store the hash value of the initial contract record in the block header of the blockchain to complete the notarization.

[0077] This invention proposes a blockchain-based collaborative key signature electronic contract generation method. By introducing a multi-party collaborative signature mechanism and blockchain technology during the creation, signing, revision, and execution of electronic contracts, a complete traceability chain is constructed. Granular management of the contract content is ensured through data fragmentation and unique identifier allocation of the initial contract content. By invoking a smart contract to execute the multi-party collaborative signature process, multiple users can perform signature operations based on their respective private keys, thereby improving the security and trustworthiness of the contract. The final immutable initial contract record and its hash value are stored in the blockchain block header, ensuring the integrity and immutability of the contract content and providing a reliable technical foundation for subsequent contract lifecycle management.

[0078] In a preferred embodiment, the step of invoking a smart contract in the blockchain network to execute a multi-party collaborative signature process includes:

[0079] Obtain the signature request submitted by each user and verify whether the user identity identifier contained in the signature request matches the public key stored in the blockchain network;

[0080] If the user identity identifier matches the public key, then the user signature data is extracted from the signature request, and the user signature data is bound to the corresponding data fragment;

[0081] For each data segment, verify whether the bound user signature data meets the preset signature count threshold;

[0082] If the number of signatures is met, the data fragment is marked as signed and the signed status is updated to the smart contract state variable in the blockchain network.

[0083] Repeat the above steps until all data fragments are marked as signed.

[0084] The multi-party collaborative signature process in this embodiment ensures consistency and integrity among multiple users during the signature process.

[0085] In a preferred embodiment, storing the hash value of the initial contract record in the block header of the blockchain to complete the notarization includes:

[0086] Calculate the hash value of the initial contract record and generate the corresponding digital fingerprint;

[0087] The digital fingerprint is associated with the latest block header in the current blockchain network, and new block header information is generated;

[0088] The new block header information is broadcast to all nodes in the blockchain network to complete consensus verification;

[0089] If the consensus verification passes, the new block header information will be written into the next block in the blockchain network.

[0090] The timestamp of the new block header information is recorded and bound to the hash value of the initial contract record to provide time traceability support.

[0091] In this way, the process ensures the integrity and immutability of the initial contract record.

[0092] In a preferred embodiment, the method further includes the step of:

[0093] Upon receiving a contract revision request submitted by a user, obtain the revision content and the user's identity identifier contained in the contract revision request;

[0094] Verify whether the user identity identifier has revision authority. If it does, then divide the revision content into multiple revision data fragments.

[0095] Each revised data fragment is assigned a unique data identifier, and the revised data fragment and the data identifier are uploaded to the blockchain network to generate a revision record;

[0096] Calculate the hash value of the revision record and associate the hash value of the revision record with the hash value of the initial contract record;

[0097] The associated results are stored in a new block in the blockchain network to generate a complete contract lifecycle traceability chain.

[0098] In a preferred embodiment, the method further includes the step of:

[0099] Upon receiving a contract signing request submitted by a user, obtain the signing content and the identity identifier of the signing user contained in the contract signing request;

[0100] Verify whether the signed user's identity matches the public key stored in the blockchain network;

[0101] If a match is found, the smart contract in the blockchain network is invoked to perform the signing operation and the signing result is stored in the blockchain network.

[0102] After receiving all the signing results, a final signed contract record is generated and the hash value of the final signed contract record is stored in the block header of the blockchain network;

[0103] The timestamp of the final signed contract record is recorded and bound to the hash value of the final signed contract record to provide traceability support for the signing time; thereby ensuring the security and traceability of the signing process.

[0104] In a preferred embodiment, after generating the final signed contract record, the step further includes:

[0105] Obtain the signature data of the multiple signer users contained in the final signed contract record, and match and verify the signature data with the public keys in the blockchain network one by one;

[0106] If all signature data passes the matching verification, the integrity of the final signed contract record is verified according to preset rules. The integrity verification includes verifying whether there are any unsigned data fragments in the final signed contract record.

[0107] After the integrity verification is passed, the smart contract in the blockchain network is invoked to execute the automated execution process. The automated execution process includes parsing the execution conditions in the final signed contract record and triggering the corresponding execution operation based on the execution conditions.

[0108] The results of the execution operation are stored in the blockchain network, and a corresponding execution record is generated. The execution record includes an execution timestamp, execution result, and execution user identity identifier.

[0109] The hash value of the execution record is associated with the hash value of the final signed contract record to ensure that the traceability relationship between the execution record and the signing record is complete and tamper-proof.

[0110] In a preferred embodiment, after completing the multi-party collaborative signature process, the method further includes the following steps:

[0111] Determine the response time of the signature requests submitted by multiple users during the signing process, and calculate the time interval from submission to completion of each signature request;

[0112] The average response time of the signature process is calculated based on the time interval, and the average response time is compared with a preset time threshold.

[0113] If the average response time exceeds the time threshold, a smart contract execution anomaly detection process is triggered in the blockchain network. The anomaly detection process includes analyzing whether the source node of the signature request has abnormal behavior.

[0114] After the anomaly detection process is completed, an anomaly detection report is generated and stored in the blockchain network. The anomaly detection report includes an anomaly node identifier, an anomaly behavior description, and a detection timestamp.

[0115] The parameter configuration of the multi-party collaborative signature process was adjusted based on the anomaly detection report. This optimized the response efficiency of the signature process and improved the robustness of the system.

[0116] In a preferred embodiment, after generating the anomaly detection report, the step further includes:

[0117] Obtain the abnormal node identifier contained in the anomaly detection report, and query the historical records in the blockchain network based on the abnormal node identifier. The historical records include the signature behavior data of the abnormal node in the past multiple monitoring periods.

[0118] Based on the signature behavior data, calculate the behavior pattern feature value of the abnormal node, which includes signature frequency, signature success rate and signature latency.

[0119] Based on the behavioral pattern feature values, the behavior of the abnormal node is classified using a preset machine learning model. The classification results include normal behavior, suspected abnormal behavior, and clear abnormal behavior.

[0120] If the classification result indicates clear abnormal behavior, then the abnormal node is marked as a high-risk node and removed from the current signature process;

[0121] The classification results and high-risk node identifiers are stored in the blockchain network, and the node trust scores in the blockchain network are updated to reflect the latest node status.

[0122] In a preferred embodiment, after updating the node trust score, the following steps are further included:

[0123] Obtain the trust score of all nodes in the blockchain network, and group the nodes according to the trust score, including a high trust group, a medium trust group, and a low trust group;

[0124] Calculate the average trust score of nodes within each group, and compare the average trust score with a preset trust score threshold;

[0125] If the average trust score of a group is lower than the trust score threshold, a smart contract execution node optimization process is triggered in the blockchain network. The node optimization process includes reassigning the permissions and tasks of nodes within the group.

[0126] After the node optimization process is completed, a node optimization report is generated and stored in the blockchain network. The node optimization report includes the optimized node identifier, optimization content, and optimization timestamp.

[0127] Based on the aforementioned node optimization report, the node management strategy of the blockchain network is adjusted to improve the overall security and stability of the network.

[0128] In a preferred embodiment, after generating the node optimization report, the following steps are further included:

[0129] Obtain the optimized node identifier contained in the node optimization report, and query the contract lifecycle traceability chain in the blockchain network based on the optimized node identifier;

[0130] Based on the contract lifecycle traceability chain, the participation of nodes in the past contract creation, signing, revision and execution processes is analyzed and optimized. The participation includes the number of times, the time of participation and the result of participation.

[0131] Based on the participation status, calculate the comprehensive contribution value of the optimized node, and compare the comprehensive contribution value with a preset contribution threshold;

[0132] If the overall contribution value is lower than the contribution threshold, the optimized node will be marked as a low contribution node and its permissions in future contract processes will be restricted.

[0133] The overall contribution value and low contribution node identifiers are stored in the blockchain network, and the node permission configuration in the blockchain network is updated to ensure the fairness and rationality of permission allocation.

[0134] Based on the above-described method for generating electronic contracts using blockchain traceability and collaborative key signatures, this invention also provides a system for generating electronic contracts using blockchain traceability and collaborative key signatures, such as... Figure 2 As shown, the system includes: a contract creation module 1, a key generation module 2, a data segmentation module 3, a signature processing module 4, and a notarization module 5, wherein...

[0135] The contract creation module 1 is used to receive contract creation requests submitted by multiple users through distributed network nodes, and to parse the initial contract content and user identity identifier in the contract creation request;

[0136] The key generation module 2 is used to generate a public-private key pair corresponding to each user based on the user identity identifier, store the public key in the blockchain network, and distribute the private key to the local secure storage of the corresponding user.

[0137] The data segmentation module 3 is used to segment the initial contract content into multiple data fragments and assign a unique data identifier to each data fragment to form an initial contract data set;

[0138] The signature processing module 4 is used to call the smart contract in the blockchain network to execute a multi-party collaborative signature process, taking the initial contract data set and the data identifier as input parameters, and triggering multiple users to perform signature operations on the initial contract data set based on their respective private keys.

[0139] The notarization module 5 is used to upload the signed initial contract data set and the data identifier to the blockchain network after receiving all user signatures to generate an immutable initial contract record, and to store the hash value of the initial contract record in the block header of the blockchain to complete the notarization.

[0140] In a preferred embodiment, the system further includes a revision module 6, a signing module 7, an execution module 8, an anomaly detection module 9, a node optimization module 10, and a permission management module 11. The revision module 6, upon receiving a contract revision request submitted by a user, obtains the revision content and the revising user's identity identifier contained in the contract revision request and performs the revision operation. The signing module 7, upon receiving a contract signing request submitted by a user, obtains the signing content and the signing user's identity identifier contained in the contract signing request and performs the signing operation. The execution module 8, after generating the final signed contract record, calls a smart contract in the blockchain network to execute an automated execution process. The anomaly detection module 9, after completing the multi-party collaborative signature process, executes an anomaly detection process and generates an anomaly detection report. The node optimization module 10, after updating the node trust score, executes a node optimization process and generates a node optimization report. The permission management module 11, after generating the node optimization report, performs permission management operations and updates the node permission configuration.

[0141] To enable those skilled in the art to fully understand and implement this invention, the specific implementation principle of this invention will be further explained below in conjunction with a specific application scenario.

[0142] In practice, multiple users submit contract creation requests to contract creation module 1 through distributed network nodes. This request includes initial contract content and user identification, triggering the initiation of subsequent processes. Taking a supply chain finance scenario as an example, suppose a core enterprise, two suppliers, and a financial institution jointly participate in signing an electronic contract. The core enterprise, as the initiator, first uploads the initial contract content (such as payment terms, delivery time, etc.) to the system and provides the identification of all participating parties. At this point, after receiving the request, contract creation module 1 transmits the initial contract content to data segmentation module 3 and simultaneously transmits the user identification to key generation module 2.

[0143] Key generation module 2 generates a corresponding public-private key pair based on each user's identity, stores the public key in the blockchain network, and distributes the private key to the corresponding user's local secure storage module. This process uses an asymmetric encryption algorithm to ensure that each user has an independent key pair, avoiding the security risks that may arise from centralized storage of private keys in traditional centralized platforms. For example, in the aforementioned supply chain finance scenario, the core enterprise, the two suppliers, and the financial institution each obtain their own public-private key pair, ensuring the security of the subsequent signature process.

[0144] The data segmentation module 3 divides the initial contract content into multiple data fragments and assigns a unique data identifier to each fragment, forming the initial contract data set. For example, the "payment amount," "delivery date," and "default clause" in the initial contract content are divided into three data fragments, each assigned a unique identifier. This granular management approach not only improves the efficiency of the subsequent signature process but also enhances data security, because even if one data fragment is tampered with, the other data fragments remain intact.

[0145] The signature processing module 4 invokes a smart contract in the blockchain network to execute a multi-party collaborative signature process. It takes the initial contract data set and data identifier as input parameters, triggering multiple users to sign the initial contract data set based on their respective private keys. In the aforementioned supply chain finance scenario, the core enterprise, two suppliers, and a financial institution submit signature requests sequentially. The signature processing module 4 first verifies whether the user identity identifier contained in the signature request matches the public key stored in the blockchain network. If the match is successful, it extracts the user signature data and binds it to the corresponding data fragment. For each data fragment, it verifies whether the bound user signature data meets a preset signature count threshold. For example, assuming the preset signature count threshold is 3, when a data fragment receives at least 3 valid signatures, the data fragment is marked as signed, and the status is updated to the smart contract state variable in the blockchain network. The above steps are repeated until all data fragments are marked as signed.

[0146] After receiving all user signatures, the evidence storage module 5 uploads the signed initial contract data set and data identifier to the blockchain network to generate an immutable initial contract record. Specifically, the module first calculates the hash value of the initial contract record and generates a corresponding digital fingerprint. Then, it associates the digital fingerprint with the latest block header in the current blockchain network to generate a new block header. This new block header is broadcast to all nodes in the blockchain network to complete consensus verification. If the consensus verification passes, the new block header is written into the next block in the blockchain network. Simultaneously, the module records the timestamp of the new block header and binds it to the hash value of the initial contract record to provide time-based traceability. For example, in the aforementioned supply chain finance scenario, the hash value of the initial contract record, bound to a timestamp, is stored in the blockchain network, ensuring the integrity and immutability of the contract content.

[0147] When revisions to the initial contract are required, revision module 6 receives contract revision requests submitted by users. For example, a core enterprise requests to modify the "payment amount" and submits the revised content and the user's identity identifier. Revision module 6 verifies whether the user has revision permissions. If they do, the revised content is divided into multiple revised data fragments, and a unique data identifier is assigned to each fragment. The revised data fragments and data identifiers are uploaded to the blockchain network to generate a revision record. The hash value of the revision record is then calculated and associated with the hash value of the initial contract record. Finally, the association result is stored in a new block on the blockchain network to generate a complete contract lifecycle traceability chain. For example, in the aforementioned supply chain finance scenario, the record of revising the "payment amount" from 1 million yuan to 1.2 million yuan is fully traced and stored.

[0148] When the signing module 7 receives a contract signing request from a user, it obtains the signing content and the signing user's identity identifier contained in the request, and verifies whether the signing user's identity identifier matches the public key stored in the blockchain network. If the match is successful, it calls the smart contract in the blockchain network to execute the signing operation and stores the signing result in the blockchain network. After receiving all signing results, it generates a final signed contract record and stores the hash value of the final signed contract record in the block header of the blockchain network. For example, in the supply chain finance scenario described above, after the core enterprise, two suppliers, and the financial institution complete their signings in sequence, the final signed contract record is generated and stored in the blockchain network.

[0149] After generating the final signed contract record, execution module 8 obtains the signature data of the multiple signatories contained in the final signed contract record and verifies the signature data against the public keys in the blockchain network one by one. If all signature data passes the verification, the final signed contract record is checked for integrity according to preset rules. For example, integrity verification includes verifying whether there are unsigned data fragments in the final signed contract record. After the integrity verification passes, the smart contract in the blockchain network is invoked to execute the automated execution process. For example, in the supply chain finance scenario mentioned above, the smart contract parses the execution conditions in the final signed contract record (such as "the payment amount is 1.2 million yuan and the delivery date is January 1, 2024") and triggers the corresponding execution operation based on the execution conditions. The result of the execution operation is stored in the blockchain network and a corresponding execution record is generated. The execution record includes an execution timestamp, execution result, and execution user identity identifier. The hash value of the execution record is associated with the hash value of the final signed contract record to ensure that the traceability relationship between the execution record and the signing record is complete and tamper-proof.

[0150] After completing the multi-party collaborative signature process, the anomaly detection module 9 determines the response time of each signature request submitted by multiple users during the signing process and calculates the time interval from submission to completion of each signature request. For example, in the supply chain finance scenario mentioned above, if the signature response time of a supplier significantly exceeds the normal range, the anomaly detection process is triggered in the smart contract execution of the blockchain network. The anomaly detection process includes analyzing whether there is abnormal behavior from the source node of the signature request. After the anomaly detection process is completed, an anomaly detection report is generated and stored in the blockchain network. For example, the anomaly detection report records the abnormal node identifier, abnormal behavior description, and detection timestamp, providing a basis for subsequent optimization.

[0151] After updating the node trust scores, the node optimization module 10 obtains the trust scores of all nodes in the blockchain network and groups the nodes according to their trust scores. For example, in the supply chain finance scenario described above, the node optimization module 10 divides the nodes into high-trust, medium-trust, and low-trust groups, and calculates the average trust score of nodes within each group. If the average trust score of a group is lower than a preset trust score threshold, the smart contract in the blockchain network is triggered to execute the node optimization process. For example, for nodes in the low-trust group, their permissions and tasks are reassigned to improve the overall security of the network. After the node optimization process is completed, a node optimization report is generated and stored in the blockchain network.

[0152] After generating a node optimization report, the permission management module 11 obtains the optimized node identifier contained in the report and queries the contract lifecycle traceability chain in the blockchain network based on the optimized node identifier. For example, in the aforementioned supply chain finance scenario, the permission management module 11 analyzes the optimized node's participation in the past contract creation, signing, revision, and execution processes, and calculates the optimized node's comprehensive contribution value. If the comprehensive contribution value is lower than a preset contribution threshold, the optimized node is marked as a low-contribution node, and its permission scope in future contract processes is restricted. The comprehensive contribution value and the low-contribution node identifier are stored in the blockchain network, and the node permission configuration in the blockchain network is updated to ensure the fairness and rationality of permission allocation.

[0153] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0154] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0155] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0156] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a collaborative key signature electronic contract based on blockchain traceability, characterized in that, The method comprises the steps of: receiving a contract creation request submitted by multiple users through a distributed network node, the contract creation request containing initial contract content and user identity; generating a public-private key pair corresponding to each user according to the user identity, and storing the public key in the blockchain network while distributing the private key to the local secure storage of the corresponding user; segmenting the initial contract content into multiple data segments and assigning a unique data identifier to each data segment to form an initial contract data set; calling a smart contract in the blockchain network to perform a multi-party collaborative signature process, taking the initial contract data set and the data identifier as input parameters, and triggering the multiple users to sign the initial contract data set based on their respective private keys; after receiving all user signatures, uploading the signed initial contract data set and the data identifier to the blockchain network to generate an unalterable initial contract record, and storing the hash value of the initial contract record in the block header of the blockchain to complete the evidence storage.

2. The blockchain-based traceable collaborative key-signature electronic contract generation method according to claim 1, characterized in that, The calling of the smart contract in the blockchain network to perform the multi-party collaborative signature process comprises: obtaining a signature request submitted by each user, and verifying whether the user identity contained in the signature request matches the public key stored in the blockchain network; if the user identity matches the public key, extracting user signature data from the signature request and binding the user signature data to the corresponding data segment; for each data segment, verifying whether the bound user signature data meets a preset signature quantity threshold; if the signature quantity threshold is met, marking the data segment as a signed state and updating the signed state to a smart contract state variable in the blockchain network; repeat the above steps until all data segments are marked as a signed state. 3.The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 2, wherein, Storing the hash value of the initial contract record in the block header of the blockchain to complete the evidence storage comprises: calculating the hash value of the initial contract record and generating a corresponding digital fingerprint; associating the digital fingerprint with the latest block header in the current blockchain network and generating new block header information; broadcasting the new block header information to all nodes in the blockchain network to complete consensus verification; if the consensus verification is passed, writing the new block header information to the next block in the blockchain network; recording the timestamp of the new block header information and binding it with the hash value of the initial contract record to provide time traceability support.

4. The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 3, wherein, Further comprising the steps of: when receiving a contract revision request submitted by a user, obtaining revision content and revision user identity contained in the contract revision request; verifying whether the revision user identity has revision authority, and if it has revision authority, segmenting the revision content into multiple revision data segments; assigning a unique data identifier to each revision data segment and uploading the revision data segment and the data identifier to the blockchain network to generate a revision record; calculating the hash value of the revision record and associating the hash value of the revision record with the hash value of the initial contract record. The association result is stored into a new block in the blockchain network to generate a complete contract lifecycle traceability chain.

5. The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 1, wherein, Further comprising steps of: Upon receiving a contract signing request submitted by a user, obtaining signing content and a signing user identity included in the contract signing request; Verifying whether the signing user identity matches a public key stored in the blockchain network; If the match is verified, invoking a smart contract in the blockchain network to perform a signing operation and storing a signing result into the blockchain network; Upon receiving all signing results, generating a final signed contract record and storing a hash value of the final signed contract record into a block header in the blockchain network; Recording a timestamp of the final signed contract record and binding the timestamp with the hash value of the final signed contract record to provide signing time traceability support.

6. The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 5, wherein, Upon generating the final signed contract record, further comprising steps of: Obtaining signature data of multiple signing users included in the final signed contract record and performing one-by-one matching verification of the signature data with public keys in the blockchain network; If all signature data passes the matching verification, performing integrity checking on the final signed contract record according to a preset rule, the integrity checking including verifying whether there is an unsigned data segment in the final signed contract record; Upon passing the integrity checking, invoking a smart contract in the blockchain network to perform an automated execution process, the automated execution process including analyzing execution conditions in the final signed contract record and triggering corresponding execution operations based on the execution conditions; Storing results of the execution operations into the blockchain network and generating corresponding execution records, the execution records including execution timestamps, execution results and execution user identities; Associating a hash value of the execution records with a hash value of the final signed contract record to ensure that a traceability relationship between the execution records and the signed records is complete and tamper-proof.

7. The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 1, wherein, Upon completing the multi-party collaborative signing process, further comprising steps of: Determining response times of signing requests submitted by multiple users in the signing process and calculating time intervals from submission to completion of signing for each signing request; Calculating an average response time of the signing process according to the time intervals and comparing the average response time with a preset time threshold; If the average response time exceeds the time threshold, triggering a smart contract in the blockchain network to perform an abnormality detection process, the abnormality detection process including analyzing whether a source node of the signing request has abnormal behavior; Upon completing the abnormality detection process, generating an abnormality detection report and storing the abnormality detection report into the blockchain network, the abnormality detection report including an abnormal node identity, an abnormal behavior description and a detection timestamp; Adjusting parameter configurations of the multi-party collaborative signing process based on the abnormality detection report. 8.The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 1, wherein, Upon generating the abnormality detection report, further comprising steps of: Obtaining the abnormal node identity included in the abnormality detection report and querying historical records in the blockchain network according to the abnormal node identity, the historical records including signing behavior data of the abnormal node in a plurality of monitoring periods in the past; Based on the signature behavior data, a behavior pattern feature value of the abnormal node is calculated, the behavior pattern feature value including a signature frequency, a signature success rate, and a signature delay; According to the behavior pattern feature value, a preset machine learning model is used to classify the behavior of the abnormal node, the classification result including normal behavior, suspected abnormal behavior, and explicit abnormal behavior; If the classification result is explicit abnormal behavior, the abnormal node is marked as a high-risk node, and is removed from the current signature process; The classification result and the high-risk node identification are stored in the blockchain network, and the node trust score in the blockchain network is updated to reflect the latest node state. 9.The blockchain-based traceable collaborative key-signature electronic contract generation method of claim 8, wherein, After updating the node trust score, the following steps are further included: The trust scores of all nodes in the blockchain network are obtained, and the nodes are grouped according to the trust scores, the grouping including a high-trust group, a medium-trust group, and a low-trust group; The average trust score of the nodes in each group is calculated, and the average trust score is compared with a preset trust score threshold; If the average trust score of the group is lower than the trust score threshold, a smart contract in the blockchain network is triggered to execute a node optimization process, the node optimization process including reassigning the permissions and tasks of the nodes in the group; After the node optimization process is completed, a node optimization report is generated and stored in the blockchain network, the node optimization report including an optimized node identification, optimization content, and an optimization timestamp; Based on the node optimization report, the node management strategy of the blockchain network is adjusted.

10. A collaborative key-signature electronic contract generation system based on blockchain traceability, characterized by, The system adopts the blockchain-based traceability collaborative key signature electronic contract generation method according to any one of claims 1 to 9, and the system includes a contract creation module, a key generation module, a data segmentation module, a signature processing module, and a storage module; wherein The contract creation module is configured to receive a contract creation request submitted by multiple users through distributed network nodes, and parse initial contract content and user identity in the contract creation request; The key generation module is configured to generate a public-private key pair corresponding to each user according to the user identity, store the public key in the blockchain network, and distribute the private key to the local secure storage of the corresponding user; The data segmentation module is configured to segment the initial contract content into multiple data segments, and assign a unique data identifier to each data segment to form an initial contract data set; The signature processing module is configured to call a smart contract in the blockchain network to execute a multi-party collaborative signature process, input the initial contract data set and the data identifier as input parameters, and trigger the multiple users to perform signature operations on the initial contract data set based on their respective private keys; The storage module is configured to upload the signed initial contract data set and the data identifier to the blockchain network after receiving all user signatures to generate an unalterable initial contract record, and store the hash value of the initial contract record in the block header of the blockchain to complete storage.