Blockchain-based cross-chain transaction method and device, storage medium and electronic equipment
By using multi-signature and hash locking mechanisms and leveraging a relay chain for cross-chain transactions, the interoperability and interoperability issues between different blockchain systems are resolved, enabling secure and efficient cross-chain transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TRAVELSKY TECHNOLOGY LIMITED
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-26
Smart Images

Figure CN122288705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain, and more specifically, to a cross-chain transaction method, apparatus, storage medium, and electronic device based on blockchain. Background Technology
[0002] In related technologies, each blockchain system is typically designed to operate independently, possessing unique consensus mechanisms, data structures, and smart contract languages, leading to silos between different blockchains. Because channel partners and suppliers use different models (UTXO (Unspent Transaction Output) and account models), direct interaction between blockchains becomes complex and difficult to achieve. Furthermore, existing cross-chain solutions are still under development and lack unified standards, resulting in complex configurations and highly customized development work required for information exchange and value transfer between heterogeneous blockchain systems. Additionally, since different blockchains are maintained by different communities or organizations, establishing trust relationships between these heterogeneous systems becomes crucial. Centralized exchanges in related technologies pose a single point of failure risk and rely on third-party trust endorsements, contradicting the decentralized nature of blockchain.
[0003] In cross-chain transactions, securely locking and unlocking assets is another significant challenge. If double-spending or other forms of illegal activity cannot be effectively prevented, cross-chain transactions will fail to gain user trust.
[0004] Therefore, the isolation of blockchain systems, the lack of standardized interoperability protocols, security and trust issues, and imperfect asset locking and unlocking mechanisms have led to difficulties in interoperability between different blockchains.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides a blockchain-based cross-chain transaction method, apparatus, storage medium, and electronic device to at least solve the technical problem of poor interoperability between different blockchains in related technologies.
[0007] According to one aspect of the present invention, a blockchain-based cross-chain transaction method is provided, comprising: in response to a cross-chain transaction request from a first object, locking a first asset associated with the cross-chain transaction request to obtain first asset locking information, wherein the cross-chain transaction request includes: a request initiated by the first object using a first blockchain to transact with a second object in a second blockchain, and the first asset includes: the assets of the first object; generating a hash value of the first asset locking information to obtain a target hash value; performing multi-party signature and multi-party signature verification on the cross-chain transaction request to obtain a first verification result, wherein the multi-party signature includes: signing the cross-chain transaction request using multiple blockchains; and, if the first verification result indicates that the cross-chain transaction request has been verified, sending the first asset locking information and the target hash value to a relay chain, wherein the relay chain includes: a blockchain that forwards the first asset locking information and the target hash value to the second blockchain for transaction.
[0008] Further, locking the first asset associated with the cross-chain transaction request to obtain first asset locking information includes: obtaining a first smart contract, wherein the first smart contract records the asset locking logic of the first asset; and using the first smart contract to lock the asset associated with the cross-chain transaction request to obtain the first asset locking information.
[0009] Furthermore, after sending the first asset locking information and the target hash value to the relay chain, the method further includes: forwarding the first asset locking information and the target hash value to the second blockchain through the relay chain; and, based on the first asset locking information and the target hash value, invoking the second smart contract in the second blockchain to complete the transaction.
[0010] Further, based on the first asset locking information and the target hash value, the second smart contract in the second blockchain is invoked to complete the transaction, including: based on the target hash value, the second smart contract is invoked to lock the second asset to obtain second asset locking information, wherein the second asset includes: the assets of the second object; after receiving the transaction confirmation information of the second object for the cross-chain transaction request, the first asset is unlocked based on the first asset locking information, and the second asset is unlocked based on the second asset locking information to complete the transaction associated with the cross-chain transaction request.
[0011] Furthermore, before forwarding the first asset locking information and the target hash value to the second blockchain via the relay chain, the method further includes: verifying the first asset locking information and the target hash value via the relay chain to obtain a second verification result, wherein the second verification result is used to indicate whether the first asset locking information and the target hash value have been tampered with; if the second verification result indicates that the first asset locking information and the target hash value have not been tampered with, the method proceeds to forward the first asset locking information and the target hash value to the second blockchain via the relay chain.
[0012] Further, the cross-chain transaction request is subjected to multi-party signature and multi-party signature verification to obtain a first verification result, including: signing the cross-chain transaction request through multiple blockchains; verifying whether the number of signatures used to sign the cross-chain transaction request is greater than a preset threshold to obtain a third verification result; if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is greater than the preset threshold, determining that the first verification result indicates that the cross-chain transaction request has passed verification; if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is not greater than the preset threshold, determining that the first verification result indicates that the cross-chain transaction request has failed verification.
[0013] Further, generating a hash value for the first asset lock information to obtain a target hash value includes: obtaining a target hash function; and using the target hash function to convert the first asset lock information into a hash value to obtain the target hash value.
[0014] According to another aspect of the present invention, a blockchain-based cross-chain transaction device is also provided, comprising: a locking unit, configured to lock a first asset associated with a cross-chain transaction request from a first object, thereby obtaining first asset locking information, wherein the cross-chain transaction request includes: a request initiated by the first object using a first blockchain to transact with a second object in a second blockchain, and the first asset includes: the assets of the first object; a generation unit, configured to generate a hash value of the first asset locking information, thereby obtaining a target hash value; a first processing unit, configured to perform multi-party signature and multi-party signature verification on the cross-chain transaction request, thereby obtaining a first verification result, wherein the multi-party signature includes: signing the cross-chain transaction request using multiple blockchains; and a sending unit, configured to send the first asset locking information and the target hash value to a relay chain when the first verification result indicates that the cross-chain transaction request has been verified successfully, wherein the relay chain includes: a blockchain that forwards the first asset locking information and the target hash value to the second blockchain for transaction.
[0015] Furthermore, the locking unit includes: a first acquisition subunit, used to acquire a first smart contract, wherein the first smart contract records the asset locking logic of the first asset; and a first locking subunit, used to lock the asset associated with the cross-chain transaction request using the first smart contract to obtain the first asset locking information.
[0016] Furthermore, the blockchain-based cross-chain transaction device also includes: a forwarding unit, used to forward the first asset locking information and the target hash value to the second blockchain via the relay chain after sending the first asset locking information and the target hash value to the relay chain; and a second processing unit, used to call the second smart contract in the second blockchain to complete the transaction based on the first asset locking information and the target hash value.
[0017] Further, the second processing unit includes: a second locking subunit, configured to call the second smart contract to lock the second asset based on the target hash value, thereby obtaining second asset locking information, wherein the second asset includes: the assets of the second object; and a processing subunit, configured to, upon receiving transaction confirmation information from the second object regarding the cross-chain transaction request, unlock the first asset based on the first asset locking information, and unlock the second asset based on the second asset locking information, thereby completing the transaction associated with the cross-chain transaction request.
[0018] Furthermore, the blockchain-based cross-chain transaction device further includes: a verification unit, configured to verify the first asset locking information and the target hash value through the relay chain before forwarding the first asset locking information and the target hash value to the second blockchain through the relay chain, and obtain a second verification result, wherein the second verification result is used to indicate whether the first asset locking information and the target hash value have been tampered with; and an execution unit, configured to execute the step of forwarding the first asset locking information and the target hash value to the second blockchain through the relay chain if the second verification result indicates that the first asset locking information and the target hash value have not been tampered with.
[0019] Further, the first processing unit includes: a signing subunit, used to sign the cross-chain transaction request through multiple blockchains; a verification subunit, used to verify whether the number of signatures used to sign the cross-chain transaction request is greater than a preset threshold, and obtain a third verification result; a first determining subunit, used to determine that the first verification result indicates that the cross-chain transaction request has been verified successfully when the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is greater than the preset threshold; and a second determining subunit, used to determine that the first verification result indicates that the cross-chain transaction request has not been verified successfully when the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is not greater than the preset threshold.
[0020] Furthermore, the generation unit includes: a second acquisition subunit for acquiring a target hash function; and a conversion subunit for using the target hash function to convert the first asset locking information into a hash value to obtain the target hash value.
[0021] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-described blockchain-based cross-chain transaction methods by executing the executable instructions.
[0022] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute any of the above-described blockchain-based cross-chain transaction methods.
[0023] In this invention, the following method is adopted: In response to a cross-chain transaction request from a first object, a first asset associated with the cross-chain transaction request is locked to obtain first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using a first blockchain to transact with a second object in a second blockchain. The first asset includes: the assets of the first object. A hash value for the first asset locking information is generated to obtain a target hash value. The cross-chain transaction request is subjected to multi-party signature and multi-party signature verification to obtain a first verification result. The multi-party signature includes: signing the cross-chain transaction request using multiple blockchains. If the first verification result indicates that the cross-chain transaction request has passed verification, the first asset locking information and the target hash value are sent to a relay chain. The relay chain includes: a blockchain that forwards the first asset locking information and the target hash value to the second blockchain for transaction. This solves the technical problem of poor interoperability between different blockchains in related technologies. In this invention, cross-chain transactions are conducted using a relay chain based on multi-party signatures and hash locking, avoiding the poor interoperability of cross-chain transactions between different blockchains in related technologies, thereby achieving the technical effect of improving the interactivity of cross-chain transactions between different blockchains. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0025] Figure 1 This is a flowchart of an optional blockchain-based cross-chain transaction method according to an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram illustrating an optional application scenario of a blockchain-based cross-chain transaction system according to an embodiment of the present invention.
[0027] Figure 3 This is a schematic diagram of an optional blockchain-based cross-chain transaction system according to an embodiment of the present invention;
[0028] Figure 4 This is an optional flowchart of a blockchain-based cross-chain transaction processing method according to an embodiment of the present invention;
[0029] Figure 5 This is a schematic diagram of an optional blockchain-based cross-chain transaction device according to an embodiment of the present invention;
[0030] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] For ease of description, some of the terms or nouns involved in this invention are explained below:
[0034] 1. Smart Contract: A smart contract is a contract whose terms are automatically executed and are written directly in lines of code. The contract terms are defined by code deployed on the blockchain and are replicated and executed on every node in the network. These contracts can automatically process equity asset transactions and execute operations based on preset conditions without the need for intermediaries.
[0035] 2. Multi-signature (Multisig): This is a security mechanism that requires multiple private keys, such as those of a channel partner and a supplier, to jointly sign the same transaction. This prevents attackers from completing a transaction alone, even if one private key is compromised. This increases the security of equity assets or information because it requires more than one authorized signature to verify the transaction.
[0036] 3. Hash Locking: Hash locking is a method that uses a hash function to generate a unique identifier (hash value) for a piece of data (usually transaction details) and uses this hash value as the unlocking condition. Only when the original data matching the hash value is provided can the equity asset be unlocked or a specific operation performed. This method ensures that both parties in an equity transaction adhere to the agreement, while guaranteeing the security and immutability of the equity transaction.
[0037] 4. Cross-chain Communication Protocol: This refers to a set of rules and technologies that allow information exchange and value transfer between different blockchains. It includes elements such as message format, data transmission method, and verification mechanism, aiming to solve the interoperability and interoperability issues between different blockchain systems.
[0038] 5. Event Listener: This is a component set up in the program to monitor the occurrence of specific events and respond to them. In blockchain applications, smart contracts can trigger events, and front-end or back-end applications can capture these events through event listeners and perform corresponding operations based on the event content.
[0039] 6. Transaction Confirmation: This refers to the process by which a transaction is accepted by the blockchain network and recorded in the blockchain. Every new transaction added to the blockchain needs to be verified by the nodes in the network. Once a transaction is accepted by enough nodes and recorded in a block, it can be considered confirmed.
[0040] 7. Channel partners: These are users who initiate equity transaction requests. They submit these requests to the blockchain network and, after verification by the blockchain network nodes, ultimately obtain the requested equity assets.
[0041] 8. Suppliers: These are users who accept equity transaction requests. After receiving the equity transaction request, they verify it through the nodes of the blockchain network, and finally respond to the request and transfer the equity assets.
[0042] It should be noted that the user information (including but not limited to user device information, user personal information, etc.), the collected information and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws and standards of the relevant regions, have taken necessary measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.
[0043] Example 1
[0044] According to an embodiment of the present invention, an optional blockchain-based cross-chain transaction method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0045] Figure 1 This is a flowchart of an optional blockchain-based cross-chain transaction method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0046] Step S101: In response to the cross-chain transaction request of the first object, lock the first asset associated with the cross-chain transaction request to obtain the first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using the first blockchain to transact with the second object in the second blockchain. The first asset includes: the assets of the first object.
[0047] The first object mentioned above can be a channel provider, and the first blockchain can be the channel provider blockchain, which is responsible for processing and verifying transaction requests from channel provider users and communicating with the relay chain. The second object can be a supplier, and the second blockchain can be the supplier blockchain, which is responsible for processing and verifying transaction requests from supplier users and communicating with the relay chain. The cross-chain transaction request mentioned above can include: the amount of assets to be transferred and the target blockchain (the supplier blockchain, corresponding to the second blockchain).
[0048] In this embodiment, when the first blockchain receives the cross-chain transaction request, it can take measures to lock the first asset associated with the request to prevent the first asset from being reused or otherwise altered before the transaction is completed, thus avoiding double-spending or asset loss. Asset locking can be executed by the first smart contract (Smart Contract A) in the first blockchain. After locking the asset, locking information can be generated, including the asset ID, the timestamp of the lock, the locked asset (e.g., the locked amount), and unlocking conditions. Locking information is crucial for tracking transaction status, verifying transactions, and unlocking assets after a successful transaction.
[0049] Locking assets and obtaining lock information ensures the security of assets and the reliability of transactions from initiation to completion. In subsequent cross-chain transaction processes, the lock information can be used to verify the transaction status and can also be transmitted to a second blockchain via a relay chain or some cross-chain protocol, so that the recipient (the second object) can verify and finally confirm the transaction, completing the unlocking and receipt of assets.
[0050] In one alternative example, after locking the first asset, the lock status and related information (e.g., transaction time, traded product, etc.) can be recorded.
[0051] Step S102: Generate the hash value of the first asset lock information to obtain the target hash value.
[0052] After the initial asset lock information is created, it can be used as input to generate a unique hash value using a hash function, resulting in the target hash value. The target hash value acts as a fingerprint of the initial asset lock information, effectively identifying the lock information and providing a secure digest of the information. In cross-chain transactions, the target hash value can also serve as a condition for unlocking cross-chain assets. It can be sent to a second blockchain as the basis for a second smart contract on that blockchain to verify transaction requests.
[0053] Step S103: Perform multi-party signature and multi-party signature verification on the cross-chain transaction request to obtain the first verification result. The multi-party signature includes signing the cross-chain transaction request using multiple blockchains.
[0054] In this embodiment, cross-chain transaction requests can be multi-signed through multiple blockchains to ensure the authenticity and legality of the transactions. Then, the first smart contract (i.e., smart contract A) in the first blockchain can call the multi-signature verification module to verify whether the cross-chain transaction request has received sufficient signature support. After the multi-signature requirements are met, the next step can proceed.
[0055] Step S104: If the first verification result indicates that the cross-chain transaction request has been verified, the first asset lock information and the target hash value are sent to the relay chain, wherein the relay chain includes a blockchain that forwards the first asset lock information and the target hash value to the second blockchain for transaction.
[0056] The aforementioned relay chain can act as an intermediary bridge, connecting different blockchains, receiving, verifying, and forwarding cross-chain messages, and ensuring the security and integrity of the messages.
[0057] In this embodiment, if the first verification result indicates that the cross-chain transaction request has been verified successfully, the first asset lock information and the target hash value are sent to the relay chain. The relay chain verifies the authenticity and integrity of the first asset lock information and the target hash value to ensure that there has been no tampering. After successful verification, the first asset lock information and the target hash value can be forwarded to the second blockchain.
[0058] Through the above steps, in this embodiment, cross-chain transactions are conducted using a relay chain based on multi-party signatures and hash locking, avoiding the poor interoperability issues in cross-chain transactions between different blockchains in related technologies. This achieves the technical effect of improving the interactivity of cross-chain transactions between different blockchains, thereby solving the technical problem of poor interoperability in cross-chain transactions between different blockchains in related technologies.
[0059] Optionally, locking the first asset associated with the cross-chain transaction request to obtain first asset locking information includes: obtaining a first smart contract, wherein the first smart contract records the asset locking logic of the first asset; and using the first smart contract to lock the first asset associated with the cross-chain transaction request to obtain first asset locking information.
[0060] To prevent the first asset from being reused or otherwise altered before the transaction is completed, thus avoiding double-spending or asset loss, the first asset can be locked through a smart contract in the first blockchain (i.e., the first smart contract). After locking the asset, locking information can be generated, which may include the asset ID, the locking timestamp, and the unlocking conditions.
[0061] In this embodiment, smart contracts can automatically execute predefined business logic, ensuring that all operations are performed under established rules without human intervention, thereby improving transaction efficiency and reducing the possibility of transaction errors.
[0062] Optionally, after sending the first asset lock information and the target hash value to the relay chain, the method further includes: forwarding the first asset lock information and the target hash value to the second blockchain via the relay chain; and, based on the first asset lock information and the target hash value, calling the second smart contract in the second blockchain to complete the transaction.
[0063] Once the first asset lock information and target hash value are sent to the relay chain, the relay chain can verify the authenticity and validity of these information. If the verification is successful, the relay chain can broadcast the first asset lock information and target hash value to the second blockchain network. The relay chain not only transmits necessary transaction information but also maintains the privacy and consistency of the information, ensuring that the information received by the second blockchain is completely consistent with the information sent by the first blockchain.
[0064] In this embodiment, a second smart contract can be pre-deployed on the second blockchain. This second smart contract can process asset locking information and target hash values forwarded from the first blockchain via a relay chain to perform subsequent asset unlocking and receiving operations. The second smart contract will perform the asset unlocking operation, releasing assets previously locked on the first blockchain. Subsequently, the unlocked assets can be received by the recipient, and the transaction record on the second blockchain can show that the assets have been successfully transferred to the recipient's account. At this point, the entire cross-chain transaction process is complete, and the assets on the first blockchain have been successfully transferred to the designated recipient on the second blockchain.
[0065] Optionally, based on the first asset locking information and the target hash value, a second smart contract in the second blockchain is invoked to complete the transaction, including: based on the target hash value, the second smart contract is invoked to lock the second asset to obtain the second asset locking information, wherein the second asset includes: the assets of the second object; after receiving the transaction confirmation information of the second object for the cross-chain transaction request, the first asset is unlocked based on the first asset locking information, and the second asset is unlocked based on the second asset locking information to complete the transaction associated with the cross-chain transaction request.
[0066] In cross-chain transactions, a "secondary asset" can refer to an asset belonging to a transaction participant (secondary object) on a second blockchain, used for the cross-chain transaction. To ensure the fairness and reliability of the transaction, the secondary asset can also be temporarily locked before the transaction is confirmed.
[0067] Upon receiving the first asset lock information and the target hash value, the second smart contract (Smart Contract B) can be invoked to execute the asset lock logic, locking the corresponding assets of the second object until the transaction is confirmed. The locking process will also generate detailed second asset lock information, recording the details of the locked assets and conditions.
[0068] When the second party (recipient) confirms the received cross-chain transaction request through a front-end application or e-wallet and confirms the transaction, a "transaction confirmation message" can be generated. The transaction confirmation message may include: the second party's approval of the transaction, indicating that the recipient is ready to receive the assets. After receiving the transaction confirmation message from the second party, the recipient can unlock the assets on the first blockchain based on the first asset lock information, and unlock the assets on the second blockchain based on the second asset lock information, and then transfer the assets. The unlocking process is the final step in completing the transaction, ensuring that the assets return from a locked state to a usable state and realizing the cross-chain transfer of assets.
[0069] By implementing a two-way locking and unlocking mechanism for assets in cross-chain transactions, it is ensured that neither party can arbitrarily move their assets before the transaction is completed, thereby improving the security and fairness of the transaction. The target hash value is used throughout the entire transaction process, serving as a verification tool for transaction details, guaranteeing the immutability of information, and enhancing the transparency and reliability of cross-chain transactions.
[0070] Optionally, before forwarding the first asset locking information and the target hash value to the second blockchain via the relay chain, the method further includes: verifying the first asset locking information and the target hash value via the relay chain to obtain a second verification result, wherein the second verification result is used to indicate whether the first asset locking information and the target hash value have been tampered with; if the second verification result indicates that the first asset locking information and the target hash value have not been tampered with, then the step of forwarding the first asset locking information and the target hash value to the second blockchain via the relay chain is performed.
[0071] Since transaction information is directly related to asset security, any tampering may lead to erroneous transactions or asset loss. Therefore, in this embodiment, to ensure the authenticity and integrity of the message, the first asset lock information and the target hash value can be verified. The verification content may include, but is not limited to:
[0072] (1) Authenticity verification: Source verification: When the relay chain receives a message, it can verify the source of the message to determine whether it actually comes from the expected blockchain network. For example, this can be achieved through digital signatures and public key infrastructure (PKI) to ensure that the message is sent by a legitimate node and not forged by a malicious node.
[0073] (2) Content Verification: The relay chain can check whether the message content is consistent with the asset locking protocol, such as whether the quantity, type, and locking conditions of the assets are consistent. This prevents malicious modification of the content and ensures that the information carried by the message is accurate.
[0074] (3) Integrity Verification: The relay chain can use a hash function to hash the message content and then compare the resulting hash value with the target hash value carried in the message. If they match, it confirms that the message has not been tampered with during transmission and has maintained its original integrity. It is also important to verify the order and timestamp of the messages to ensure that the messages arrive in the predetermined time order, without being replayed or delayed, to prevent time attacks and ensure that transactions are carried out as planned.
[0075] Through its authenticity and integrity verification mechanisms, the relay chain can effectively detect and prevent tampering. Upon detecting signs of tampering, the relay chain can refuse to forward the message, thus preventing potential security threats.
[0076] Verifying the authenticity and integrity of messages through the relay chain not only improves the security level of cross-chain communication but also builds trust among transaction participants, minimizing transaction risks caused by information tampering.
[0077] Optionally, the cross-chain transaction request is subjected to multi-party signature and multi-party signature verification to obtain a first verification result, including: signing the cross-chain transaction request through multiple blockchains; verifying whether the number of signatures used to sign the cross-chain transaction request is greater than a preset threshold to obtain a third verification result; if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is greater than the preset threshold, determining that the first verification result indicates that the cross-chain transaction request has been verified successfully; if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is not greater than the preset threshold, determining that the first verification result indicates that the cross-chain transaction request has failed to be verified.
[0078] In this embodiment, for cross-chain transaction requests, multiple blockchains (or multiple participants) can sign the cross-chain transaction request using their respective private keys. The signing process not only confirms the initiation of the transaction but also includes the acceptance of the transaction content and the commitment to the execution conditions.
[0079] In a multi-signature mechanism, a preset threshold (preset number of signatures) can be set, indicating the minimum number of signatures required to constitute a valid majority agreement, thus allowing the transaction to proceed. The preset threshold can be more than half the total number of blockchains participating in the signing, or a higher percentage, depending on the complexity of the transaction and the requirements of the participating parties.
[0080] In this embodiment, it can be checked whether the total number of signatures exceeds a preset threshold. If the number of signatures is greater than the preset threshold, the first verification result indicates that the cross-chain transaction request has been verified successfully, that is, the transaction is considered legal and secure after being supported by multiple signatures; conversely, if the number of signatures is less than or equal to the preset threshold, the first verification result indicates that the cross-chain transaction request has failed to be verified.
[0081] In this embodiment, the security and reliability of cross-chain transactions can be ensured through a multi-party signature and verification mechanism.
[0082] Optionally, generating a hash value for the first asset lock information to obtain a target hash value includes: obtaining a target hash function; and using the target hash function to convert the first asset lock information into a hash value to obtain the target hash value.
[0083] The target hash function described above can convert data input of arbitrary length into output of fixed length, commonly referred to as a hash value.
[0084] In this embodiment, the first asset lock information can be transformed by a target hash function. The first asset lock information can be input into the target hash function, and the target hash value can be output by the target hash function.
[0085] By generating a hash value for the first asset lock information and obtaining the target hash value, the cross-chain transaction system can efficiently and securely verify and protect critical transaction information, laying a solid foundation for subsequent cross-chain communication and asset transfer. This ensures transaction reliability, tamper resistance, and efficient verification.
[0086] In this embodiment, the cross-chain transaction method based on multi-party signature and hash locking solves the problem of interoperability difficulties between different blockchain systems.
[0087] Example 2
[0088] Embodiment 2 of the present invention provides an optional blockchain-based cross-chain transaction system, which can be used to execute the blockchain-based cross-chain transaction method provided in Embodiment 1 of the present invention.
[0089] Figure 2 This is a schematic diagram illustrating an optional application scenario of a blockchain-based cross-chain transaction system according to an embodiment of the present invention, such as... Figure 2 The following are included:
[0090] (1) Channel Blockchain Node (Node A): A node running on the channel blockchain, responsible for processing and verifying transaction requests from channel users and communicating with the relay chain.
[0091] (2) Relay Node: Serves as an intermediary bridge connecting different blockchain systems. It is responsible for receiving, verifying, and forwarding cross-chain messages, and ensuring the security and integrity of the messages.
[0092] (3) Supplier Blockchain Node (Node B): A node running on the supplier blockchain, responsible for processing and verifying transaction requests from supplier users and communicating with the relay chain.
[0093] (4) Channel user (User A, corresponding to the first object): The party that initiates the cross-chain transaction request initiates an asset lock request through smart contract A and waits for transaction confirmation.
[0094] (5) Multi-Sig Module: Implements a multi-signature mechanism to ensure that cross-chain transactions can only be executed after a sufficient number of signatures are obtained, thus guaranteeing the security and credibility of the transactions.
[0095] (6) Supplier User (User B, corresponding to the second object): The party that receives the cross-chain transaction request unlocks the asset through smart contract B and completes the transaction confirmation.
[0096] (7) Smart Contract A (corresponding to the first smart contract): defines the asset locking logic and multi-party signature verification logic to ensure the security of assets during the transaction process.
[0097] (8) Hash-Locking Module: Uses a hash function to encrypt transaction data and generates a hash value as a locking condition to ensure that cross-chain transactions can only be executed when specific conditions are met.
[0098] (9) Smart Contract B (corresponding to the second smart contract): defines the asset unlocking logic and hash lock verification logic to ensure that the assets are correctly released to the supplier user after the transaction is completed.
[0099] Figure 3 This is a schematic diagram of an optional blockchain-based cross-chain transaction system according to an embodiment of the present invention, such as... Figure 3 As shown, it includes: a user interface module, a smart contract module, a multi-party signature module, a hash locking module, an event listening module, and a relay chain module.
[0100] (1) User interface module:
[0101] ① User Interface (UI): Provides the interface for users to interact with the system, including functions such as initiating transaction requests and viewing transaction status.
[0102] ② Transaction Request Initiation (UI2): Users initiate cross-chain transaction requests through the UI.
[0103] ③ Transaction Status Viewing (UI3): Users can view changes in transaction status in real time through the UI.
[0104] By providing an intuitive and easy-to-use user interface, users can easily initiate transaction requests, view transaction status, and perform other necessary operations. This not only simplifies the user's workflow but also improves the overall user experience. For example, a graphical interface can help users understand the progress of a transaction in real time and make adjustments or cancel the transaction if necessary.
[0105] (2) Smart Contract Module:
[0106] ① Smart Contract A (SC1): Defines the asset locking logic and multi-party signature verification logic to ensure the security of assets during the transaction process.
[0107] ② Asset Locking Logic A: When a user initiates a cross-chain transaction, smart contract A locks the corresponding assets and records the lock status and related information.
[0108] ③ Multi-Signature Verification Logic: Ensures that cross-chain transactions can only be executed after a sufficient number of signatures have been obtained.
[0109] ④ Smart Contract B (SC2): Defines the asset unlocking logic and hash lock verification logic to ensure that the assets are correctly released to the recipient after the transaction is completed.
[0110] ⑤ Asset Unlocking Logic B: When specific conditions are met, smart contract B unlocks the corresponding asset and completes the transaction.
[0111] ⑥ Hash-Locking Verification Logic: Ensures that cross-chain transactions can only be executed when a specific hash value condition is met.
[0112] (3) Multi-signature module:
[0113] ①Signature Management (MS1): Provides signature management functions, recording the identity information and signature status of each signer.
[0114] ②Signature Verification (MS2): Implements a multi-party signature mechanism to ensure that cross-chain transactions can only be executed after a sufficient number of signatures have been obtained.
[0115] (4) Hash Locking Module:
[0116] ① Hash Generation (HL1): Uses a hash function to encrypt transaction data and generates a hash value as a locking condition.
[0117] ② Hash Verification (HL2): Ensures that cross-chain transactions can only be executed when specific conditions are met, enhancing the security and reliability of transactions.
[0118] (5) Event Listening Module:
[0119] ① Event Capture (EL1): Listen for various events defined in the smart contract and capture state changes.
[0120] ②State Update (EL2): Real-time updates to the user interface, providing transaction confirmation and status update functions, enhancing transaction transparency and traceability.
[0121] (6) Relay Chain Module:
[0122] ① Message Reception (RL1): Acts as an intermediary bridge to receive messages from the source blockchain.
[0123] ② Message Verification (RL2): Verifies the authenticity and integrity of messages to prevent them from being tampered with.
[0124] ③ Message Forwarding (RL3): Forwards verified messages to the target blockchain to facilitate cross-chain communication.
[0125] In terms of module structure, the Multi-Sig Module provides an enhanced security layer, ensuring that transactions are executed only when all parties reach a consensus, thereby improving the overall security of the system. The Hash-Locking Module uses a hash function to create a locking condition, ensuring that transactions can only proceed when specific conditions are met, effectively preventing unauthorized asset transfers and increasing transaction security. The Event Listener Module monitors changes in transaction status in real time and provides timely feedback to relevant parties, improving transaction transparency and traceability, and helping users better understand transaction progress. The Relay Chain Module, as a solution for direct communication between different blockchains, enables efficient message passing, facilitating smooth cross-chain transactions.
[0126] Blockchain-based cross-chain transactions can also include:
[0127] (1) Logging and Auditing Module:
[0128] The logging and auditing module is primarily used to record all critical operations and transaction details, facilitating subsequent auditing and troubleshooting. While not a core step in achieving cross-chain interoperability, it provides crucial support during system operation. Detailed recording of each transaction's execution helps identify potential security vulnerabilities or anomalies, ensuring system transparency and compliance. For example, administrators can track the execution process of each transaction through logs, ensuring normal system operation and timely handling of any anomalies. The logging and auditing module ensures system transparency and compliance, and helps identify potential security risks.
[0129] (2) Fault Tolerance and Recovery Module:
[0130] The fault tolerance and recovery module provides fault detection and automatic recovery capabilities, ensuring the system continues to operate normally in the event of a failure. While not a core module for solving cross-chain interoperability, it enhances the system's robustness and reliability, reducing downtime. For example, through redundant design and automatic failover mechanisms, service can be quickly restored when a node fails, ensuring system continuity and stability. The fault tolerance and recovery module improves system stability and availability, ensuring normal operation under high load or failure conditions.
[0131] In the blockchain-based cross-chain transaction system provided in Embodiment 2 of this invention, each module plays an indispensable role, collectively addressing the challenges faced in cross-chain transactions of equity assets, such as security, reliability, and efficiency. Each part works closely together to ensure the smoothness and security of cross-chain transactions. This effective combination of key steps and modules is crucial.
[0132] Figure 4 This is an optional flowchart of a blockchain-based cross-chain transaction processing method according to an embodiment of the present invention, such as... Figure 4 As shown, it includes:
[0133] 1. User Flow:
[0134] (1) User A initiates a transaction request: User A initiates a cross-chain transaction request to blockchain A through a front-end application or wallet, specifying the amount of assets to be transferred and the target blockchain (supplier blockchain).
[0135] (2) Smart Contract A locks assets: Smart Contract A locks the corresponding assets according to the user's request and records the locking status and related information. At the same time, it generates a unique hash value for subsequent hash locking operations.
[0136] (3) Multi-signature verification module: Smart contract A calls the multi-signature verification module to verify whether the transaction initiated by user A has obtained sufficient signature support. Only after the multi-signature requirements are met is it allowed to continue to the next step.
[0137] 2. Relay chain processing:
[0138] (1) Relay link receives messages: The relay chain node receives a cross-chain message from blockchain A, which contains information about locked assets and hash values.
[0139] (2) Relay chain verification message: The relay chain node verifies the authenticity and integrity of the message to ensure that there has been no tampering. After successful verification, the message is forwarded to the supplier's blockchain.
[0140] (3) Relay chain forwarding message: The relay chain node sends the verified message to the node of the supplier's blockchain, in preparation for the asset unlocking operation.
[0141] 3. Target chain processing:
[0142] (1) Smart contract B locks assets: After receiving the message, smart contract B locks the corresponding assets according to the hash value and waits for user B to confirm the transaction.
[0143] (2) User B confirms the transaction: User B confirms the received cross-chain transaction request through the front-end application or wallet and agrees to unlock the assets.
[0144] (3) Smart Contract B unlocks assets: Smart Contract B verifies whether the hash value matches, and unlocks the corresponding assets after confirming that there is no error, thus completing the transaction.
[0145] It's important to note that smart contract A locking assets is an indispensable first step in the entire process. Through this step, the channel provider's (User A's) equity assets are securely locked on the channel provider's blockchain, avoiding the risks of double-spending or asset loss. This provides a fundamental guarantee for subsequent cross-chain transactions of equity assets, ensuring that equity assets can only be unlocked when specific conditions are met, thus guaranteeing transaction security. The multi-party signature verification module enhances transaction security and credibility through a multi-party signature mechanism, preventing single points of failure and malicious attacks. Ensuring that transaction instructions receive sufficient trust endorsement before execution increases the system's robustness. The multi-party signature mechanism not only enhances the security of equity asset transactions but also makes the system more decentralized, reducing reliance on a single entity.
[0146] The relay chain acts as a bridge between the channel provider's blockchain and the supplier's blockchain, responsible for receiving, verifying, and forwarding cross-chain messages. It ensures the authenticity and integrity of information, prevents message tampering, and guarantees that messages correctly reach the target blockchain (supplier's blockchain). The existence of the relay chain greatly simplifies the cross-chain communication process, enabling seamless connections between different blockchains and facilitating smooth cross-chain transactions.
[0147] Smart contract B locks assets, and supplier user B confirms the transaction, ensuring that the recipient (supplier user B) receives the corresponding equity assets on the supplier user's blockchain, completing the entire transaction process. Smart contract B automatically locks equity assets according to preset conditions and awaits supplier user B's confirmation, thus realizing the core link of cross-chain asset transfer, ensuring the smooth completion of the transaction and the secure release of assets, further enhancing the transparency and reliability of the transaction. Smart contract B automatically unlocks the equity assets to the recipient according to preset conditions, completing the final fund transfer process, ensuring that both parties obtain the expected results after the transaction, enhancing the transparency and reliability of the transaction.
[0148] Example 3
[0149] Embodiment 3 of the present invention provides an optional blockchain-based cross-chain transaction device, which can be used to execute the blockchain-based cross-chain transaction method provided in Embodiment 1 of the present invention.
[0150] Figure 5 This is a schematic diagram of an optional blockchain-based cross-chain transaction device according to an embodiment of the present invention, such as... Figure 5 The device includes: a locking unit 51, a generating unit 52, a first processing unit 53, and a sending unit 54.
[0151] The locking unit 51 is used to lock the first asset associated with the cross-chain transaction request in response to the cross-chain transaction request of the first object, and obtain the first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using the first blockchain to trade with a second object in the second blockchain. The first asset includes: the assets of the first object.
[0152] Generation unit 52 is used to generate a hash value of the first asset locking information to obtain the target hash value;
[0153] The first processing unit 53 is used to perform multi-party signature and multi-party signature verification on cross-chain transaction requests to obtain a first verification result. The multi-party signature includes: signing the cross-chain transaction request using multiple blockchains.
[0154] Sending unit 54 is used to send the first asset lock information and the target hash value to the relay chain when the first verification result indicates that the cross-chain transaction request has been verified. The relay chain includes a blockchain that forwards the first asset lock information and the target hash value to the second blockchain for transaction.
[0155] In the blockchain-based cross-chain transaction device provided in Embodiment 3 of the present invention, the locking unit 51 can lock the first asset associated with the cross-chain transaction request in response to the cross-chain transaction request of the first object, thereby obtaining the first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using the first blockchain to transact with a second object in the second blockchain. The first asset includes: the assets of the first object. The generation unit 52 generates a hash value for the first asset locking information, obtaining a target hash value. The first processing unit 53 performs multi-party signature and multi-party signature verification on the cross-chain transaction request, obtaining a first verification result. The multi-party signature includes: signing the cross-chain transaction request using multiple blockchains. If the first verification result indicates that the cross-chain transaction request has been verified, the sending unit 54 sends the first asset locking information and the target hash value to the relay chain. The relay chain includes: a blockchain that forwards the first asset locking information and the target hash value to the second blockchain for transaction. This solves the technical problem of poor interoperability between different blockchains in related technologies. In this embodiment, cross-chain transactions are conducted using a relay chain based on multi-party signatures and hash locking, avoiding the poor interoperability of cross-chain transactions between different blockchains in related technologies, thereby achieving the technical effect of improving the interactivity of cross-chain transactions between different blockchains.
[0156] Optionally, the locking unit includes: a first acquisition subunit, used to acquire a first smart contract, wherein the first smart contract records the asset locking logic of the first asset; and a first locking subunit, used to lock the first asset associated with the cross-chain transaction request using the first smart contract to obtain the first asset locking information.
[0157] Optionally, the blockchain-based cross-chain transaction device further includes: a forwarding unit, used to forward the first asset locking information and the target hash value to the second blockchain via the relay chain after sending the first asset locking information and the target hash value to the relay chain; and a second processing unit, used to call the second smart contract in the second blockchain to complete the transaction based on the first asset locking information and the target hash value.
[0158] Optionally, the second processing unit includes: a second locking subunit, used to call a second smart contract to lock the second asset based on the target hash value, and obtain second asset locking information, wherein the second asset includes: the assets of the second object; and a processing subunit, used to unlock the first asset based on the first asset locking information and the second asset based on the second asset locking information after receiving the transaction confirmation information of the second object for the cross-chain transaction request, so as to complete the transaction associated with the cross-chain transaction request.
[0159] Optionally, the blockchain-based cross-chain transaction device further includes: a verification unit, used to verify the first asset locking information and the target hash value through the relay chain before forwarding the first asset locking information and the target hash value to the second blockchain through the relay chain, and obtain a second verification result, wherein the second verification result is used to indicate whether the first asset locking information and the target hash value have been tampered with; and an execution unit, used to execute the step of forwarding the first asset locking information and the target hash value to the second blockchain through the relay chain if the second verification result indicates that the first asset locking information and the target hash value have not been tampered with.
[0160] Optionally, the first processing unit includes: a signing subunit for signing cross-chain transaction requests through multiple blockchains; a verification subunit for verifying whether the number of signatures used to sign the cross-chain transaction request is greater than a preset threshold, thereby obtaining a third verification result; a first determining subunit for determining that the first verification result indicates that the cross-chain transaction request has been verified successfully if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is greater than the preset threshold; and a second determining subunit for determining that the first verification result indicates that the cross-chain transaction request has not been verified successfully if the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is not greater than the preset threshold.
[0161] Optionally, the generation unit includes: a second acquisition subunit for acquiring a target hash function; and a conversion subunit for using the target hash function to convert the first asset locking information into a hash value to obtain the target hash value.
[0162] The aforementioned blockchain-based cross-chain transaction device may also include a processor and a memory. The aforementioned locking unit 51, generating unit 52, first processing unit 53, and sending unit 54 are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0163] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, cross-chain transactions can be performed using a relay chain based on multi-party signatures and hash locking. This avoids the poor interoperability issues encountered in cross-chain transactions between different blockchains in related technologies, thereby improving the interactivity of cross-chain transactions between different blockchains.
[0164] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0165] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-described blockchain-based cross-chain transaction methods by executing the executable instructions.
[0166] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute any of the above-described blockchain-based cross-chain transaction methods.
[0167] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention, such as... Figure 6 As shown, an embodiment of the present invention provides an electronic device 60, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements any of the above-mentioned blockchain-based cross-chain transaction methods.
[0168] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0169] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0170] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0174] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A cross-chain transaction method based on blockchain, characterized in that, include: In response to a cross-chain transaction request from a first object, the first asset associated with the cross-chain transaction request is locked to obtain first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using a first blockchain to transact with a second object in a second blockchain. The first asset includes: the assets of the first object. Generate the hash value of the first asset locking information to obtain the target hash value; The cross-chain transaction request is subjected to multi-party signature and multi-party signature verification to obtain a first verification result, wherein the multi-party signature includes: signing the cross-chain transaction request using multiple blockchains; If the first verification result indicates that the cross-chain transaction request has been verified, the first asset lock information and the target hash value are sent to the relay chain, wherein the relay chain includes a blockchain that forwards the first asset lock information and the target hash value to the second blockchain for transaction.
2. The cross-chain transaction method according to claim 1, characterized in that, The first asset associated with the cross-chain transaction request is locked to obtain first asset lock information, including: Obtain the first smart contract, wherein the first smart contract records the asset locking logic of the first asset; The first smart contract is used to lock the asset associated with the cross-chain transaction request, thereby obtaining the first asset lock information.
3. The cross-chain transaction method according to claim 2, characterized in that, After sending the first asset locking information and the target hash value to the relay chain, the process also includes: The first asset locking information and the target hash value are forwarded to the second blockchain via the relay chain; Based on the first asset locking information and the target hash value, the second smart contract in the second blockchain is invoked to complete the transaction.
4. The cross-chain transaction method according to claim 3, characterized in that, Based on the first asset locking information and the target hash value, the second smart contract in the second blockchain is invoked to complete the transaction, including: Based on the target hash value, the second smart contract is invoked to lock the second asset, thereby obtaining the second asset locking information, wherein the second asset includes: the assets of the second object; Upon receiving the transaction confirmation information from the second object regarding the cross-chain transaction request, the first asset is unlocked based on the first asset lock information, and the second asset is unlocked based on the second asset lock information, thereby completing the transaction associated with the cross-chain transaction request.
5. The cross-chain transaction method according to claim 3, characterized in that, Before forwarding the first asset locking information and the target hash value to the second blockchain via the relay chain, the process also includes: The first asset locking information and the target hash value are verified through the relay chain to obtain a second verification result, wherein the second verification result is used to indicate whether the first asset locking information and the target hash value have been tampered with; If the second verification result indicates that the first asset lock information and the target hash value have not been tampered with, the step of forwarding the first asset lock information and the target hash value to the second blockchain through the relay chain is executed.
6. The cross-chain transaction method according to claim 1, characterized in that, The cross-chain transaction request is subjected to multi-party signature and multi-party signature verification to obtain a first verification result, including: The cross-chain transaction request is signed using multiple blockchains; Verify whether the number of signatures used to sign cross-chain transaction requests is greater than a preset threshold to obtain the third verification result; If the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is greater than the preset threshold, then the first verification result indicates that the cross-chain transaction request has been verified. If the third verification result indicates that the number of signatures used to sign the cross-chain transaction request is not greater than the preset threshold, then the first verification result indicates that the cross-chain transaction request verification fails.
7. The cross-chain transaction method according to claim 1, characterized in that, Generate the hash value of the first asset lock information to obtain the target hash value, including: Obtain the target hash function; The first asset locking information is converted into a hash value using the target hash function to obtain the target hash value.
8. A blockchain-based cross-chain transaction device, characterized in that, include: A locking unit is used to lock a first asset associated with a cross-chain transaction request in response to a first object, and to obtain first asset locking information. The cross-chain transaction request includes: a request initiated by the first object using a first blockchain to transact with a second object in a second blockchain, and the first asset includes: the assets of the first object. A generation unit is used to generate a hash value for the first asset locking information to obtain a target hash value; The first processing unit is used to perform multi-party signature and multi-party signature verification on the cross-chain transaction request to obtain a first verification result, wherein the multi-party signature includes: signing the cross-chain transaction request using multiple blockchains; The sending unit is configured to send the first asset locking information and the target hash value to the relay chain when the first verification result indicates that the cross-chain transaction request has been verified. The relay chain includes a blockchain that forwards the first asset locking information and the target hash value to the second blockchain for transaction.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the blockchain-based cross-chain transaction method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the blockchain-based cross-chain transaction method according to any one of claims 1 to 7.