Transaction methods, devices, equipment and storage media

CN118428942BActive Publication Date: 2026-09-01THE PEOPLES BANK OF CHINA DIGITAL CURRENCY INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310106296.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2026-09-01
Estimated Expiration
2043-01-31

AI Technical Summary

Technical Problem

[0004]本申请提供一种交易方法、装置、设备及存储介质,用以解决交易不同步的问题

Benefits of technology

[0040]本申请的实施例提供的第一方面的技术方案至少带来以下有益效果:交易发起方节点向区块链发送当前交易的交易请求信息,以请求确认交易接收方节点是否同意进行当前交易。进一步的,交易发起方节点从区块链中获取交易接收方节点发送的交易应答信息,在交易应答信息指示交易接收方节点同意当前交易的情况下,调用区块链上的智能合约,执行当前交易,以生成第一同步交易事件;其中,第一同步交易事件用于指示交易发起方节点执行了当前交易。在确定交易接收方节点调用区块链上的智能合约并执行完当前交易,以生成第二同步交易事件的情况下,确定当前交易完成;其中,第二同步交易事件用于指示交易接收方节点执行了当前交易。由于交易发起方节点执行当前交易生成了第一同步交易事件,且在确定交易接收方节点也执行了当前交易生成了第二同步交易事件的情况下,才确定当前交易完成,确保了交易双方均执行了交易,进而避免了相关技术中交收不同步现象的发生。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118428942B_ABST
    Figure CN118428942B_ABST
Patent Text Reader

Abstract

This application relates to a transaction method, apparatus, device, and storage medium, specifically in the field of blockchain technology, to solve the problem of transaction asynchrony. The method includes: a transaction initiating node sending transaction request information to the blockchain, the transaction request information being used to request confirmation from the transaction receiving node regarding its agreement to the current transaction; the transaction initiating node retrieving transaction response information sent by the transaction receiving node from the blockchain; if the transaction response information indicates that the transaction receiving node agrees to the current transaction, the transaction initiating node invoking a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event; the first synchronous transaction event indicating that the transaction initiating node has executed the current transaction; and, if it is determined that the transaction receiving node has invoked the smart contract on the blockchain and completed the execution of the current transaction, generating a second synchronous transaction event, the current transaction is determined to be complete; wherein the second synchronous transaction event indicating that the transaction receiving node has executed the current transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a transaction method, apparatus, device, and storage medium. Background Technology

[0002] Currently, cross-border payment business is based on an agency model and is characterized by centralization. In the payment process, one or more agent banks act as intermediaries through certain third-party systems to complete the transaction.

[0003] However, in payment methods based on the agency model, there may be time differences between the remitting bank and the receiving bank and the agent bank, or the agent bank may be on holidays. This can lead to one party executing the transaction while the other party does not, resulting in a transaction asynchrony due to settlement time differences. Summary of the Invention

[0004] This application provides a transaction method, apparatus, device, and storage medium to solve the problem of transaction asynchrony. The technical solution of this application is as follows:

[0005] According to a first aspect of the embodiments of this application, a transaction method is provided, applied to a transaction initiating node. The method includes: the transaction initiating node sending transaction request information for the current transaction to a blockchain, the transaction request information being used to request confirmation from a transaction receiving node whether it agrees to the current transaction; the transaction initiating node obtaining transaction response information sent by the transaction receiving node from the blockchain; if the transaction response information indicates that the transaction receiving node agrees to the current transaction, the transaction initiating node invoking a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event; the first synchronous transaction event being used to indicate that the transaction initiating node has executed the current transaction; and if it is determined that the transaction receiving node has invoked the smart contract on the blockchain and completed the execution of the current transaction to generate a second synchronous transaction event, the current transaction is determined to be completed; wherein the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

[0006] Optionally, the transaction request information includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction initiating node sends the transaction request information of the current transaction to the blockchain, including: the transaction initiating node obtaining the encryption public key of the transaction receiving node, and encrypting the transaction request information according to the encryption public key of the transaction receiving node; the transaction initiating node sending the encrypted transaction request information to the blockchain.

[0007] Optionally, the method also includes: the first account address of the transaction initiator node is obtained by calculating based on a pseudonym algorithm.

[0008] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction response information is encrypted by the transaction receiving node according to the encryption public key of the transaction initiating node and then sent to the blockchain.

[0009] Optionally, the method also includes: the third account address of the transaction recipient node is obtained by calculating based on a pseudonym algorithm.

[0010] Optionally, the method further includes: the transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain, and decrypts the transaction response information according to the encrypted private key of the transaction initiating node to determine whether the transaction receiving node agrees to the current transaction.

[0011] Optionally, the transaction initiating node invokes a smart contract on the blockchain to execute the current transaction and generate a first synchronous transaction event. This includes: the transaction initiating node sending the first synchronous transaction information to the blockchain and invoking a smart contract on the blockchain to execute the current transaction and generate a first synchronous transaction event; wherein, the first synchronous transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; and the transaction initiating node sending the first synchronous transaction information to the blockchain so that the relevant regulatory authority node can query or store the first synchronous transaction information.

[0012] Optionally, the transaction initiating node sends the first synchronized transaction information to the blockchain and calls the smart contract on the blockchain to execute the current transaction to generate the first synchronized transaction event. This includes: the transaction initiating node uses the smart contract to perform compliance verification on the first synchronized transaction information using zero-knowledge circuits, and generates the first synchronized transaction event if the verification is successful.

[0013] According to a second aspect of the embodiments of this application, a transaction method is provided, applied to a transaction receiving node. The method includes: the transaction receiving node obtaining transaction request information sent by a transaction initiating node from a blockchain; the transaction request information is used to request confirmation of whether the transaction receiving node agrees to conduct the current transaction; if the transaction receiving node agrees to the current transaction, the transaction receiving node sends transaction response information to the blockchain; the transaction receiving node receives the transaction response information from the transaction initiating node, calls a smart contract on the blockchain, and executes a first synchronous transaction event generated by the current transaction; the first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction; the transaction receiving node calls the smart contract on the blockchain and completes the execution of the current transaction to generate a second synchronous transaction event; the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

[0014] Optionally, the method further includes: the transaction receiving node decrypting the transaction request information using its encrypted private key to obtain the current transaction content; the current transaction content includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction receiving node verifies the current transaction content, and if the verification is correct, generates transaction response information indicating agreement to the current transaction, and sends the transaction response information to the blockchain.

[0015] Optionally, the first account address of the transaction initiator node is calculated using a pseudonym algorithm.

[0016] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction receiving node sends the transaction response information to the blockchain, including: the transaction receiving node encrypts the transaction response information according to the encryption public key of the transaction initiating node and then sends it to the blockchain.

[0017] Optionally, the third account address of the transaction recipient node is calculated using a pseudonym algorithm.

[0018] Optionally, the transaction receiving node invokes a smart contract on the blockchain and executes the current transaction to generate a second synchronous transaction event. This includes: the transaction receiving node sending the second synchronous transaction information to the blockchain and invoking a smart contract on the blockchain to execute the current transaction to generate a second synchronous transaction event; wherein, the second synchronous transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction receiving node sends the second synchronous transaction information to the blockchain so that the relevant regulatory authority node can query or store the second synchronous transaction information.

[0019] Optionally, the transaction receiving node sends the second synchronous transaction information to the blockchain and calls the smart contract on the blockchain to execute the current transaction to generate a second synchronous transaction event. This includes: the transaction receiving node uses the smart contract to perform compliance verification on the second synchronous transaction information using zero-knowledge circuits, and generates a second synchronous transaction event if the verification is successful.

[0020] According to a third aspect of the embodiments of this application, a transaction method is provided, applied to a blockchain transaction system. The blockchain transaction system includes a transaction initiator node and a transaction receiver node. The transaction initiator node sends transaction request information for the current transaction to the blockchain, the transaction request information being used to request confirmation from the transaction receiver node regarding whether it agrees to conduct the current transaction. The transaction receiver node retrieves the transaction request information sent by the transaction initiator node from the blockchain. If the transaction receiver node agrees to the current transaction, the transaction receiver node sends transaction response information to the blockchain. The transaction initiator node retrieves the transaction response information sent by the transaction receiver node from the blockchain. If the transaction response information indicates that the transaction receiver node agrees to the current transaction, the transaction initiator node invokes a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event. The first synchronous transaction event is used to indicate that the transaction initiator node has executed the current transaction. The transaction receiver node receives the first synchronous transaction event, invokes the smart contract on the blockchain, and completes the execution of the current transaction, thereby generating a second synchronous transaction event. The second synchronous transaction event is used to indicate that the transaction receiver node has executed the current transaction.

[0021] Optionally, the method also includes: the blockchain transaction system executing a smart contract to synchronize the transaction between the first account address of the transaction initiator node and the third account address of the transaction recipient node, so that the first transaction amount corresponding to the first currency is transferred to the third account address of the transaction recipient node and the second transaction amount corresponding to the second currency is transferred to the first account address of the transaction initiator node.

[0022] According to a fourth aspect of the embodiments of this application, a transaction apparatus is provided, applied to a transaction initiating node. The apparatus includes a sending unit, a processing unit, and a determining unit. The sending unit is configured to send transaction request information of the current transaction to the blockchain, wherein the transaction request information is used to request confirmation of whether the transaction receiving node agrees to the current transaction. The processing unit is configured to obtain transaction response information sent by the transaction receiving node from the blockchain, and, if the transaction response information indicates that the transaction receiving node agrees to the current transaction, invoke a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event. The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction. The determining unit is configured to determine that the current transaction is completed if it is determined that the transaction receiving node has invoked a smart contract on the blockchain and completed the execution of the current transaction to generate a second synchronous transaction event. The second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

[0023] Optionally, the transaction request information includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the sending unit is specifically used for: the transaction initiating node obtaining the encryption public key of the transaction receiving node, and encrypting the transaction request information according to the encryption public key of the transaction receiving node; and the transaction initiating node sending the encrypted transaction request information to the blockchain.

[0024] Optionally, the first account address of the transaction initiator node is calculated using a pseudonym algorithm.

[0025] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction response information is encrypted by the transaction receiving node according to the encryption public key of the transaction initiating node and then sent to the blockchain.

[0026] Optionally, the third account address of the transaction recipient node is calculated using a pseudonym algorithm.

[0027] Optionally, the processing unit is also used to: obtain transaction response information sent by the transaction recipient node from the blockchain, and decrypt the transaction response information according to the encrypted private key of the transaction initiator node, so as to determine whether the transaction recipient node agrees to the current transaction.

[0028] Optionally, the processing unit is specifically used for: the transaction initiating node sending the first synchronized transaction information to the blockchain and calling the smart contract on the blockchain to execute the current transaction to generate the first synchronized transaction event; wherein, the first synchronized transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction initiating node sending the first synchronized transaction information to the blockchain so that the relevant regulatory authority node can query or store the first synchronized transaction information.

[0029] Optionally, the processing unit is specifically used for: the transaction initiating node to perform compliance verification of the first synchronous transaction information through a smart contract using a zero-knowledge circuit, and to generate the first synchronous transaction event if the verification is successful.

[0030] According to a fifth aspect of the embodiments of this application, a transaction apparatus is provided, applied to a transaction receiving node. The apparatus includes an acquisition unit, a sending unit, and a processing unit. The acquisition unit is configured to acquire transaction request information sent by a transaction initiating node from a blockchain. The transaction request information is used to request confirmation of whether the transaction receiving node agrees to the current transaction. The sending unit is configured to send transaction response information to the blockchain if the transaction receiving node agrees to the current transaction. The acquisition unit is further configured to receive the transaction response information from the transaction initiating node, invoke a smart contract on the blockchain, and execute a first synchronous transaction event generated by the current transaction. The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction. The processing unit is configured to invoke a smart contract on the blockchain and execute the current transaction to generate a second synchronous transaction event. The second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

[0031] Optionally, the processing unit is further configured to: decrypt the transaction request information according to the encrypted private key of the transaction recipient node to obtain the current transaction content; the current transaction content includes at least one of the following: the first account address of the transaction initiator node, the second account address of the transaction recipient node, the first transaction amount of the transaction initiator node, the second transaction amount of the transaction recipient node, the first currency of the transaction initiator node, and the second currency of the transaction recipient node; verify the current transaction content, and if the verification is correct, generate transaction response information to indicate agreement to the current transaction, and send the transaction response information to the blockchain.

[0032] Optionally, the first account address of the transaction initiator node is calculated using a pseudonym algorithm.

[0033] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the sending unit is specifically used for: the transaction receiving node encrypting the transaction response information according to the encryption public key of the transaction initiating node and sending it to the blockchain.

[0034] Optionally, the third account address of the transaction recipient node is calculated using a pseudonym algorithm.

[0035] Optionally, the processing unit is specifically used for: the transaction receiving node sending the second synchronization transaction information to the blockchain and calling the smart contract on the blockchain to execute the current transaction to generate a second synchronization transaction event; wherein, the second synchronization transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction receiving node sending the second synchronization transaction information to the blockchain so that the relevant regulatory authority node can query or store the second synchronization transaction information.

[0036] Optionally, the processing unit is specifically used for: the transaction receiving node to perform compliance verification of the second synchronous transaction information through a smart contract using a zero-knowledge circuit, and to generate a second synchronous transaction event if the verification is successful.

[0037] According to a sixth aspect of the embodiments of this application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the transaction method as described in the first aspect above.

[0038] According to a seventh aspect of the embodiments of this application, a computer-readable storage medium is provided, which enables an electronic device to perform the transaction method of the first aspect described above when computer-executable instructions stored in the computer-readable storage medium are executed by a processor of an electronic device.

[0039] According to an eighth aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the transaction method as described in the first aspect above.

[0040] The technical solution of the first aspect provided by the embodiments of this application brings at least the following beneficial effects: The transaction initiating node sends transaction request information of the current transaction to the blockchain to request confirmation of whether the transaction receiving node agrees to the current transaction. Further, the transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain. If the transaction response information indicates that the transaction receiving node agrees to the current transaction, the initiating node calls the smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event; wherein, the first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction. If it is determined that the transaction receiving node has called the smart contract on the blockchain and completed the execution of the current transaction to generate a second synchronous transaction event, the current transaction is determined to be complete; wherein, the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction. Because the transaction initiating node generates the first synchronous transaction event by executing the current transaction, and the current transaction is only determined to be complete after it is determined that the transaction receiving node has also executed the current transaction and generated the second synchronous transaction event, it ensures that both parties to the transaction have executed the transaction, thereby avoiding the occurrence of asynchronous settlement phenomena in related technologies.

[0041] It should be noted that the technical effects of any of the implementation methods in aspects two through eight can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here.

[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0044] Figure 1 This is a schematic diagram illustrating the structure of a blockchain transaction system according to an exemplary embodiment;

[0045] Figure 2 This is a system architecture diagram of a transaction node according to an exemplary embodiment;

[0046] Figure 3 This is a flowchart illustrating another transaction method according to an exemplary embodiment;

[0047] Figure 4 This is a transaction query flowchart illustrated according to an exemplary embodiment;

[0048] Figure 5 This is a transaction response flowchart illustrated according to an exemplary embodiment;

[0049] Figure 6 This is one of the PVP transaction flowcharts shown according to an exemplary embodiment;

[0050] Figure 7 This is a second PVP transaction flowchart illustrated according to an exemplary embodiment;

[0051] Figure 8 This is a flowchart illustrating the PVP transaction supervision process according to an exemplary embodiment;

[0052] Figure 9 This is a flowchart illustrating a blockchain synchronous settlement method according to an exemplary embodiment;

[0053] Figure 10 This is one of the structural schematic diagrams of a trading device according to an exemplary embodiment;

[0054] Figure 11 This is a second schematic diagram of the structure of a trading device according to an exemplary embodiment;

[0055] Figure 12 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation

[0056] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0057] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application 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 this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0058] Furthermore, in the description of the embodiments of this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, in the description of the embodiments of this disclosure, "multiple" refers to two or more.

[0059] Before providing a detailed explanation of the embodiments of this application, some relevant technical terms and technologies involved in the embodiments of this application will be introduced first.

[0060] A blockchain is a chain of blocks. Each block stores specific information, and these blocks are linked together in chronological order of their creation. This chain is stored on all servers, and as long as at least one server in the system is operational, the entire blockchain is secure. These servers are called nodes in the blockchain system, and they provide storage space and computing power for the entire system. To modify information in the blockchain, the consent of more than half of the nodes must be obtained, and the information in all nodes must be modified. Since these nodes are usually controlled by different entities, tampering with information in the blockchain is extremely difficult. Compared to traditional networks, blockchain has two core characteristics: data is difficult to tamper with, and it is decentralized. Based on these two characteristics, the information recorded by the blockchain is more authentic and reliable, helping to solve the problem of mutual distrust.

[0061] In the globalized foreign exchange market, transactions take place day and night. However, due to the different operating hours of payment systems in different regions, there is a risk that one party to a transaction may execute the transaction, but the other party may be bankrupt and unable to deliver the currency for compensation or offsetting, which is known as the "Herstatt risk".

[0062] Therefore, there is an urgent need to design a trading method to solve the problem of asynchronous trading, thereby reducing the probability of "Herstatt risk".

[0063] To address the aforementioned issues, this application provides a transaction method that establishes a simultaneous payment vs. payment (PVP) mechanism, enabling both parties to complete settlement at the same time. This method is significant for mitigating the risk of settlement time differences between different trading time zones and improving the efficiency of the foreign exchange market.

[0064] The transaction method provided in this application can be applied to blockchain transaction systems. Figure 1 A schematic diagram of one structure of the blockchain transaction system is shown. For example... Figure 1 As shown, the blockchain transaction system 10 includes a transaction initiator node 11 and a transaction receiver node 12. The transaction initiator node 11 and the transaction receiver node 12 can be connected via a wired or wireless connection; this embodiment does not limit the connection in this way.

[0065] Both the transaction initiator node 11 and the transaction receiver node 12 can be considered as any blockchain node in the blockchain transaction system 10. The transaction initiator node 11 can be any server in the financial sector, such as a bank server, or it can be a server cluster composed of multiple servers; this application does not impose any limitation on this. Similarly, the transaction receiver node 12 can be any server in the financial sector, such as a bank server, or it can be a server cluster composed of multiple servers; this application does not impose any limitation on this.

[0066] Optional, such as Figure 2 As shown, the transaction initiator node 11 and the transaction receiver node 12 are independent blockchain nodes, each equipped with a synchronous transaction module (PVP), a privacy module, a message center module, and a chain transaction module (Keel). The PVP module generates transaction-related information, the privacy module encrypts various messages, the message center module monitors messages within the blockchain nodes, and the chain transaction module sends transaction-related information to the blockchain nodes.

[0067] Optionally, the blockchain transaction system 10 also includes a regulatory node 13, which can be any blockchain node in the blockchain transaction system 10. For example, the regulatory node 13 can be the server of a relevant regulatory body. The relevant regulatory body can be the regulatory server of the transaction initiator node 11 or the regulatory server of the transaction receiver node 12.

[0068] Figure 3 This is a flowchart illustrating a trading method according to some exemplary embodiments. In some embodiments, the above-described trading method can be applied to, for example... Figure 1 The blockchain transaction system shown can also be applied to other similar systems.

[0069] like Figure 3 As shown, the transaction method provided in this embodiment includes the following steps S201-S205.

[0070] S201. The transaction initiating node sends the transaction request information of the current transaction to the blockchain.

[0071] The transaction request information is used to request confirmation from the transaction recipient node whether it agrees to conduct the current transaction.

[0072] As one possible implementation, after determining that a transaction will be conducted with the transaction recipient node, the transaction initiating node sends the transaction request information of the current transaction to the blockchain.

[0073] It should be noted that the target request information can be sent in the form of a query message. The content of the target request information includes at least one of the following: the first account address of the transaction initiator node, the second account address of the transaction recipient node, the first transaction amount of the transaction initiator node, the second transaction amount of the transaction recipient node, the first currency of the transaction initiator node, and the second currency of the transaction recipient node.

[0074] To ensure account privacy, the first account address can be a one-time pseudonym address encrypted by the transaction initiator node using a privacy module. This one-time pseudonym address is calculated based on a pseudonym algorithm.

[0075] As another possible implementation, the transaction initiating node obtains the public key of the transaction receiving node and encrypts the transaction request information based on the public key of the transaction receiving node. Further, the transaction initiating node sends the encrypted transaction request information to the blockchain.

[0076] For example, such as Figure 4 The diagram illustrates the process of a transaction initiating node conducting a transaction inquiry. Before engaging in a transaction with the receiving node, the initiating node first completes its own compliance checks through the synchronized transaction module. These checks include whether the transaction limit and post-transaction wallet limit are compliant, and whether the receiving node's risk verification is successful. Next, the initiating node obtains a one-time pseudonymous address for the transaction through the privacy module and encrypts the transaction request information using the receiving node's initial on-chain encryption public key. Finally, the initiating node sends the encrypted transaction request information to the blockchain through the on-chain transaction module.

[0077] S202. The transaction receiving node obtains the transaction request information sent by the transaction initiating node from the blockchain.

[0078] As one possible implementation, the transaction receiving node obtains the transaction request information sent by the transaction initiating node from the blockchain through the message center module.

[0079] It should be noted that the transaction receiving node monitors the blocks in the blockchain through the message center module. When a new block is generated in the blockchain, the transaction receiving node will obtain the information of the new block and parse it.

[0080] In some embodiments, when parsing a new block, the transaction receiving node uses its own private key for encryption. That is, if the new block is encrypted using the transaction receiving node's public key, the transaction receiving node can successfully parse the content of the new block.

[0081] For example, the initiating node encrypts the transaction request information using the receiving node's public key and sends it to the blockchain. The receiving node can then retrieve and successfully parse this transaction request information from the blockchain, obtaining the initiating node's first account address, the receiving node's second account address, the initiating node's first transaction amount, the receiving node's second transaction amount, the initiating node's first currency, and the receiving node's second currency.

[0082] S203. The transaction receiving node responds to the transaction request information, generates transaction response information, and sends the transaction response information to the blockchain.

[0083] As one possible implementation, after decrypting the transaction request information and obtaining the current transaction content, the receiving node verifies the transaction content. If the verification is correct, it generates a transaction response indicating agreement to proceed with the transaction and sends the response to the blockchain. If the verification fails, it generates a transaction response indicating disagreement with the transaction and sends that response to the blockchain as well.

[0084] For example, the receiving node verifies the amount, currency, and exchange rate of the two parties in the transaction request information, obtains the account address of the initiating node from the transaction request information, and generates a response indicating agreement to the transaction after verifying that the information is correct.

[0085] It should be noted that the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node.

[0086] To ensure account privacy, the third account address can be a one-time pseudonym address encrypted by the transaction recipient node using a privacy module. This one-time pseudonym address is calculated based on a pseudonym algorithm.

[0087] In some embodiments, when the transaction recipient node agrees to the current transaction, the transaction recipient node sends transaction response information to the blockchain, including: the transaction recipient node encrypts the transaction response information according to the public key of the transaction initiator node and then sends it to the blockchain.

[0088] For example, such as Figure 5The diagram illustrates the process of a transaction recipient node responding to a transaction. The recipient node parses the blockchain information through the message center module to obtain the transaction request information and pushes it to the synchronization transaction module. The synchronization transaction module requests the privacy module to decrypt the transaction request information using its own encrypted private key to verify its content. If the verification is successful, the synchronization transaction module generates a response message indicating agreement to the transaction (i.e., the transaction response information), encrypts the response message using the target transaction object's encrypted public key through the privacy module, and sends the encrypted response message to the blockchain through the chain transaction module.

[0089] S204. The transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain. If the transaction response information indicates that the transaction receiving node agrees to the current transaction, the node calls the smart contract on the blockchain to execute the current transaction and generate the first synchronous transaction event.

[0090] The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction.

[0091] As one possible implementation, the transaction initiating node retrieves the transaction response information sent by the transaction receiving node from the blockchain, and decrypts the response information using the initiating node's encrypted private key to determine whether the receiving node agrees to the current transaction. If the transaction response information indicates that the receiving node agrees to the current transaction, the initiating node sends the first synchronization transaction information to the blockchain and invokes a smart contract on the blockchain to execute the current transaction, thereby generating the first synchronization transaction event; wherein, the first synchronization transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority.

[0092] In some embodiments, the transaction initiating node sends the first synchronous transaction information to the blockchain and calls the smart contract on the blockchain to execute the current transaction to generate the first synchronous transaction event, including: the transaction initiating node uses the smart contract to perform compliance verification of the first synchronous transaction information (such as the amount and exchange rate of the two parties in the transaction) using zero-knowledge circuits, and generates the first synchronous transaction event if the verification is successful.

[0093] For example, such as Figure 6The diagram illustrates the process of a PVP transaction initiated by the transaction initiating node. The initiating node parses the blockchain information through the message center module, obtains a response message, and pushes it to the synchronization transaction module. The synchronization transaction module requests the privacy module to decrypt the response message using its own encrypted private key. If the response message indicates that the target transaction partner agrees to the transaction, the initiating node sends the first synchronization transaction information to the blockchain through the chain transaction module and invokes the smart contract on the blockchain to execute the current transaction, thereby generating the first synchronization transaction event.

[0094] S205. The transaction receiving node receives the first synchronous transaction event, calls the smart contract on the blockchain and executes the current transaction to generate the second synchronous transaction event.

[0095] The second synchronous transaction event is used to indicate that the transaction recipient node has executed the current transaction.

[0096] As one possible implementation, the transaction receiving node sends the second synchronization transaction information to the blockchain and invokes a smart contract on the blockchain to execute the current transaction, thereby generating a second synchronization transaction event. The second synchronization transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority. Furthermore, upon receiving the first synchronization transaction event, the transaction receiving node determines that the current transaction is complete.

[0097] In some embodiments, the transaction receiving node sends the second synchronous transaction information to the blockchain and calls the smart contract on the blockchain to execute the current transaction to generate a second synchronous transaction event. This includes: the transaction receiving node using the smart contract to perform compliance verification on the second synchronous transaction information (such as the amount and exchange rate between the two parties) through zero-knowledge circuits, and generating a second synchronous transaction event if the verification is successful.

[0098] For example, such as Figure 7 The diagram illustrates the process of a PVP transaction conducted by a transaction receiving node. The receiving node verifies the content of the transaction request information. If the verification is correct, it generates a response message indicating agreement to the transaction. Further, the receiving node sends the second synchronous transaction information to the blockchain via the chain transaction module and invokes a smart contract on the blockchain to execute the current transaction, thereby generating a second synchronous transaction event.

[0099] The embodiments of this application provide at least the following beneficial effects: The transaction initiating node sends a transaction request to the blockchain to request confirmation of whether the transaction receiving node agrees to the current transaction. Further, the transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain. If the transaction response information indicates that the transaction receiving node agrees to the current transaction, the initiating node invokes the smart contract on the blockchain to execute the current transaction, generating a first synchronous transaction event; wherein, the first synchronous transaction event indicates that the transaction initiating node has executed the current transaction. If it is determined that the transaction receiving node has invoked the smart contract on the blockchain and completed the execution of the current transaction to generate a second synchronous transaction event, the current transaction is determined to be complete; wherein, the second synchronous transaction event indicates that the transaction receiving node has executed the current transaction. Because the transaction initiating node generates the first synchronous transaction event by executing the current transaction, and the current transaction is only determined to be complete after it is determined that the transaction receiving node has also executed the current transaction and generated the second synchronous transaction event, it ensures that both parties to the transaction have executed the transaction, thereby avoiding the occurrence of asynchronous settlement phenomena in related technologies.

[0100] It should be noted that a transaction can only be considered complete after both the initiating node and the receiving node have finished executing the current transaction. At this point, the blockchain transaction system executes a smart contract to synchronize the transaction between the initiating node's first account address and the receiving node's third account address, so that the first transaction amount corresponding to the first currency is transferred to the receiving node's third account address and the second transaction amount corresponding to the second currency is transferred to the initiating node's first account address.

[0101] In some embodiments, the transaction initiator node sends the first synchronized transaction information to the blockchain, and the relevant regulatory node can also query or store the first synchronized transaction information.

[0102] Similarly, the receiving node sends the second synchronized transaction information to the blockchain for querying or storage by relevant regulatory nodes. The content of the first and second synchronized transaction information is identical; the difference lies in that the first synchronized transaction information is submitted by the transaction initiating node, while the second synchronized transaction information is submitted by the transaction receiving node. Typically, the regulatory body corresponding to the transaction initiating node is different from that corresponding to the transaction receiving node.

[0103] For example, such as Figure 8The diagram illustrates the process of a regulatory node monitoring PVP transactions. The regulatory node retrieves PVP transaction messages (i.e., first or second synchronized transaction information) from the blockchain nodes via the message center module. The regulatory node then decrypts the PVP transaction messages using its own encryption key through the privacy module to obtain the first or second synchronized transaction information, and stores it in the database.

[0104] Understandable, such as Figure 9 As shown, this application provides a complete and efficient blockchain-based synchronous settlement method through transaction inquiry, transaction response, PVP transaction, PVP transaction completion, and regulatory reporting. Before the transaction begins, the initiator first inquires with the target party about the transaction. The transaction proceeds only after receiving the target party's agreement, laying the foundation for synchronous settlement. Furthermore, this application utilizes the inherent decentralized structure of blockchain to solve the single point of failure problem. After receiving transaction information from both parties and confirming that their information matches, the transaction is executed through a smart contract, ensuring that the payments to both parties are completed simultaneously. In addition, this application introduces privacy protection technologies such as asymmetric encryption and pseudonym systems during the transaction process, protecting the privacy of both parties while achieving regulatory oversight.

[0105] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the cross-border payment device or electronic device includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0106] This application embodiment can, based on the above method, exemplarily divide a cross-border payment device or electronic device into functional modules. For example, the cross-border payment device or electronic device may include functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0107] Figure 10This is a block diagram illustrating a transaction apparatus according to an exemplary embodiment. (Refer to...) Figure 10 The transaction device 30 is applied to the transaction initiator node. The transaction device 30 includes a sending unit 301, a processing unit 302, and a determining unit 303.

[0108] Sending unit 301 is used to send transaction request information of the current transaction to the blockchain. The transaction request information is used to request confirmation of whether the transaction receiving node agrees to the current transaction. Processing unit 302 is used to obtain transaction response information sent by the transaction receiving node from the blockchain. If the transaction response information indicates that the transaction receiving node agrees to the current transaction, it calls the smart contract on the blockchain to execute the current transaction and generate a first synchronous transaction event. The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction. Determining unit 303 is used to determine that the current transaction is completed if it is determined that the transaction receiving node has called the smart contract on the blockchain and executed the current transaction to generate a second synchronous transaction event. The second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

[0109] Optionally, the transaction request information includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the sending unit 301 is specifically used for: the transaction initiating node obtaining the encryption public key of the transaction receiving node, and encrypting the transaction request information according to the encryption public key of the transaction receiving node; the transaction initiating node sending the encrypted transaction request information to the blockchain.

[0110] Optionally, the first account address of the transaction initiator node is calculated using a pseudonym algorithm.

[0111] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction response information is encrypted by the transaction receiving node according to the encryption public key of the transaction initiating node and then sent to the blockchain.

[0112] Optionally, the third account address of the transaction recipient node is calculated using a pseudonym algorithm.

[0113] Optionally, the processing unit 302 is further configured to: obtain transaction response information sent by the transaction recipient node from the blockchain, and decrypt the transaction response information according to the encrypted private key of the transaction initiator node, so as to determine whether the transaction recipient node agrees to the current transaction.

[0114] Optionally, processing unit 302 is specifically used for: the transaction initiating node sending the first synchronized transaction information to the blockchain and calling the smart contract on the blockchain to execute the current transaction to generate the first synchronized transaction event; wherein, the first synchronized transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction initiating node sending the first synchronized transaction information to the blockchain so that the relevant regulatory authority node can query or store the first synchronized transaction information.

[0115] Optionally, the processing unit 302 is specifically used for: the transaction initiating node to perform compliance verification of the first synchronous transaction information through a smart contract using a zero-knowledge circuit, and to generate a first synchronous transaction event if the verification is successful.

[0116] Figure 11 This is a block diagram of another transaction apparatus according to an exemplary embodiment. (Refer to...) Figure 11 The transaction device 40 is applied to the transaction receiving node. The transaction device 40 includes an acquisition unit 401, a sending unit 402, and a processing unit 403.

[0117] The acquisition unit 401 is used to acquire transaction request information sent by the transaction initiator node from the blockchain; the transaction request information is used to request confirmation from the transaction recipient node whether it agrees to the current transaction; the sending unit 402 is used to send transaction response information to the blockchain if the transaction recipient node agrees to the current transaction; the acquisition unit 401 is also used to receive the transaction response information from the transaction initiator node, call the smart contract on the blockchain, and execute the first synchronous transaction event generated by the current transaction; the first synchronous transaction event is used to indicate that the transaction initiator node has executed the current transaction; the processing unit 403 is used to call the smart contract on the blockchain and execute the current transaction to generate a second synchronous transaction event; the second synchronous transaction event is used to indicate that the transaction recipient node has executed the current transaction.

[0118] Optionally, the processing unit 403 is further configured to: decrypt the transaction request information according to the encrypted private key of the transaction recipient node to obtain the current transaction content; the current transaction content includes at least one of the following: the first account address of the transaction initiator node, the second account address of the transaction recipient node, the first transaction amount of the transaction initiator node, the second transaction amount of the transaction recipient node, the first currency of the transaction initiator node, and the second currency of the transaction recipient node; verify the current transaction content, and if the verification is correct, generate transaction response information to indicate agreement to the current transaction, and send the transaction response information to the blockchain.

[0119] Optionally, the first account address of the transaction initiator node is calculated using a pseudonym algorithm.

[0120] Optionally, the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the sending unit is specifically used for: the transaction receiving node encrypting the transaction response information according to the encryption public key of the transaction initiating node and sending it to the blockchain.

[0121] Optionally, the third account address of the transaction recipient node is calculated using a pseudonym algorithm.

[0122] Optionally, the processing unit 403 is specifically used for: the transaction receiving node sending the second synchronization transaction information to the blockchain and calling the smart contract on the blockchain to execute the current transaction to generate a second synchronization transaction event; wherein, the second synchronization transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction receiving node sending the second synchronization transaction information to the blockchain so that the relevant regulatory authority node can query or store the second synchronization transaction information.

[0123] Optionally, the processing unit 403 is specifically used for: the transaction receiving node to perform compliance verification of the second synchronous transaction information through a smart contract using a zero-knowledge circuit, and to generate a second synchronous transaction event if the verification is successful.

[0124] Figure 12 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 12 As shown, the electronic device 50 includes, but is not limited to, a processor 501 and a memory 502.

[0125] The memory 502 described above is used to store the executable instructions of the processor 501. It is understood that the processor 501 is configured to execute instructions to implement the transaction method in the above embodiments.

[0126] It should be noted that those skilled in the art will understand that Figure 12 The electronic device structure shown does not constitute a limitation on the electronic device; the electronic device may include, but is not limited to, other electronic devices. Figure 12 This may indicate more or fewer components, or combinations of certain components, or different component arrangements.

[0127] Processor 501 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in memory 502, and by calling data stored in memory 502, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Processor 501 may include one or more processing units; optionally, processor 501 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor can also be integrated into processor 501.

[0128] The memory 502 can be used to store software programs and various data. The memory 502 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, application programs required by at least one functional module, etc. Furthermore, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0129] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 502 including instructions, which can be executed by a processor 501 of an electronic device 50 to implement the transaction method in the above embodiments.

[0130] In actual implementation, the sending unit 301, processing unit 302, and determining unit 303 in the trading device 30, and the acquiring unit 401, sending unit 402, and processing unit 403 in the trading device 40, can all be [implemented by...]. Figure 12 The processor 501 calls the computer program stored in the memory 502 to implement the process. The specific execution process can be found in the description of the transaction method section of the previous embodiment, and will not be repeated here.

[0131] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0132] In an exemplary embodiment, this application also provides a computer program product including one or more instructions, which can be executed by the processor 501 of the electronic device 50 to complete the transaction method in the above embodiments.

[0133] It should be noted that when one or more instructions in the computer-readable storage medium or computer program product are executed by the processor 501 of the electronic device 50, they implement the various processes of the above-described transaction method embodiments and achieve the same technical effect as the above-described transaction method. To avoid repetition, they will not be described again here.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the classified units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into a single processor, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The integrated units described above can be implemented in hardware or as software functional units.

[0138] 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 readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0139] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A trading method, characterized in that, Applied to the transaction initiator node, the method includes: The transaction initiating node sends a transaction request to the blockchain, which is used to request confirmation from the transaction receiving node whether it agrees to the current transaction. The transaction request includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node. The transaction initiating node sends the transaction request information for the current transaction to the blockchain, including: The transaction initiator node obtains the encryption public key of the transaction receiver node, and encrypts the transaction request information according to the encryption public key of the transaction receiver node; The transaction initiating node sends the encrypted transaction request information to the blockchain; The transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain. If the transaction response information indicates that the transaction receiving node agrees to the current transaction, the initiating node invokes a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event. The first synchronous transaction event indicates that the transaction initiating node has executed the current transaction. The transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node. The transaction response information is encrypted by the transaction receiving node using the public key of the transaction initiating node before being sent to the blockchain. The transaction initiating node invokes a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event, including: The transaction initiating node sends the first synchronized transaction information to the blockchain and calls the smart contract on the blockchain to execute the current transaction, thereby generating the first synchronized transaction event; wherein, the first synchronized transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; The transaction initiator node sends the first synchronized transaction information to the blockchain so that relevant regulatory nodes can query or store the first synchronized transaction information; The current transaction is determined to be complete if the transaction receiving node invokes the smart contract on the blockchain and executes the current transaction to generate a second synchronous transaction event; wherein the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

2. The transaction method according to claim 1, characterized in that, The method further includes: The first account address of the transaction initiator node is obtained by calculating using a pseudonym algorithm.

3. The transaction method according to claim 2, characterized in that, The method further includes: The third account address of the transaction recipient node is obtained by calculating using a pseudonym algorithm.

4. The transaction method according to claim 2, characterized in that, The method further includes: The transaction initiating node obtains the transaction response information sent by the transaction receiving node from the blockchain, and decrypts the transaction response information according to the encryption private key of the transaction initiating node to determine whether the transaction receiving node agrees to the current transaction.

5. The transaction method according to claim 1, characterized in that, The transaction initiating node sends the first synchronization transaction information to the blockchain and invokes a smart contract on the blockchain to execute the current transaction, thereby generating the first synchronization transaction event, including: The transaction initiating node uses the smart contract and zero-knowledge circuits to perform compliance verification on the first synchronous transaction information, and generates the first synchronous transaction event if the verification is successful.

6. A trading method, characterized in that, Applied to the transaction recipient node, the method includes: The transaction receiving node obtains the transaction request information sent by the transaction initiating node from the blockchain; the transaction request information is used to request confirmation of whether the transaction receiving node agrees to the current transaction; the transaction receiving node decrypts the transaction request information according to its private encryption key to obtain the current transaction content; the current transaction content includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node. The transaction receiving node verifies the current transaction content. If the verification is correct, it generates transaction response information indicating agreement to the current transaction and sends the transaction response information to the blockchain. When the receiving node agrees to the current transaction, the receiving node sends transaction response information to the blockchain; the transaction response information includes at least one of the following: the first account address of the initiating node, the third account address of the receiving node, the first transaction amount of the initiating node, the second transaction amount of the receiving node, the first currency of the initiating node, and the second currency of the receiving node. The transaction receiving node sends transaction response information to the blockchain, including: The transaction receiving node encrypts the transaction response information using the encryption public key of the transaction initiating node and then sends it to the blockchain; The transaction receiving node receives the transaction response information from the transaction initiating node, invokes the smart contract on the blockchain, and executes the first synchronous transaction event generated by the current transaction; the first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction; The transaction receiving node invokes the smart contract on the blockchain and executes the current transaction to generate a second synchronous transaction event; the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction; The transaction receiving node invokes the smart contract on the blockchain and executes the current transaction to generate a second synchronous transaction event, including: The transaction receiving node sends the second synchronization transaction information to the blockchain and invokes the smart contract on the blockchain to execute the current transaction, thereby generating the second synchronization transaction event; wherein, the second synchronization transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; The transaction receiving node sends the second synchronized transaction information to the blockchain so that relevant regulatory nodes can query or store the second synchronized transaction information.

7. The transaction method according to claim 6, characterized in that, The first account address of the transaction initiator node is obtained by calculating using a pseudonym algorithm.

8. The transaction method according to claim 6, characterized in that, The third account address of the transaction recipient node is obtained by calculating using a pseudonym algorithm.

9. The transaction method according to claim 6, characterized in that, The transaction receiving node sends the second synchronization transaction information to the blockchain and invokes a smart contract on the blockchain to execute the current transaction, thereby generating the second synchronization transaction event, including: The transaction receiving node uses the smart contract and zero-knowledge circuitry to perform compliance verification on the second synchronous transaction information, and generates the second synchronous transaction event if the verification is successful.

10. A trading method, characterized in that, The method is applied to a blockchain transaction system, which includes a transaction initiator node and a transaction receiver node. The transaction initiator node executes the transaction method according to any one of claims 1-5, or the transaction receiver node executes the transaction method according to any one of claims 6-9. The transaction initiating node sends a transaction request message for the current transaction to the blockchain. The transaction request message is used to request confirmation from the transaction receiving node whether it agrees to proceed with the current transaction. The transaction receiving node obtains the transaction request information sent by the transaction initiating node from the blockchain. If the transaction receiving node agrees to the current transaction, the transaction receiving node sends transaction response information to the blockchain. The transaction initiator node obtains the transaction response information sent by the transaction recipient node from the blockchain. If the transaction response information indicates that the transaction recipient node agrees to the current transaction, the initiator node calls the smart contract on the blockchain to execute the current transaction and generate a first synchronous transaction event. The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction; The transaction receiving node receives the first synchronous transaction event, invokes the smart contract on the blockchain and executes the current transaction to generate the second synchronous transaction event; The second synchronous transaction event is used to indicate that the transaction recipient node has executed the current transaction.

11. The transaction method according to claim 10, characterized in that, The method further includes: The blockchain transaction system executes the smart contract to synchronize the transaction between the first account address of the transaction initiator node and the third account address of the transaction receiver node, so that the first transaction amount corresponding to the first currency is transferred to the third account address of the transaction receiver node and the second transaction amount corresponding to the second currency is transferred to the first account address of the transaction initiator node.

12. A trading device, characterized in that, Applied to the transaction initiator node, the device includes a sending unit, a processing unit, and a determining unit; The sending unit is used to send transaction request information of the current transaction to the blockchain. The transaction request information is used to request confirmation of whether the transaction receiving node agrees to the current transaction. The transaction request information includes at least one of the following: the first account address of the transaction initiating node, the second account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node. Specifically, the sending unit is used for: the transaction initiating node obtaining the encryption public key of the transaction receiving node, and encrypting the transaction request information according to the encryption public key of the transaction receiving node; the transaction initiating node sending the encrypted transaction request information to the blockchain; The processing unit is configured to obtain transaction response information sent by the transaction receiving node from the blockchain, and, if the transaction response information indicates that the transaction receiving node agrees to the current transaction, invoke a smart contract on the blockchain to execute the current transaction, thereby generating a first synchronous transaction event; the first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction; the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; the transaction response information is encrypted by the transaction receiving node according to the encryption public key of the transaction initiating node before being sent to the blockchain; Specifically, the processing unit is used for: the transaction initiating node sending the first synchronized transaction information to the blockchain and calling the smart contract on the blockchain to execute the current transaction to generate the first synchronized transaction event; wherein the first synchronized transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction initiating node sending the first synchronized transaction information to the blockchain so that the relevant regulatory authority node can query or store the first synchronized transaction information; The determining unit is configured to determine that the current transaction is completed when the transaction receiving node calls the smart contract on the blockchain and executes the current transaction to generate a second synchronous transaction event; wherein the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction.

13. A trading device, characterized in that, Applied to a transaction receiving node, the device includes an acquisition unit, a sending unit, and a processing unit; The acquisition unit is used to acquire transaction request information sent by the transaction initiator node from the blockchain; the transaction request information is used to request confirmation from the transaction recipient node whether it agrees to the current transaction; the transaction recipient node decrypts the transaction request information according to its encrypted private key to obtain the current transaction content; the current transaction content includes at least one of the following: the first account address of the transaction initiator node, the second account address of the transaction recipient node, the first transaction amount of the transaction initiator node, the second transaction amount of the transaction recipient node, the first currency of the transaction initiator node, and the second currency of the transaction recipient node; The sending unit is used to verify the current transaction content, and if the verification is correct, generate transaction response information to indicate agreement to the current transaction, and send the transaction response information to the blockchain; The sending unit is further configured to send transaction response information to the blockchain when the transaction receiving node agrees to the current transaction; the transaction response information includes at least one of the following: the first account address of the transaction initiating node, the third account address of the transaction receiving node, the first transaction amount of the transaction initiating node, the second transaction amount of the transaction receiving node, the first currency of the transaction initiating node, and the second currency of the transaction receiving node; The sending unit is specifically used for: the transaction receiving node encrypting the transaction response information according to the encryption public key of the transaction initiating node and then sending it to the blockchain; The acquisition unit is also used to receive the transaction response information from the transaction initiator node, call the smart contract on the blockchain, and execute the first synchronous transaction event generated by the current transaction; The first synchronous transaction event is used to indicate that the transaction initiating node has executed the current transaction; The processing unit is used to invoke the smart contract on the blockchain and execute the current transaction to generate a second synchronous transaction event; the second synchronous transaction event is used to indicate that the transaction receiving node has executed the current transaction; The processing unit is specifically configured to: send the second synchronous transaction information to the blockchain and call the smart contract on the blockchain to execute the current transaction to generate the second synchronous transaction event; wherein, the second synchronous transaction information includes the current transaction content encrypted using the public key of the relevant regulatory authority; the transaction receiving node sends the second synchronous transaction information to the blockchain so that the relevant regulatory authority node can query or store the second synchronous transaction information.

14. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the transaction method as described in any one of claims 1-9.

15. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is capable of performing the transaction method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Anonymous transfer method and system based on block chain, and storage medium

    CN108764874A