Block chain-oriented transaction fault-tolerant two-party data collaborative exchange method and system
By employing mechanisms such as flexible address reconstruction, authorization credential activation and reconstruction, time locks, and on-chain recoverable paths, the system addresses issues in blockchain transactions such as fixed public keys for receiving transactions, the need for both parties to remain online, incomplete anomaly recovery, and difficulty in adjusting authorization credentials. This enables free replacement of the receiving end, stable processes, and automatic rollback of transaction timeout failures, thereby improving transaction fault tolerance and post-exchange flexibility.
Patent Information
- Application Number
- CN202511926801.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-02-13
AI Technical Summary
Existing blockchain technologies suffer from several problems, including fixed and inflexible public keys, the need for both parties to remain online continuously, inadequate anomaly recovery, and fixed authorization credential structures that are difficult to adjust. These issues lead to unstable transaction processes and insufficient fault tolerance.
It employs mechanisms such as flexible address reconstruction, authorization credential activation and reconstruction, time locks and on-chain recoverable paths to enable free replacement of the receiving end, stable process, and automatic rollback of transaction timeout failures, all monitored and controlled through smart contracts.
It enables free replacement and expansion of the receiving end, stable process, automatic rollback of transaction timeout failure, and improves transaction fault tolerance and post-exchange flexibility.
Smart Images

Figure CN121530573A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain technology, specifically relating to a method and system for fault-tolerant two-party data collaborative exchange in blockchain transactions. Background Technology
[0002] With the deep application of blockchain technology across various industries, trusted data exchange based on blockchain is gradually becoming a key requirement. In traditional centralized models, data exchange often relies on trusted third parties for scheduling, verification, and confirmation, which not only incurs high costs but also introduces the risks of single points of failure and data leakage. Blockchain's traceability, immutability, and decentralized characteristics provide a new infrastructure for data exchange, enabling both parties to complete data exchanges without mutual trust, thereby reducing centralized risks and improving data flow efficiency.
[0003] However, existing technologies have the following shortcomings: they rely on a preset fixed public key, and cannot flexibly change the receiving end when the private key is lost or the permissions are invalid; they require continuous online cooperation between both parties, and network failures, equipment abnormalities, or malicious behavior can cause the process to be interrupted; the on-chain state cannot express complex stage switching logic, and cannot reasonably refund or compensate when transactions are abnormal; the authorization certificate structure is fixed, making it difficult to modify the public key, expand the authorization scope, or supplement verification.
[0004] Therefore, a new method is urgently needed. Summary of the Invention
[0005] The purpose of this invention is to provide a blockchain-based fault-tolerant two-party data collaborative exchange method and system. This method overcomes the shortcomings of existing technologies, such as fixed public keys for receiving data, the need for both parties to be continuously online, imperfect anomaly recovery, and difficulty in adjusting authorization credentials, through mechanisms such as flexible address reconstruction, authorization credential activation and reconstruction, time locks, and on-chain recoverable paths. It enables free replacement and expansion of the receiving end, stable process, automatic rollback of transaction timeout failures, and improves flexibility and transaction fault tolerance after exchange.
[0006] To achieve the above objectives, this invention provides a method and system for fault-tolerant two-party data collaborative exchange in blockchain transactions, comprising the following steps: S1, Party A Party B Each is a large prime number of order. In a cyclic addition group, the master private control parameter and the group generator are randomly selected. The scalar multiplication generates the master public key, and both parties retain their own key materials; S2. Generate the main control unit public key based on the group addition operation of the master public keys of both Party A and Party B. Through private transformation factors and the public key of the main control unit, generators Linear operations generate the public key from the control unit, Party A. Verify the validity of the public key from the control unit and construct a dual control unit architecture; S3. Both parties A and B generate public parameters for the recovery certificate and the recovery certificate component corresponding to the rollback transaction, and complete the two-way transmission through the secure channel. S4. Both parties, A and B, lock the data to their respective on-chain accounts in the control unit and submit a parameter tuple to the smart contract containing the public key of the main control unit, the public key of the slave control unit, the dual timeout period threshold, and the hash values of both parties' data. The contract's initial state is LOCKED; S5, Party B Generate an authorization commitment and partial authorization code and send them to Party A. Party A The smart contract generates a complete authorization code by integrating its own private control parameters. After verifying the legality of the authorization through group operation, the smart contract executes the target operation and updates the contract status to STAGE1_COMPLETE. This process does not require both parties to be continuously online. S6, Party B Based on the complete authorization code, its own key material, and private transformation factor, the complete control parameters of the main control unit and the slave control unit are reconstructed through modular inverse operation and linear operation to realize the legal handover of permissions and support the free replacement of the receiving end and the expansion of the authorization range; S7, Party B Based on the generation of a new public commitment and a new final authorization code from the complete control parameters of the control unit, after the smart contract is verified, the data of Party A is released to the new target address, and the contract status is updated to FINAL. S8. The smart contract monitors the on-chain time in real time. If the corresponding stage operation is not completed within the time limit, the corresponding recovery path is triggered. After Party B or Party A submits the recovery certificate, the contract generates a challenge value through hash calculation and verifies the legality of the certificate, and executes the rollback or refund operation. S9. Smart contracts prevent rollback and refund requests from being executed simultaneously through built-in logic. When the contract state is FINAL, REFUND_A or ROLLBACK_B, a resource cleanup procedure is triggered to release storage space and ensure a closed loop in the contract lifecycle. The contract uses built-in logic to monitor the call requests of the RollbackB and refundA methods to prevent them from being executed simultaneously within the same lifecycle. The resource cleanup procedure is triggered when the contract state is FINAL, REFUND_A, or ROLLBACK_B, releasing storage space and marking the end of the lifecycle.
[0007] Preferably, in S1, Party A Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, Party A Master privacy control parameters; Party A The master public key; Party B Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, For Party B Master privacy control parameters; For Party B The master public key.
[0008] Preferably, in S2, the public key of the main control unit is represented as follows: ; In the formula, The public key of the main control unit; The public key from the control unit is represented as: ; In the formula, For the public key of the control unit; This linear generation method strongly binds the public key of the slave control unit to the public key of the master control unit, ensuring the consistency of the dual control unit architecture.
[0009] Preferably, in S3, the public parameters of the Party A's restoration certificate are expressed as follows: ; In the formula, The parameters of the recovery certificate generated by Party A are disclosed. Restore voucher components, represented as: ; In the formula, Party A The quantity of the recovery certificate; Party A Private random parameters that are kept in their own possession; For cryptographic hash functions; The parameters for Party B's restoration of the certificate of public disclosure are as follows: ; In the formula, For Party B Private random parameters that are kept in their own possession; For Party B The generated recovery certificate discloses the parameters; Restore voucher components, represented as: ; In the formula, For Party B The quantity of the recovery certificate; Two-way transmission of recovery credentials is achieved through an encrypted secure channel.
[0010] Preferably, in S4, the parameter tuple is calculated using the following formula: ; In the formula, This is a parameter tuple for the smart contract; The time threshold for the first timeout period; This is the time threshold for the second timeout period; Data for Party A The hash value; For Party B's data The hash value; This is a cryptographic hash function.
[0011] Preferably, in S5, the authorization commitment of Party B is expressed as follows: ; In the formula, For Party B The generated authorization commitment; For Party B Temporary control factors kept in self-management; Partial authorization code, represented as: ; In the formula, For Party B The generated partial authorization code; Party A The target operation identifier; the hash value is determined by the target operation. With promise After concatenation, it is hashed using a cryptographic hash function. Calculated; The complete authorization code from Party A is represented as: ; In the formula, Party A The generated complete authorization code; The contract verification equation is expressed as: ; In the formula, The public key of the main control unit.
[0012] Preferably, in S6, the complete control parameters of the main control unit are expressed as follows: ; In the formula, Complete control parameters for the main control unit; This indicates that the entire calculation is performed on a large prime number. integer field Execution within; Complete control parameters from the control unit , is represented as: .
[0013] Preferably, in S7, the new final license code ; In the formula, A new final authorization code generated for Party B; For Party B From the integer field Private random parameters randomly selected from the data; For Party B The newly constructed target operation identifier; For Party B New public commitments generated; The contract verification equation is expressed as: ; In the formula, This is the public key from the control unit.
[0014] Preferably, in S8, the rollback trigger condition for Party B is if And the contract status is LOCKED; The contract calculates the challenge value, expressed as: ; In the formula, The challenge value calculated for smart contracts; In order to target Party B The rollback transaction identifier; Party A The generated recovery certificate discloses the parameters; The verification equation is expressed as: ; In the formula, Party A The generated recovery voucher components; The conditions for Party A to refund are as follows: And the contract status is LOCKED or STAGE1_COMPLETE; Challenge value, represented as: ; In the formula, The challenge value for a refund transaction for the client, calculated for the smart contract; In response to Party A Refund transaction identifier; For Party B The generated recovery certificate discloses the parameters; The verification equation is expressed as: ; In the formula, For Party B The generated recovery voucher components; For Party B The generated recovery certificate discloses the parameters.
[0015] This invention also provides a blockchain-based transaction fault-tolerant two-party data collaborative exchange system, comprising: The key initialization module is used to execute S1, which supports both parties to generate master private control parameters and master public key in a cyclic addition group, retain key materials, and realize trusted identity binding; The control unit public key generation and verification module is connected to the key initialization module and is used to execute S2 to generate a master control unit public key based on the master public keys of both parties, support the B party to generate a slave control unit public key and provide a validity verification interface, and build a dual control unit architecture; The smart contract registration module is connected to the public key generation and verification module of the control unit. It is used to execute S3, support both parties to generate public parameters and components of recovery credentials, and complete bidirectional transmission through an encrypted secure channel to provide a basis for abnormal recovery. The data locking module, connected to the smart contract registration module, is used to execute S4, enabling both parties to lock data to the corresponding control unit account and submit parameter tuples to the smart contract. This triggers the contract to initialize to the LOCKED state; The partial authorization code generation module, connected to the data locking module, is used to execute S5, supporting the B party to generate an authorization commitment and a partial authorization code, which are then transmitted to the A party through a secure channel to complete the authorization initialization. The complete authorization code generation module is connected to the partial authorization code generation module and is used to execute S6. It supports the client in generating a complete authorization code and submitting it for contract verification. After the verification is successful, the target operation is executed and the contract status is updated. The dual control unit complete control parameter reconstruction module is connected to the complete authorization code generation module and is used to execute S7. It supports the B party to reconstruct the complete control parameters of the main control unit and the slave control unit based on the complete authorization code and private factors, so as to realize the legal inheritance of permissions. The new operation authorization code generation module is connected to the complete control parameter reconstruction module of the dual control unit. It is used to execute S8, support the B party to generate a new public commitment and a new authorization code, and release the A party's data to the new target address after the contract verification is passed. The timeout fault tolerance rollback module is connected to the new operation authorization code generation module and is used to execute S9. It supports smart contract monitoring of timeouts and triggering of recovery paths. After verifying the legality of the recovery certificate, it executes rollback / refund to avoid request conflicts and trigger resource cleanup.
[0016] Therefore, the present invention employs the aforementioned blockchain-oriented transaction fault-tolerant two-party data collaborative exchange method and system. Compared with the prior art, the technical solution of the present invention has the following beneficial effects: (1) Adopting a flexible address reconstruction mechanism overcomes the problem that the existing technology has a fixed public key and cannot be flexibly replaced, realizes the free replacement and expansion of the public key / receiving end, breaks the fixed parameter limitation, and improves transaction fault tolerance; (2) By relying on the authorization certificate activation and reconstruction mechanism, the shortcomings of requiring continuous online collaboration between the two parties are overcome, so that steps such as address change and abnormal recovery do not require both parties to be online at the same time, which significantly improves the stability of the process; (3) By using time lock and on-chain recoverable path technology, the problem of imperfect recovery mechanism when transactions are abnormal is solved, and automatic rollback and data return are achieved when transactions time out or fail, thus improving the ability to recover from abnormalities. (4) By using the reconfigurable authorization certificate mechanism, the shortcomings of the original authorization certificate structure being fixed and difficult to adjust later are overcome, and operations such as modifying the receiving address and expanding the authorization scope are supported, thereby improving the flexibility after the exchange.
[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0018] Figure 1 This is a flowchart of an embodiment of a blockchain-oriented transaction fault-tolerant two-party data collaborative exchange method and system. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, the technical or scientific terms used in the present invention should have the ordinary meaning understood by those skilled in the art.
[0020] Example 1 like Figure 1 As shown, this embodiment provides a method and system for collaborative data exchange between two parties in blockchain transactions with fault tolerance. It should be understood that the specific parameters, models and protocols mentioned in this embodiment are merely examples to help those skilled in the art understand the present invention, and are not intended to limit the present invention.
[0021] The present invention provides a blockchain-based fault-tolerant two-party data collaborative exchange method and system, comprising the following steps: Assume there are two parties involved in the collaborative data exchange: Party A. and Party B Party A Hoping to use the data on its blockchain With Party B Data on the blockchain Peer-to-peer exchange is conducted. Dedicated smart contracts have been deployed in the blockchain network. This contract will act as the state machine and validator for transactions, automating the entire data exchange process. set up For a large prime number The cyclic additive group, whose generator is Furthermore, the discrete logarithm problem on this group is computationally difficult; Define a cryptographic hash function Its behavior is similar to that of a random oracle, ensuring the randomness and irreversibility of the hash result; Smart contracts deployed on the blockchain have the capabilities of state storage, logic verification, and automatic execution, providing reliable support for the entire transaction process; S1, Party A Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, Party A Master privacy control parameters; Party A The master public key; Party B Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, For Party B Master privacy control parameters; For Party B The master public key; Both parties retain their own key materials to provide basic data for subsequent collaborative operations; S2, based on the two parties , The public key for the shared computing main control unit (MCU) is represented as follows: ; In the formula, The public key of the main control unit; Party B Generate private transformation factor The public key representation of the control unit (SCU) is calculated as follows: ; In the formula, For the public key of the control unit; And The calculation basis is transmitted to Party A. ; verify Whether by and Linear derivation is used to complete data validity verification. S3, Party A From the integer field Randomly select a parameter First, obtain through calculation The formula is: ; In the formula, The parameters of the recovery certificate generated by Party A are disclosed. Simultaneously for transactions used for rollback Construct the corresponding voucher components The calculation method for the voucher's weight is as follows: ; In the formula, Party A The quantity of the recovery certificate; Party A Private random parameters that are kept in their own possession; For cryptographic hash functions; The hash value is generated by the rollback transaction. and The concatenated result is then processed using a cryptographic hash function. Calculated; Ultimately, Party A Voucher components will be sent through the secure passage. and parameters The set Send to Party B ; Party B From the integer field Randomly select parameters First, obtain through calculation The formula is: ; In the formula, For Party B Private random parameters that are kept in their own possession; For Party B The generated recovery certificate discloses the parameters; Then rollback transaction Construct recovery certificate The calculation formula is: ; In the formula, For Party B The quantity of the recovery certificate; The hash value is generated by the rollback transaction. and After concatenation, it is hashed using a cryptographic hash function. Calculated; Finally, through the safe passage Passed to Party A This completes two-way data exchange with the recovery certificate previously sent by Party A; S4, Party A Data Locked to Controlled on-chain account, Party B Data Locked to Controlled on-chain account; both parties will exchange parameter tuples, calculated using the following formula: ; In the formula, This is a parameter tuple for the smart contract; The time threshold for the first timeout period; This is the time threshold for the second timeout period; Data for Party A The hash value; For Party B's data The hash value; The information is passed to the smart contract, which then calls the contract to complete the registration. The contract state S is initialized to LOCKED, thus realizing the transfer of asset information and parameters to the contract. S5, Party B From the integer field Randomly select temporary control factors First, the commitment is obtained through calculation. The calculation formula is: ; In the formula, For Party B The generated authorization commitment; For Party B Temporary control factors kept in self-management; Reconstruct partial authorization code The calculation formula is: ; In the formula, For Party B The generated partial authorization code; Party A The target operation identifier; the hash value is determined by the target operation. With promise After concatenation, it is hashed using a cryptographic hash function. Calculated; Finally, through the safe passage Passed to Party A This completes the one-way data transfer during the authorization initialization phase. S6, Party A take over Transmitted ,verify After validity is verified, the authorized component is calculated using the following formula: ; In the formula, Party A The generated complete authorization code; Authorize tuples Passed to the smart contract; contract verification is represented as: ; In the formula, The public key of the main control unit; Execute after verification ,Will Passed to At the same time, the status flag If set to TRUE, the contract state S is updated to STAGE1_COMPLETE; S7, Party B Obtain the signal with state flag F=TRUE from the chain, based on its own retention. , , , And received Execute the refactoring function The calculation formula is: ; In the formula, This is the complete control parameters from the control unit; For Party B The generated private transformation factor; The formula for calculating the MCU joint control parameters is as follows: ; In the formula, Complete control parameters for the main control unit; This indicates that the entire calculation is performed on a large prime number. integer field Execution within; The complete control parameters of the SCU are calculated using the following formula: ; Enables collaborative use of on-chain state data and historical transmitted data; S8, Party B With the acquired complete control parameters from the slave control unit (SCU) , for the new target address Construction operation identifier The core function of this operation is to connect Party A with Party B. Data to be exchanged Release to ; Subsequently, From the integer field Randomly select parameters ,pass with generator Multiplication calculation yields And generate the final authorization code. The calculation method is as follows: ; In the formula, A new final authorization code generated for Party B; For Party B From the integer field Private random parameters randomly selected from the data; For Party B The newly constructed target operation identifier; For Party B The generated public commitment; the hash value is generated by the new operation. and After concatenation, it is hashed using a cryptographic hash function. Calculated; then, Will The formula is passed to the smart contract; the smart contract will verify the formula as follows: ; In the formula, The public key from the control unit; Execute after verification , data Transfer to new target address At the same time, the contract status S is set to FINAL; S9, smart contracts continuously retrieve time data from the blockchain. ,like Furthermore, when the contract state S is LOCKED, the first recovery path is triggered, enabling real-time transmission and judgment of on-chain time data to the contract; S10, Party B Calling the RollbackB method of the smart contract will transfer the data previously transferred from Party A. Recovery certificate received at the location Submitted to the contract; the smart contract first calculates the challenge value, using the following formula: ; In the formula, The challenge value calculated for smart contracts; In order to target Party B The rollback transaction identifier; Party A The generated recovery certificate discloses the parameters; Re-verification: ; In the formula, Party A The generated recovery voucher components; After successful verification, the contract executes a rollback transaction. Party B The original data Transmit to its designated address, and simultaneously transmit the contract status. Set to ROLLBACK_B, which means the rollback is complete for Party B; S11, Smart Contracts continuously retrieve time data from the blockchain. ,like Furthermore, if the contract state S is LOCKED or STAGE1_COMPLETE, the second recovery path is triggered, which relies on on-chain time data and the contract's own state data to make the judgment. S12, Party A Calling the contract's refundA method will extract from... Recovery certificate received at the location The challenge value is passed to the contract; the smart contract first calculates the challenge value using the following formula: ; In the formula, The challenge value for a refund transaction for the client, calculated for the smart contract; In response to Party A Refund transaction identifier; For Party B The generated recovery certificate discloses the parameters; And verify: ; In the formula, For Party B The generated recovery voucher components; For Party B The generated recovery certificate discloses the parameters; Execute after verification ,Will Transmitted to Specified address, contract status Set to REFUND_A; S13. When the contract receives a signal that any recovery path (S10 or S12) has been successfully executed, it updates its own state S to FINAL, locks all subsequent operations, and realizes the transfer of recovery result data to the contract state. S14. The contract monitors the request data of S10 (RollbackB method call) and S12 (refundA method call) in real time, and avoids the two from being executed at the same time within the same contract lifecycle through built-in logic, thus completing the monitoring and processing of conflict detection data. S15. The contract continuously acquires its own state data, and when the state... When the value is FINAL, REFUND_A, or REFUND_B, a resource cleanup procedure is triggered to release storage space and mark the end of the contract's lifecycle, completing the cleanup trigger based on its own state data.
[0022] Therefore, the present invention adopts the above-mentioned blockchain-oriented transaction fault-tolerant two-party data collaborative exchange method and system. This method overcomes the shortcomings of existing technologies, such as fixed public key reception, requirement for both parties to be continuously online, imperfect abnormal recovery, and difficulty in adjusting authorization certificates, through flexible address reconstruction, authorization certificate activation and reconstruction, time lock and on-chain recoverable path mechanisms. It realizes free replacement and expansion of the receiving end, stable process, automatic rollback of transaction timeout failure, and improves the flexibility and transaction fault tolerance after exchange.
[0023] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0024] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A fault-tolerant two-party data collaborative exchange method for blockchain transactions, characterized in that, Includes the following steps: S1, Party A Party B Each is a large prime number of order. In a cyclic addition group, the master private control parameter and the group generator are randomly selected. The scalar multiplication generates the master public key, and both parties retain their own key materials; S2. Generate the main control unit public key based on the group addition operation of the master public keys of both Party A and Party B. Through private transformation factors and the public key of the main control unit, generators Linear operations generate the public key from the control unit, Party A. Verify the validity of the public key from the control unit and construct a dual control unit architecture; S3. Both parties A and B generate public parameters for the recovery certificate and the recovery certificate component corresponding to the rollback transaction, and complete the two-way transmission through the secure channel. S4. Both parties, A and B, lock the data to their respective on-chain accounts in the control unit and submit a parameter tuple to the smart contract containing the public key of the master control unit, the public key of the slave control unit, the dual timeout period threshold, and the hash values of both parties' data. The contract's initial state is LOCKED; S5, Party B Generate an authorization commitment and partial authorization code and send them to Party A. Party A The smart contract generates a complete authorization code by integrating its own private control parameters. After verifying the legality of the authorization through group operation, the smart contract executes the target operation and updates the contract status to STAGE1_COMPLETE. This process does not require both parties to be continuously online. S6, Party B Based on the complete authorization code, its own key material, and private transformation factor, the complete control parameters of the main control unit and the slave control unit are reconstructed through modular inverse operation and linear operation to realize the legal handover of permissions and support the free replacement of the receiving end and the expansion of the authorization range; S7, Party B Based on the generation of a new public commitment and a new final authorization code from the complete control parameters of the control unit, after the smart contract is verified, the data of Party A is released to the new target address, and the contract status is updated to FINAL. S8. The smart contract monitors the on-chain time in real time. If the corresponding stage operation is not completed within the time limit, the corresponding recovery path is triggered. After Party B or Party A submits the recovery certificate, the contract generates a challenge value through hash calculation and verifies the legality of the certificate, and executes the rollback or refund operation. S9. Smart contracts prevent rollback and refund requests from being executed simultaneously through built-in logic. When the contract state is FINAL, REFUND_A or ROLLBACK_B, a resource cleanup procedure is triggered to release storage space and ensure a closed loop in the contract lifecycle. The contract uses built-in logic to monitor the call requests of the RollbackB and refundA methods to prevent them from being executed simultaneously within the same lifecycle. The resource cleanup procedure is triggered when the contract state is FINAL, REFUND_A, or ROLLBACK_B, releasing storage space and marking the end of the lifecycle.
2. The blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S1, Party A Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, Party A Master privacy control parameters; Party A The master public key; Party B Randomly select master privacy control parameters The formula for calculating the master public key is: ; In the formula, For Party B Master privacy control parameters; For Party B The master public key.
3. The blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S2, the public key of the main control unit is represented as: ; In the formula, The public key of the main control unit; The public key from the control unit is represented as: ; In the formula, For the public key of the control unit; This linear generation method strongly binds the public key of the slave control unit to the public key of the master control unit, ensuring the consistency of the dual control unit architecture.
4. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S3, the publicly disclosed parameters of Party A's restoration certificate are represented as follows: ; In the formula, The parameters of the recovery certificate generated by Party A are disclosed. Restore voucher components, represented as: ; In the formula, Party A The quantity of the recovery certificate; Party A Private random parameters that are kept in their own possession; For cryptographic hash functions; The parameters for Party B's restoration of the certificate of public disclosure are as follows: ; In the formula, For Party B Private random parameters that are kept in their own possession; For Party B The generated recovery certificate discloses the parameters; Restore voucher components, represented as: ; In the formula, For Party B The quantity of the recovery certificate; Two-way transmission of recovery credentials is achieved through an encrypted secure channel.
5. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S4, the parameter tuple is calculated using the following formula: ; In the formula, This is a parameter tuple for the smart contract; The time threshold for the first timeout period; This is the time threshold for the second timeout period; Data for Party A The hash value; For Party B's data The hash value; This is a cryptographic hash function.
6. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S5, Party B's authorization and commitment are expressed as follows: ; In the formula, For Party B The generated authorization commitment; For Party B Temporary control factors kept in self-management; Partial authorization code, represented as: ; In the formula, For Party B The generated partial authorization code; Party A The target operation identifier; the hash value is determined by the target operation. With promise After concatenation, it is hashed using a cryptographic hash function. Calculated; The complete authorization code from Party A is represented as: ; In the formula, Party A The generated complete authorization code; The contract verification equation is expressed as: ; In the formula, The public key of the main control unit.
7. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S6, the complete control parameters of the main control unit are expressed as follows: ; In the formula, Complete control parameters for the main control unit; This indicates that the entire calculation is performed on a large prime number. integer field Execution within; Complete control parameters from the control unit , is represented as: 。 8. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S7, the new final license code ; In the formula, A new final authorization code generated for Party B; For Party B From the integer field Private random parameters randomly selected from the data; For Party B The newly constructed target operation identifier; For Party B New public commitments generated; The contract verification equation is expressed as: ; In the formula, This is the public key from the control unit.
9. A blockchain-based fault-tolerant two-party data collaborative exchange method according to claim 1, characterized in that, In S8, the rollback trigger condition for Party B is if And the contract status is LOCKED; The contract calculates the challenge value, expressed as: ; In the formula, The challenge value calculated for smart contracts; In order to target Party B The rollback transaction identifier; Party A The generated recovery certificate discloses the parameters; The verification equation is expressed as: ; In the formula, Party A The generated recovery voucher components; The conditions for Party A to refund are as follows: And the contract status is LOCKED or STAGE1_COMPLETE; Challenge value, represented as: ; In the formula, The challenge value for a refund transaction for the client, calculated for the smart contract; In response to Party A Refund transaction identifier; For Party B The generated recovery certificate discloses the parameters; The verification equation is expressed as: ; In the formula, For Party B The generated recovery voucher components; For Party B The generated recovery certificate discloses the parameters.
10. A blockchain-based transaction fault-tolerant two-party data collaborative exchange system, applied to the blockchain-based transaction fault-tolerant two-party data collaborative exchange method described in any one of claims 1-9, characterized in that, include: The key initialization module is used to execute S1, which supports both parties to generate master private control parameters and master public key in a cyclic addition group, retain key materials, and realize trusted identity binding; The control unit public key generation and verification module is connected to the key initialization module and is used to execute S2 to generate a master control unit public key based on the master public keys of both parties, support the B party to generate a slave control unit public key and provide a validity verification interface, and build a dual control unit architecture; The smart contract registration module is connected to the public key generation and verification module of the control unit. It is used to execute S3, support both parties to generate public parameters and components of recovery credentials, and complete bidirectional transmission through an encrypted secure channel to provide a basis for abnormal recovery. The data locking module, connected to the smart contract registration module, is used to execute S4, enabling both parties to lock data to the corresponding control unit account and submit parameter tuples to the smart contract. This triggers the contract to initialize to the LOCKED state; The partial authorization code generation module, connected to the data locking module, is used to execute S5, supporting the B party to generate an authorization commitment and a partial authorization code, which are then transmitted to the A party through a secure channel to complete the authorization initialization. The complete authorization code generation module is connected to the partial authorization code generation module and is used to execute S6. It supports the client in generating a complete authorization code and submitting it for contract verification. After the verification is successful, the target operation is executed and the contract status is updated. The dual control unit complete control parameter reconstruction module is connected to the complete authorization code generation module and is used to execute S7. It supports the B party to reconstruct the complete control parameters of the main control unit and the slave control unit based on the complete authorization code and private factors, so as to realize the legal inheritance of permissions. The new operation authorization code generation module is connected to the complete control parameter reconstruction module of the dual control unit. It is used to execute S8, support the B party to generate a new public commitment and a new authorization code, and release the A party's data to the new target address after the contract verification is passed. The timeout fault tolerance rollback module is connected to the new operation authorization code generation module and is used to execute S9. It supports smart contract monitoring of timeouts and triggering of recovery paths. After verifying the legality of the recovery certificate, it executes rollback / refund to avoid request conflicts and trigger resource cleanup.