Electronic contract signing sharing and management system based on block chain

Through OCR+RPA and improved PBFT consensus algorithm, combined with reputation score and VRF algorithm, the security risks and low efficiency of traditional electronic contracting systems are solved, and the efficient, secure and user-friendly contract of the blockchain electronic contracting platform is achieved. manage.

CN119090429APending Publication Date: 2024-12-06HUAQIAO UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411127829.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional electronic contracting systems have problems of security risks, complexity and high cost caused by centralized architecture, and the cumbersomeness and inefficiency of blockchain electronic contracting platforms limit user acceptance and throughput.

Method used

The OCR+RPA solution is adopted to combine artificial intelligence, and the reputation scoring mechanism and grouping mechanism are introduced, and the improved PBFT consensus algorithm and VRF algorithm are used to reduce node participation and communication frequency, improve platform availability and throughput, and reduce third-party service dependence.

Benefits of technology

It realizes the secure and trustworthy sharing of contract data, shortens the signing process, improves service efficiency, reduces the risk of data tampering, improves user experience and platform acceptability, and optimizes the performance and security of the blockchain electronic signing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090429A_ABST
    Figure CN119090429A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic contract sharing and management system based on a block chain, and relates to the field of block chain technology application. A contract management module; the front-end unit provides a user interaction interface, and the rear-end unit encapsulates a service function and interacts with the intelligent contract module; the file identification module is used for realizing process automation of the existing paper contract; the intelligent contract module is used for participating in a business process; the alliance chain bottom layer module is used for providing CA service and ensuring transaction consistency on an alliance block chain by improving a PBFT consensus algorithm; and the distributed storage module is used for storing on-chain data and off-chain data of the block chain. According to the method, an improved PBFT consensus algorithm is designed, a reputation scoring mechanism and a grouping mechanism are introduced, a main node selection strategy based on a VRF algorithm is used, consensus steps are optimized, the number of nodes participating in consensus can be dynamically adjusted, the communication frequency and response delay between the nodes are reduced, and the throughput is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application field of blockchain technology, and in particular to an electronic contract sharing and management system based on blockchain. Background Art

[0002] In the traditional electronic contracting process, there are still some problems with the security, management and storage of contract evidence. First, traditional electronic contract platforms usually use cloud servers to store and manage contract data. This centralized architecture is prone to problems such as single point failure risks, privacy and security risks, and easy tampering; secondly, the signing, execution and storage of contracts all rely on third-party institutions, which increases the complexity and cost of contract management.

[0003] Blockchain technology can be considered as a distributed database, which uses consensus mechanisms and encryption algorithms to ensure node consistency and system security. Its decentralization, immutability, transparency and openness make it widely used in many industries. In particular, the country has vigorously promoted the in-depth development of the digital economy in recent years, making blockchain applications attract much attention in recent years. Therefore, compared with the traditional electronic contract system, the blockchain-based electronic contract system has unique technical advantages, but there are also some problems that need to be solved urgently. For example, the use of the new platform is cumbersome. For example, the import of paper contracts into the platform still requires manual entry, and the interaction between users and the system is limited, resulting in low user acceptance; in addition, in the consensus process, the performance of the traditional Byzantine fault-tolerant algorithm is greatly affected by the number of nodes, and all nodes in the network need to participate in the consensus. When the number of nodes participating in the consensus on the chain is large, the efficiency and throughput of the algorithm will drop significantly, and the number of participants on the chain will be limited. Summary of the invention

[0004] In view of the above problems, the present invention proposes an electronic contract sharing and management system based on blockchain. The electronic contract system based on blockchain can protect contract transaction data in all aspects, reduce the participation of third-party services in the signing process, greatly reduce the risk of data being forged and tampered, and effectively solve the contract sharing problem between users in a safe and reliable environment, thereby greatly reducing the contract signing process and improving work efficiency. In view of this, the present invention proposes an OCR (Optical Character Recognition) + RPA (Robotic Process Automation) solution, which integrates the field of artificial intelligence with blockchain applications, can reduce the cumbersomeness of the platform, improve the platform's availability and user acceptability; at the same time, it uses a consensus algorithm suitable for the blockchain electronic contract platform, introduces a reputation scoring mechanism and a grouping mechanism, and uses a master node selection strategy based on the VRF (Verifiable Random Function) algorithm to reduce the algorithm convergence speed and improve throughput.

[0005] An electronic contract sharing and management system based on blockchain, comprising:

[0006] The contract management module receives contract management business operations performed by users through the user interaction interface provided by the client application module, and processes contract management business through the encapsulation function of the client application module.

[0007] The client application module includes a front-end unit and a back-end unit; the front-end unit provides a user interaction interface for the contract management module; the back-end unit uses the business layer database to store the contract signatory information, contract version information and the corresponding relationship between the on-chain and off-chain storage of the alliance blockchain, and encapsulates and implements the contract metadata query and contract download functions, and uses the alliance blockchain SDK to interact with the smart contract module on the alliance blockchain.

[0008] The document recognition module includes an OCR unit and an RPA unit; the OCR unit automatically recognizes and extracts the scanned contract materials, and the RPA unit automatically processes specific information in the recognized contract text according to pre-set rules and processes.

[0009] The smart contract module includes contract chaining contract functions, contract signing contract functions, contract tracing contract functions and contract arbitration contract functions; the smart contract module participates in business processes based on functions, and accesses the alliance blockchain SDK through the client application module to provide services to users, including contract creation, signing, tracing and arbitration.

[0010] The underlying module of the alliance chain includes a CA service unit and an improved PBFT consensus unit; the CA service unit is used to issue node certificates and permissions to call smart contract modules to registered users who have passed the review; the improved PBFT consensus unit uses an improved PBFT consensus algorithm to ensure the consistency of transactions on the alliance blockchain; among them, the improved PBFT consensus algorithm adopts a reputation grouping mechanism, a master node selection strategy based on the VRF algorithm, and an improved PBFT consensus step.

[0011] The distributed data storage module includes a blockchain unit and an IPFS unit; the blockchain unit is used for data storage on the alliance blockchain, and the IPFS unit is used for distributed file storage under the alliance blockchain.

[0012] Preferably, it also includes a user management module, which receives user management business operations through the user interaction interface provided by the client application module, and processes user management business through the encapsulation function of the client application module; the user management business includes user login business, user registration business and CA certificate application business.

[0013] Preferably, the contract management service includes a contract creation service, a contract downloading service, a contract identification service, a contract signing service, a contract tracing service and a contract arbitration service.

[0014] Preferably, the OCR function of the OCR unit is based on a CRNN recognition model.

[0015] Preferably, the reputation grouping mechanism is as follows:

[0016] According to the high-quality index normalization method, D ij =-d jmin / (d jmax -d jmin ), where D ij is the detection value of the jth high-quality index in the i-th node, d jmax is the maximum value of the jth high-quality index in the cluster node, d jmin It is the minimum value of the jth high-quality index among the cluster nodes.

[0017] According to the low-optimal index normalization method, D ik =-(d ik -d kmax ) / (d kmax -d kmin ), where D ik is the kth low-optimality index detection value in the i-th node, d kmax is the maximum value of the kth low-optimality index in the cluster node, d kmin is the minimum value of the kth low-optimality index among the cluster nodes, d ik is the actual measurement value of the i-th node.

[0018] Therefore, the reputation score R(i) of the i-th node in the cluster is: Among them, β1 and β2 are weight factors, m1 represents the number of high-quality indicators, and m2 represents the number of low-quality indicators; the historical performance of the i-th node in the t+ round of consensus is divided into Among them, S(t) represents the historical performance score of the i-th node in the t-th round of consensus; the historical performance scores of all nodes are used as the basis for consensus node updates. The node update will divide the nodes into consensus node groups and observer node groups according to the proportion; among them, observer nodes only participate in storage verification and do not participate in on-chain consensus.

[0019] Preferably, the master node selection strategy based on the VRF algorithm is as follows:

[0020] When the master node times out or exhibits malicious behavior, the view is switched and the VRF algorithm is used to generate a node with a higher reputation score in the consensus node group as the new master node; first, the Ed25519 algorithm is used to generate a node key pair (pki ,sk i ), then generate a random number n through the Vrf() function i And zero-knowledge proof p i :Vrf(seed,sk i )=(n i ,p i ), where seed represents the seed value; finally, each node in the consensus node group uses the Vrf_Proof() function to verify the random number n generated by node i i : Result = Vrf_Proof(seed, pk i ,n i ,p i ); If the result Result returns true, node i is selected as the master node.

[0021] Preferably, the improved PBFT consensus steps are as follows:

[0022] S1, first, the blockchain client obtains the transaction list from the transaction pool and sends a request packet to the master node<<

[0023] request,m,t,c>σ c >, where t represents the transaction timestamp, σ c The client signature and m message content, c represents the client identifier;

[0024] S2, after the master node responds to the blockchain client request, it enters the pre-preparation phase; the master node builds a pre-preparation message <<pre-prepare,v,n,d(m)> σ p ,m> and broadcast it to all replica nodes, where v is the view number, n is the sequence number, d(m) represents the message digest, σ p Sign on behalf of the masternode;

[0025] S3: After the replica node successfully receives the pre-prepare message from the master node, it generates a preparation phase message

[0026] <<prepare,v,n,d(m),i> σ i > and broadcast to other nodes, where i is the node number and σ i Represents the signature of node i;

[0027] S4, if the preparation phase message passes the check, all nodes enter the verification phase; in this phase, each node verifies the preparation phase message and responds with a message <<review,v,n,d(m),i> σ i,m> is packaged to the master node and the node reputation score is updated at the same time; when the master node receives more than 2F+1 identical verification response messages, it is considered to have reached a consensus, where F represents the maximum number of Byzantine fault nodes that the system can tolerate;

[0028] S5, in the reply phase, the master node provides the judgment result to all nodes <<reply,v,n,d(m)> σ i >Finally, the request processing result is sent to the blockchain client, and the valid transaction is written into the block of the blockchain.

[0029] Preferably, the contract on-chain contract function performs contract notarization for valid signed contracts. The valid signed contract will initiate contract notarization, the contract metadata will be hashed, and a new block will be generated on the alliance blockchain to store the contract data; the contract signing contract function accepts the hash value of the contract as a parameter and stores the signature information; the contract tracing contract function is used for contract tracing and validity verification, and compares the uploaded contract metadata with the on-chain hash. If it does not exist, it means that the contract is invalid or has been tampered with; the contract arbitration contract function provides a contract arbitration function to handle and resolve disputes arising during the execution of the contract.

[0030] Preferably, the effective signature adopts the ABA model, that is, end A initiates the contract signing, end B confirms the signing, and end A finally confirms; when the contract signing is completed, a unique contract ID is generated, and the contracting parties can query and download the contract on the contract management page, or call the smart contract to verify the contract status.

[0031] Preferably, the blockchain unit is used for data storage on the alliance blockchain, and the IPFS unit is used for distributed file storage under the alliance blockchain, as follows:

[0032] The data stored on the alliance blockchain is the shared contract metadata and the CID for obtaining the contract file. Other data is stored in the distributed file system IPFS, and the CID is used to download the data when needed. Users can choose whether to encrypt the contract metadata. If not encrypted, it is a public contract, and any node can obtain the CID to IPFS to obtain the contract file. If the user uses public key encryption, only the parties to the contract can decrypt it with their private keys to obtain the CID and thus the contract file.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] (1) The present invention designs an improved PBFT consensus algorithm suitable for a blockchain electronic signing platform. By introducing a reputation scoring mechanism and a grouping mechanism, using a master node selection strategy based on a VRF algorithm, and optimizing the consensus steps, the number of nodes participating in the consensus can be dynamically adjusted, the communication frequency and response delay between nodes can be reduced, the algorithm convergence speed can be reduced, and the throughput can be improved.

[0035] (2) The present invention proposes an OCR+RPA solution, which integrates the field of artificial intelligence with blockchain applications, realizes the automated storage and management of paper evidence, improves the platform's usability and user acceptability, reduces the platform's complexity, and greatly reduces the platform's use cost;

[0036] (3) The present invention is based on the transaction environment of blockchain and uses smart contracts to replace traditional third-party service providers, which can make the contract signing process more transparent and credible;

[0037] (4) The present invention adopts distributed storage, including data storage on the blockchain and IPFS distributed file storage under the blockchain, which further ensures the security of contract documents while ensuring decentralized storage and non-tamperability of contracts;

[0038] (5) The present invention builds the bottom layer of the alliance blockchain, sets up a certain access mechanism for participants, and provides a trusted electronic signing environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The present invention is further described in detail below in conjunction with the accompanying drawings;

[0040] Figure 1 This is a structural block diagram of an electronic contract sharing and management system based on blockchain according to an embodiment of the present invention;

[0041] Figure 2 It is a general flow chart of the improved PBFT algorithm of the blockchain-based electronic contract sharing and management system according to an embodiment of the present invention;

[0042] Figure 3 It is a schematic diagram of the message transmission process of the improved PBFT consensus step of the blockchain-based electronic contract sharing and management system according to an embodiment of the present invention;

[0043] Figure 4 This is a comparison chart of the communication volume between the improved PBFT algorithm and the traditional PBFT algorithm in an embodiment of the present invention; DETAILED DESCRIPTION

[0044] The present invention is further described below through specific implementation modes.

[0045] like Figure 1As shown, the present invention discloses an electronic contract sharing and management system based on blockchain, including:

[0046] The user management module allows users to perform user management business operations through the user interaction interface provided by the client application module, and processes user management business through the encapsulation function of the client application module. The user management business includes user login business, user registration business and CA (Certificate Authority) certificate application business.

[0047] The contract management module receives contract management business operations performed by users through the user interaction interface provided by the client application module, and processes contract management business through the encapsulation function of the client application module. The contract management business includes contract creation business, contract download business, contract identification business, contract signing business, contract tracing business and contract arbitration business.

[0048] Among them, in the contract creation business, users have three ways to create contracts:

[0049] Method 1: The contract template data structure is written into the database by the Prisma client, and the user fills in the form to generate a contract PDF file.

[0050] Method 2: Users upload local files in supported formats including word, pdf and png, which are converted to pdf format during signing. Content detection is performed during the file upload stage to prevent the generation of illegal content.

[0051] Method three: scan paper contracts for OCR+RPA automated recognition and extraction.

[0052] Among them, method one and method two use plug-ins to preview contract documents, add digital signatures and digital seals, etc.

[0053] The client application module includes a front-end unit and a back-end unit. The front-end unit provides a user interaction interface for the user management module and the contract management module based on React and Tailwind. The front-end interface includes the application homepage, login and registration page, contract management, creation, signing, traceability, and arbitration pages. The back-end unit uses Go gin to write a Restful interface, with MySQL as the business layer database and Redis as the cache database. It stores the contract signatory information, contract version information, and the corresponding relationship between the on-chain and off-chain storage of the alliance blockchain, encapsulates and implements user login and registration, user authentication, metadata query, and contract download functions, and uses the SDK (Software Development Kit) provided by chainmaker to interact with the smart contract module on the blockchain.

[0054] The document recognition module, including the OCR unit and the RPA unit, is used to realize the process automation of existing paper contract materials; the OCR unit automatically recognizes and extracts the scanned contract materials, and the RPA unit is used to automatically process specific information in the recognized contract text according to pre-set rules and processes; among them, the OCR function is based on the CRNN (Convolutional Recurrent Neural Network) recognition model.

[0055] Specifically, the terminal device can scan paper contract materials and convert them into electronic logical information, automatically identify and extract contract information, and then transmit it to the OCR service to obtain the contract text information; then use RPA technology to extract specific information in the contract text, save the contract record on the blockchain by calling the smart contract, and store the scanned file in IPFS (InterPlanetary File System), thereby automating the existing paper contract process.

[0056] The smart contract module includes the contract chaining contract function, the contract signing contract function, the contract tracing contract function and the contract arbitration contract function; the smart contract module participates in the business process based on the function, and provides services to users through the client application module to access the alliance blockchain SDK, including the creation, signing, tracing and arbitration of contracts. The business process in which the smart contract module participates does not require third-party intervention and relies on the automatic execution of smart contracts. The smart contract functions in the smart contract module are written in GO language.

[0057] The contract on-chain contract function stores the valid signed contract. Specifically, the valid signed contract will initiate contract storage, the contract metadata will be hashed, and a new block will be generated on the alliance blockchain to store the contract data.

[0058] The effective signing needs to go through the ABA model, that is, end A initiates the contract signing, end B confirms the signing, and end A finally confirms it; for unfinished signing, the platform will notify the user in the form of message, email, or SMS; when the contract signing is completed, a unique contract ID is generated, and the contracting parties can query and download the contract on the contract management page, or call the smart contract to verify the contract status.

[0059] The contract signing function accepts the hash value of the contract as a parameter and stores the signature information.

[0060] The contract traceability contract function is used to trace the source and verify the validity of the contract. The uploaded contract metadata is compared with the on-chain hash. If it does not exist, it means that the contract is invalid or has been tampered with.

[0061] The contract arbitration contract function provides a contract arbitration function to handle and resolve disputes arising during the execution of the contract.

[0062] The smart contract module also includes a user registration function, which applies for a certificate for a newly registered user. If the user has already registered, an exception is thrown.

[0063] The underlying module of the alliance chain includes a CA service unit and an improved PBFT consensus unit; the CA service unit is used to issue node certificates and permissions to call smart contract modules to registered users who have passed the review; the improved PBFT consensus unit uses an improved PBFT consensus algorithm to ensure the consistency of transactions on the alliance blockchain; among them, the improved PBFT consensus algorithm adopts a reputation grouping mechanism, a master node selection strategy based on the VRF algorithm, and an improved PBFT consensus step.

[0064] Specifically, we use chainmaker as the underlying technology to build a consortium blockchain and improve the traditional practical Byzantine fault tolerance algorithm.

[0065] (Practical Byzantine Fault Tolerance, PBFT), and adopts an improved PBFT algorithm to ensure the consistency of transactions on the chain; set up a certain access mechanism for participants to provide a trusted signing environment. During the user registration phase, the user enters the identity information, face information and enterprise information for real-name identity authentication, and submits it to the backend service for review. After the review is passed, the node certificate is issued through the CA service, giving users with valid certificates the authority to call smart contracts.

[0066] like Figure 2 As shown in the figure, the improved PBFT consensus algorithm introduces a reputation grouping mechanism into the traditional PBFT, as follows:

[0067] According to the high-quality index normalization method, D ij =-d jmin / (d jmax -d jmin ), where D ij is the detection value of the jth high-quality index in the i-th node, d jmax is the maximum value of the jth high-quality index in the cluster node, d jmin It is the minimum value of the jth high-quality index among the cluster nodes.

[0068] According to the low-optimal index normalization method, D ik =-(d ik -d kmax ) / (d kmax -d kmin ), where D ik is the kth low-optimality index detection value in the i-th node, dkmax is the maximum value of the kth low-optimality index in the cluster node, d kmin is the minimum value of the kth low-optimality index among the cluster nodes, d ik is the actual measurement value of the i-th node.

[0069] Therefore, the reputation score R(i) of the i-th node in the cluster is: Among them, β1 and β2 are weight factors, m1 represents the number of high-quality indicators, and m2 represents the number of low-quality indicators; the historical performance of the i-th node in the t+1 round of consensus is divided into Among them, Si(t) represents the historical performance score of the i-th node in the t-th round of consensus; the historical performance scores of all nodes are used as the basis for consensus node updates. Node updates will divide nodes into consensus node groups and observer node groups according to the proportion; among them, observer nodes only participate in storage verification and do not participate in on-chain consensus.

[0070] The master node selection strategy based on the VRF algorithm is as follows:

[0071] When the master node times out or exhibits malicious behavior, the view is switched and the VRF algorithm is used to generate a node with a higher reputation score in the consensus group as the new master node. First, the Ed25519 algorithm is used to generate a node key pair (pk i ,sk i ), then generate a random number n through the Vrf() function i And zero-knowledge proof p i :Vrf(seed,sk i )=(n i ,p i ). Finally, each node in the consensus group verifies the random number n generated by node i using the Vrf_Proof() function i : Result = Vrf_Proof(seed, pk i ,n i ,p i ). If the result returns true, node i is selected as the primary node.

[0072] like Figure 3 As shown in the figure, the improved PBFT consensus steps of the improved PBFT consensus algorithm are as follows:

[0073] S1, first, the blockchain client obtains the transaction list from the transaction pool and sends a request packet to the master node<<

[0074] request,m,t,c>σ c >, where t represents the transaction timestamp, σ c The client signature and m message content, c represents the client identifier.

[0075] S2, after the master node responds to the blockchain client request, it enters the pre-preparation phase; the master node builds a pre-preparation message <<pre-prepare,v,n,d(m)> σ p ,m> and broadcast it to all replica nodes, where v is the view number, n is the sequence number, d(m) represents the message digest, σ p Sign on behalf of the masternode.

[0076] S3: After the replica node successfully receives the pre-prepare message from the master node, it generates a preparation phase message

[0077] <<prepare,v,n,d(m),i> σ i > and broadcast to other nodes, where i is the node number and σ i Represents the signature of node i.

[0078] S4, if the preparation phase message passes the check, all nodes enter the verification phase. In this phase, each node verifies the preparation phase message and responds with a message <<review,v,n,d(m),i> σ i ,m> is packaged to the master node and the node reputation score is updated at the same time. When the master node receives more than 2F+1 identical verification response messages, it is considered to have reached a consensus, where F represents the maximum number of Byzantine fault nodes that the system can tolerate.

[0079] S5, in the reply phase, the master node provides the judgment result to all nodes <<reply,v,n,d(m)> σ i >. Finally, the request processing result is sent to the blockchain client and the valid transaction is written into the block.

[0080] The original PBFT algorithm needs to verify the complete transaction list when verifying whether a consensus has been reached. However, the embodiment of the present invention optimizes the step of verifying the complete transaction list and only verifies the hash value of the transaction list, which can reduce the amount of data transmission to a certain extent. In the improved PBFT consensus step of the improved PBFT algorithm, the verification phase replaces the submission phase of the traditional PBFT algorithm, and only some nodes participate in the network consensus, thereby greatly reducing the consensus delay.

[0081] Figure 4The comparison of communication volume between improved PBFT and PBFT is shown. Under different node ratios, the algorithm presents different communication volumes. Since the improved PBFT algorithm is mainly designed for consortium blockchains, nodes need to be authenticated before joining the network, which will result in very few malicious nodes. Therefore, for systems with high node trust, the algorithm can adaptively adjust the consensus node ratio while meeting the requirements of consensus security and efficiency.

[0082] The distributed data storage module includes a blockchain unit and an IPFS unit; the blockchain unit is used for data storage on the alliance blockchain, and the IPFS unit is used for distributed file storage under the alliance blockchain to ensure data security.

[0083] Among them, the data stored on the alliance blockchain is the shared contract metadata and the CID (Content Identifier) ​​for obtaining the contract file. Other data is stored in the distributed file system IPFS through helia, and CID is used to download data when needed.

[0084] Among them, users can choose whether to encrypt the contract metadata. If not encrypted, it is a public contract, and any node can obtain the CID to IPFS to obtain the contract file; if the user uses public key encryption, only the parties to the contract can decrypt it with their private key to obtain the CID and thus obtain the contract file.

[0085] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A blockchain-based electronic contract sharing and management system, characterized in that: include: The contract management module receives the contract management business operations performed by the user through the user interaction interface provided by the client application module, and processes the contract management business through the encapsulation function of the client application module; The client application module includes a front-end unit and a back-end unit. The front-end unit provides a user interaction interface for the contract management module. The back-end unit uses the business layer database to store the contract signatory information, contract version information, and the corresponding relationship between the on-chain and off-chain storage of the alliance blockchain, and encapsulates and implements the contract metadata query and contract download functions, and uses the alliance blockchain SDK to interact with the smart contract module on the alliance blockchain. The document recognition module includes an OCR unit and an RPA unit. The OCR unit automatically recognizes and extracts the scanned contract documents, and the RPA unit automatically processes the specific information in the recognized contract text according to pre-set rules and processes. Smart contract module, including contract chaining contract function, contract signing contract function, contract tracing contract function and contract arbitration contract function; the smart contract module participates in the business process based on the function, and provides services to users through the client application module to access the alliance blockchain SDK, including contract creation, signing, tracing and arbitration; The underlying module of the alliance chain includes the CA service unit and the improved PBFT consensus unit; the CA service unit is used to issue node certificates and the authority to call the smart contract module to the registered users who have passed the review; The improved PBFT consensus unit uses the improved PBFT consensus algorithm to ensure the consistency of transactions on the alliance blockchain; the improved PBFT consensus algorithm adopts a reputation grouping mechanism, a master node selection strategy based on the VRF algorithm, and an improved PBFT consensus step; The distributed data storage module includes a blockchain unit and an IPFS unit; the blockchain unit is used for data storage on the alliance blockchain, and the IPFS unit is used for distributed file storage under the alliance blockchain.

2. According to the blockchain-based electronic contract sharing and management system of claim 1, it is characterized in that: It also includes a user management module, which receives user management business operations through the user interaction interface provided by the client application module, and processes user management business through the corresponding functions encapsulated by the client application module; the user management business includes user login business, user registration business and CA certificate application business.

3. According to the blockchain-based electronic contract sharing and management system of claim 1, it is characterized in that: The contract management service includes contract creation service, contract download service, contract identification service, contract signing service, contract tracing service and contract arbitration service.

4. The blockchain-based electronic contract sharing and management system according to claim 1 is characterized in that: The OCR function of the OCR unit is based on the CRNN recognition model.

5. According to the blockchain-based electronic contract sharing and management system of claim 1, it is characterized in that: The reputation grouping mechanism is as follows: According to the high-quality index normalization method, D ij =-d jmin / (d jmax -d jmin ), where D ij is the detection value of the jth high-quality index in the i-th node, d jmax is the maximum value of the jth high-quality index in the cluster node, d jmin is the minimum value of the jth high-quality index among the cluster nodes; According to the low-optimal index normalization method, D ik =-(d ik -d kmax ) / (d kmax -d kmin ), where D ik is the kth low-optimality index detection value in the i-th node, d kmax is the maximum value of the kth low-optimality index in the cluster node, d kmin is the minimum value of the kth low-optimality index among the cluster nodes, d ik is the actual measurement value of the i-th node; Therefore, the reputation score R(i) of the i-th node in the cluster is: Among them, β1 and β2 are weight factors, m1 represents the number of high-quality indicators, and m2 represents the number of low-quality indicators; the historical performance of the i-th node in the t+1 round of consensus is divided into Among them, S i (t) represents the historical performance score of the i-th node in the t-th round of consensus. The historical performance scores of all nodes are used as the basis for consensus node updates. Node updates will divide nodes into consensus node groups and observer node groups in proportion. Among them, observer nodes only participate in storage verification and do not participate in on-chain consensus.

6. The blockchain-based electronic contract sharing and management system according to claim 4 is characterized in that: The master node selection strategy based on the VRF algorithm is as follows: When the master node times out or exhibits malicious behavior, the view is switched and the VRF algorithm is used to generate a node with a higher reputation score in the consensus node group as the new master node; first, the Ed25519 algorithm is used to generate a node key pair (pk i ,sk i ), then generate a random number n through the Vrf() function i And zero-knowledge proof p i :Vrf(seed,sk i )=(n i ,p i ), where seed represents the seed value; finally, each node in the consensus node group uses the Vrf_Proof() function to verify the random number n generated by node i i : Result = Vrf_Proof(seed, pk i ,n i ,p i ); If the result Result returns true, node i is selected as the master node.

7. The blockchain-based electronic contract sharing and management system according to claim 5 is characterized in that: The steps for improving the PBFT consensus are as follows: S1, first, the blockchain client obtains the transaction list from the transaction pool and sends a request packet to the master node<< request,m,t,c>σ c >, where t represents the transaction timestamp, σ c The client signature and m message content, c represents the client identifier; S2, after the master node responds to the blockchain client request, it enters the pre-preparation phase; the master node builds a pre-preparation message <<pre-prepare,v,n,d(m)> σ p ,m> and broadcast it to all replica nodes, where v is the view number, n is the sequence number, d(m) represents the message digest, σ p Sign on behalf of the masternode; S3, after the replica node successfully receives the pre-prepare message from the master node, it generates a preparation phase message <<prepare,v,n,d(m),i> σ i > and broadcast to other nodes, where i is the node number and σ i Represents the signature of node i; S4, if the preparation phase message passes the check, all nodes enter the verification phase; in this phase, each node verifies the preparation phase message and responds with a message <<review,v,n,d(m),i> σ i ,m> is packaged to the master node and the node reputation score is updated at the same time; when the master node receives more than 2F+1 identical verification response messages, it is considered to have reached a consensus, where F represents the maximum number of Byzantine fault nodes that the system can tolerate; S5, in the reply phase, the master node provides the judgment result to all nodes <<reply,v,n,d(m)> σ i >Finally, the request processing result is sent to the blockchain client, and the valid transaction is written into the block of the blockchain.

8. The blockchain-based electronic contract sharing and management system according to claim 1 is characterized in that: The contract on-chain contract function stores the valid signed contract. The valid signed contract will initiate contract storage, hash the contract metadata, and generate a new block on the alliance blockchain to store the contract data; the contract signing contract function accepts the hash value of the contract as a parameter and stores the signature information; the contract tracing contract function is used for contract tracing and validity verification, and compares the uploaded contract metadata with the on-chain hash. If it does not exist, it means that the contract is invalid or has been tampered with; The contract arbitration contract function provides a contract arbitration function to handle and resolve disputes arising during the execution of the contract.

9. The blockchain-based electronic contract sharing and management system according to claim 8 is characterized in that: The effective signature adopts the ABA model, that is, end A initiates the contract signing, end B confirms the signature, and end A finally confirms it; when the contract signing is completed, a unique contract ID is generated, and the contracting parties can query and download the contract on the contract management page, or call the smart contract to verify the contract status.

10. The blockchain-based electronic contract sharing and management system according to claim 1 is characterized in that: The blockchain unit is used for data storage on the alliance blockchain, and the IPFS unit is used for distributed file storage under the alliance blockchain, as follows: The data stored on the alliance blockchain is the shared contract metadata and the CID for obtaining the contract file. Other data is stored in the distributed file system IPFS, and the CID is used to download the data when needed. Users can choose whether to encrypt the contract metadata. If not encrypted, it is a public contract, and any node can obtain the CID to IPFS to obtain the contract file. If the user uses public key encryption, only the parties to the contract can decrypt it with their private keys to obtain the CID and thus the contract file.

Citation Information

Cited By

  • Block chain-driven data link credible evidence storage method and system

    CN120528650A

  • Blockchain-driven data link trusted evidence method and system

    CN120528650B

  • Internet of vehicles security data collection and verification framework construction method based on block chain

    CN120880727A