Search

CN-122022808-A - Transaction request processing method and device based on monitoring sub-chain and storage medium

CN122022808ACN 122022808 ACN122022808 ACN 122022808ACN-122022808-A

Abstract

The application discloses a transaction request processing method and device based on a monitoring sub-chain and a storage medium, and relates to the field of blockchains. The method comprises the steps of generating a cross-link transaction credential after a monitoring sub-link detects a cross-link request and successfully verifies the cross-link request, locking the states of a source link and a target link, and then sending the cross-link transaction credential to the target link, wherein the target link transfers target funds on the source link to the target link after the cross-link transaction credential is successfully verified, then sends receipt information of successful funds transfer to the monitoring sub-link, sends a random key to the source link after the monitoring sub-link receives the receipt information, and unlocks the states of the source link and the target link after the monitoring sub-link receives the on-link credential. The application solves the technical problems of poor fund safety and transaction reliability caused by lack of an effective coordination mechanism and atomic guarantee of cross-chain interaction in the prior art.

Inventors

  • YU YAN

Assignees

  • 中国工商银行股份有限公司

Dates

Publication Date
20260512
Application Date
20260204

Claims (12)

  1. 1. The transaction request processing method based on the monitoring sub-chain is applied to the monitoring sub-chain, and the monitoring sub-chain is used for coordinating and verifying cross-chain interaction operation among different blockchains, and is characterized by comprising the following steps: After the monitoring sub-chain detects a cross-chain request and successfully verifies the cross-chain request, generating a cross-chain transaction credential, wherein the cross-chain request is used for requesting transfer of target funds on a source chain to a target chain, and the cross-chain transaction credential is used for representing validity of the cross-chain request on the source chain; locking the states of the source chain and the target chain, and then sending the cross-chain transaction credential to the target chain, wherein the target chain transfers the target funds on the source chain into the target chain and then sends receipt information of successful funds transfer to the monitoring sub-chain under the conditions that the cross-chain transaction credential is successfully verified and the target funds on the source chain are confirmed to be frozen and zero knowledge proof verification corresponding to the source chain is passed; After the monitoring sub-link receives the receipt information, sending a random key to the source chain, wherein the source chain unfreezes the target funds according to the received random key and generates an on-chain credential, and then sending the on-chain credential to the monitoring sub-chain; after the monitoring sub-link receives the on-chain credentials, the state of the source and target chains is unlocked.
  2. 2. The method of claim 1, wherein the monitoring the validation operation of the cross-chain request by the sub-chain comprises: Detecting whether the transaction confirmation number generated on the source chain reaches a preset minimum confirmation threshold, wherein the transaction confirmation number is used for judging whether the transaction is stable or not; in the event that the number of transaction acknowledgements occurring on the source chain is detected to reach the minimum acknowledgement threshold, a zero knowledge proof protocol is invoked to verify the validity of the cross-chain request.
  3. 3. The method of claim 1, wherein locking the state of the source chain and the target chain comprises: Performing a state locking operation on the source chain, including freezing the target funds on the source chain, wherein the frozen target funds prohibit a user from withdrawing or transferring again during the cross-chain request; and performing state locking operation on the target chain, wherein the state locking operation comprises the step of creating a receiving account with an inactive account balance on the target chain, and the receiving account is used for receiving the target funds on the target chain.
  4. 4. The method of claim 1, wherein after locking the state of the source chain and the target chain, the method further comprises: Creating a bidirectional hash time lock, wherein the bidirectional hash time lock is used for coordinating the transaction time of the source chain and the target chain; After the bidirectional hash time lock is created, generating the random key, and then calculating the hash value of the random key by using an encryption algorithm; Acquiring network condition information between the source chain and the target chain; and adjusting a timeout window corresponding to the bidirectional hash time lock according to the network condition information, wherein the timeout window is a preset time threshold value for automatically triggering rollback transaction, and the preset time threshold value is determined according to the network delay and the safety threshold value between the source chain and the target chain.
  5. 5. The method of claim 1, wherein the verification process of the zero knowledge proof corresponding to the source chain comprises: After the monitoring sub-chain generates the cross-chain transaction credential, verifying the legitimacy of the cross-chain request using a zero-knowledge proof protocol, and verifying whether the target funds involved in the cross-chain request have been used for other transaction requests than the cross-chain request.
  6. 6. The method according to claim 4, wherein the method further comprises: if the target link does not feed back a signal of successful verification within the timeout window, or the target fund on the source link is found not to be frozen in the verification process, or zero knowledge corresponding to the source link proves that the target fund is not verified, the cross-link request is judged to be unsuccessfully executed, and then a refund process is started, wherein the refund process comprises the steps that the source link releases the frozen state of the target fund, and returns the target fund to a user account.
  7. 7. The method of claim 1, wherein after unlocking the state of the source chain and the target chain, the method further comprises: According to the information in the cross-chain transaction credential, calculating the asset reduction amount on the source chain and the asset increase amount on the target chain, and updating a global ledger, wherein the global ledger is used for recording the execution state and the execution result of the cross-chain request; And generating notification information about the transaction completion state according to the updating result of the global ledger.
  8. 8. The method of any one of claims 1 to 7, wherein the source chain is an ethernet chain and the target chain is a federated chain, or wherein the source chain is a federated chain and the target chain is an ethernet chain.
  9. 9. A transaction request processing device based on a monitoring sub-chain, comprising: The generation unit is used for generating a cross-link transaction credential after the monitoring sub-link detects a cross-link request and successfully verifies the cross-link request, wherein the cross-link request is used for requesting to transfer target funds on a source chain to a target chain, and the cross-link transaction credential is used for representing the validity of the cross-link request on the source chain; The first processing unit is used for locking the states of the source chain and the target chain, then sending the cross-chain transaction certificate to the target chain, wherein the target chain transfers the target funds on the source chain into the target chain and then sends receipt information of successful funds transfer to the monitoring sub-chain under the condition that the cross-chain transaction certificate is successfully verified and the target funds on the source chain are confirmed to be frozen and zero knowledge proof verification corresponding to the source chain is passed; the second processing unit is used for sending a random key to the source chain after the monitoring sub-chain receives the receipt information, wherein the source chain unfreezes the target funds according to the received random key and generates an on-chain certificate, and then the on-chain certificate is sent to the monitoring sub-chain; And the third processing unit is used for unlocking the states of the source chain and the target chain after the monitoring sub-link receives the on-chain credentials.
  10. 10. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and wherein the computer program, when executed, causes a device in which the computer readable storage medium is located to perform the transaction request processing method based on the monitoring subchain according to any one of claims 1 to 8.
  11. 11. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of monitoring sub-chain based transaction request processing of any of claims 1-8.
  12. 12. A computer program product comprising a computer program or instructions which, when executed by a processor, implements the method of monitoring subchain based transaction request processing of any of claims 1 to 8.

Description

Transaction request processing method and device based on monitoring sub-chain and storage medium Technical Field The application relates to the field of blockchains, in particular to a transaction request processing method, device and storage medium based on a monitoring sub-chain. Background In existing modes, atomicity of cross-chain transactions (i.e., either successful on all participating chains simultaneously or all rollbacks to an initial state) is difficult to effectively guarantee. This results in a significant increase in the complexity of the rollback mechanism once a link fails, particularly in the case where funds have been transferred from the source chain but receipt has not been acknowledged on the destination chain, and thus the funds are not secured. Existing cross-chain schemes, such as notary mechanisms, rely on third party trusted nodes to verify transactions on the source chain, thereby triggering corresponding operations on the target chain. However, such a mechanism may affect the security and reliability of the transaction due to a single point of failure or potentially malicious activity of the third party. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a transaction request processing method, a device and a storage medium based on a monitoring sub-chain, which at least solve the technical problems of poor fund safety and transaction reliability caused by lack of an effective coordination mechanism and atomic guarantee of cross-chain interaction in the prior art. According to one aspect of the embodiment of the application, a transaction request processing method based on a monitoring sub-chain is provided, wherein the transaction request processing method based on the monitoring sub-chain is applied to the monitoring sub-chain, the monitoring sub-chain is used for coordinating and verifying cross-chain interaction operation among different blockchains, the method comprises the steps that after the monitoring sub-chain detects a cross-chain request and successfully verifies the cross-chain request, cross-chain transaction certificates are generated, the cross-chain request is used for requesting to transfer target funds on a source chain to a target chain, the cross-chain transaction certificates are used for representing validity of the cross-chain request on the source chain, states of the source chain and the target chain are locked, then cross-chain transaction certificates are sent to the target chain, the target chain transfers the target funds on the source chain into the target chain under the condition that the cross-chain transaction certificates are verified successfully, and zero knowledge proof verification corresponding to the source chain is passed, after the monitoring sub-chain receives information, the cross-chain requests are used for requesting to transfer target funds on the source chain, the cross-chain transaction certificates are used for representing validity of the cross-chain request, the source chain and the target chains are locked, then the cross-chain transaction certificates are sent to the target chains, the target chains are confirmed to be frozen, and the target certificates on the source chains are received, and the monitoring sub-chain are received. Optionally, the verification operation of the sub-chain on the cross-chain request is monitored, wherein the verification operation comprises the steps of detecting whether the transaction confirmation number occurring on the source chain reaches a preset minimum confirmation threshold value, judging whether the transaction is stable or not, and calling a zero knowledge proof protocol to verify the validity of the cross-chain request under the condition that the fact that the transaction confirmation number occurring on the source chain reaches the minimum confirmation threshold value is detected. Optionally, locking the state of the source chain and the target chain comprises performing a state locking operation on the source chain, wherein the frozen target funds inhibit the user from withdrawing or transferring again during the cross-chain request, including freezing the target funds on the source chain, and performing the state locking operation on the target chain, including creating a receiving account on the target chain with an account balance not validated, wherein the receiving account is used for receiving the target funds on the target chain. Optionally, after locking the states of the source chain and the target chain, the method further comprises the steps of creating a bidirectional hash time lock, wherein the bidirectional hash time lock is used for coordinating the transaction time of the source chain and the target chain, after creating the bidirectional hash time lock, generating a random key, then calculating the hash value of the random key by using an encryption algorithm, acq