CN116308786A - Processing method, system, electronic equipment and readable storage medium for blockchain transaction - Google Patents

Processing method, system, electronic equipment and readable storage medium for blockchain transaction Download PDF

Info

Publication number
CN116308786A
CN116308786A CN202310216091.1A CN202310216091A CN116308786A CN 116308786 A CN116308786 A CN 116308786A CN 202310216091 A CN202310216091 A CN 202310216091A CN 116308786 A CN116308786 A CN 116308786A
Authority
CN
China
Prior art keywords
transaction
account
proxy
node
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310216091.1A
Other languages
Chinese (zh)
Inventor
苏羽
顾费勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202310216091.1A priority Critical patent/CN116308786A/en
Publication of CN116308786A publication Critical patent/CN116308786A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a processing method, a processing system, electronic equipment and a computer readable storage medium for blockchain transactions, and the embodiment of the application receives a transaction request sent by a transaction initiation account through an agent node; the agent node generating an agent transaction request based on the transaction request, sending the agent transaction request to the intelligent contract node, and paying the intelligent contract node for the native token required to complete the agent transaction request, wherein the agent transaction request includes account information of a transaction initiating account and a transaction receiving account, a first virtual token amount, and a second virtual token amount; the intelligent contract node receives the proxy transaction request, performs a transaction of a first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of a second virtual token amount between the transaction initiating account and the proxy node. The embodiment of the application can improve the efficiency of carrying out blockchain transaction on the account without the original token.

Description

Processing method, system, electronic equipment and readable storage medium for blockchain transaction
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a processing method, a system, an electronic device, and a computer readable storage medium for blockchain transactions.
Background
Under the tide of the internet, the blockchain technology is increasingly widely applied in the life of people, and accordingly, the blockchain-based tokens are increasingly used in more and more application scenes, and currently, if a transaction between two accounts is to be realized on a blockchain, for example, token transfer, gas fees generated in the transaction process need to be paid through the original tokens on the blockchain.
Since the existing account does not always have a native token, for example, only ERC20 tokens are present in the account, if an account without a native token is to be transacted, a transaction is performed after transferring a native token to the account without a native token in advance. Since the actual scenes of the token transaction process are different, the actual paid native tokens are different, so that to avoid the shortage of the native tokens, the full-amount of the native tokens need to be transferred to the account without the native tokens, but the full-amount of the native tokens are not used in the transaction process, which results in waste of resources, and additional time is spent for transferring the tokens, thereby resulting in lower efficiency of blockchain transactions of the account without the native tokens.
Disclosure of Invention
The embodiment of the application provides a processing method, a processing system, electronic equipment and a computer readable storage medium for blockchain transactions, which can improve the efficiency of blockchain transactions of accounts without holding native tokens.
In a first aspect, an embodiment of the present application provides a method for processing a blockchain transaction, applied to a blockchain, where the blockchain includes an agent node and an intelligent contract node, the method includes:
the agent node receives a transaction request sent by a transaction initiating account, wherein the transaction request comprises transaction content, and the transaction content comprises account information of a transaction receiving account, a first virtual token amount transacted with the transaction receiving account, and a second virtual token amount paid to the agent node;
the agent node generating an agent transaction request based on the transaction request, transmitting the agent transaction request to the smart contract node, and paying the smart contract node for a native token required to complete the agent transaction request, wherein the agent transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
The smart contract node receives the proxy transaction request, performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In a second aspect, an embodiment of the present application further provides a processing system for a blockchain transaction, where the blockchain includes an agent node and an intelligent contract node, and the system includes:
a request receiving module, the request receiving module being applied to the proxy node, the request receiving module being configured to receive a transaction request sent by a transaction initiation account, wherein the transaction request includes transaction content, the transaction content including account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the proxy node;
a request generation module, the request generation module being applied to the proxy node, the request generation module being configured to generate a proxy transaction request based on the transaction request, send the proxy transaction request to the smart contract node, and pay the smart contract node for a native token required to complete the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
And a transaction module, applied to the smart contract node, for receiving the proxy transaction request, for performing a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and for performing a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In a third aspect, embodiments of the present application further provide an electronic device, including a memory storing a plurality of instructions; the processor loads instructions from the memory to perform steps in any of the blockchain transaction processing methods provided by embodiments of the present application.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform steps in any of the methods of processing blockchain transactions provided by embodiments of the present application.
In this embodiment, a transaction request sent by a transaction initiation account is received by the agent node, where the transaction request includes transaction content, and the transaction content includes account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the agent node; the agent node also generates an agent transaction request based on the transaction request, sends the agent transaction request to the smart contract node, and pays the smart contract node for the native tokens required to complete the agent transaction request, wherein the agent transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount; and finally, the intelligent contract node receives the proxy transaction request, and based on the proxy transaction request, the first virtual token amount is transacted between the transaction initiating account and the transaction receiving account, and the second virtual token amount is transacted between the transaction initiating account and the proxy node, so that under the condition that the transaction initiating account does not have the original token, the proxy node proxies the transaction initiating account to initiate the request to the intelligent contract node, so that the intelligent contract node is caused to conduct the blockchain transaction which the transaction initiating account wants to conduct based on the request, and the efficiency of the blockchain transaction of the account which does not hold the original token is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a processing method of a blockchain transaction according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of one embodiment of a method for processing a blockchain transaction provided in the embodiments of the present application;
FIG. 3 is a schematic diagram of a blockchain transaction processing system according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Before explaining the embodiments of the present application in detail, some terms related to the embodiments of the present application are explained.
Wherein in the description of embodiments of the present application, the terms "first," "second," and the like may be used herein to describe various concepts, but such concepts are not limited by these terms unless otherwise specified. These terms are only used to distinguish one concept from another. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Wherein, the blockchain: is a decentralized distributed database that consists of blocks one after the other. Each block holds certain information which is linked in a chain according to the time sequence of their respective generation.
Wherein, the blockchain node: refers to devices participating in the construction of a blockchain, such as personal computers, web servers, database servers, smartphones, etc., without limitation, e.g., each blockchain node on the blockchain may be deployed on one server or on a different server. Point-to-point communication can be performed between any two blockchain nodes on a blockchain, so that corresponding transactions, such as transactions of deploying intelligent contracts, updating stored data or generating new stored data, are realized.
It should be noted that, in the processing method for a blockchain transaction provided in the embodiments of the present application, corresponding steps may be generally executed by an agent node and an intelligent contract node on the blockchain respectively. Accordingly, the processing system for blockchain transactions provided in the embodiments of the present application may generally also include modules corresponding to the agent node and the intelligent contract node, respectively.
Wherein tokens on the blockchain: refers to an abstract asset based blockchain that may be held and used to represent assets, cash or access rights, etc. The native tokens are tokens that are directly issued by the blockchain bottom layer and are used for realizing the basic operation of the blockchain. It will be appreciated that any transaction or activity performed on the blockchain requires the native token to be used to pay the Gas fees generated during the transaction activity.
The embodiment of the application provides a processing method, a system, electronic equipment and a computer readable storage medium for blockchain transactions. Specifically, the processing method of the blockchain transaction in the embodiment of the present application may be executed by an electronic device, that is, the agent node and the intelligent contract node on the blockchain applied by the processing method of the blockchain transaction in the embodiment of the present application are respectively electronic devices, and the agent node and the intelligent contract node may be located on the same electronic device or may be located on different electronic devices. The electronic device may be a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), and the like, and the terminal may further include a client, which may be a game application client, a browser client carrying a game program, or an instant messaging client, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms.
For example, as shown in fig. 1, the electronic device is illustrated by taking a terminal as an example, and the terminal 10 corresponding to the proxy node may receive a transaction request sent by a transaction initiation account, where the transaction request includes transaction content, the transaction content includes account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the proxy node; the terminal 10 corresponding to the proxy node may generate a proxy transaction request based on the transaction request, transmit the proxy transaction request to the terminal corresponding to the smart contract node, and pay the terminal corresponding to the smart contract node for the native token required for completing the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiation account and the transaction receipt account, the first virtual token amount, and the second virtual token amount. The terminal 20 corresponding to the smart contract node may receive the proxy transaction request, and may perform a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and a transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
Based on the above problems, embodiments of the present application provide a method, a system, an electronic device, and a computer readable storage medium for processing a blockchain transaction, which can improve the efficiency of performing the blockchain transaction on an account that does not hold a native token.
The following detailed description is provided with reference to the accompanying drawings. The following description of the embodiments is not intended to limit the preferred embodiments. Although a logical order is depicted in the flowchart, in some cases the steps shown or described may be performed in an order different than depicted in the figures.
In this embodiment, taking an example that an agent node and an intelligent contract node are applied to a terminal as an example, the present embodiment provides a processing method of a blockchain transaction, as shown in fig. 2, a specific flow of the processing method of the blockchain transaction may be as follows:
201. the agent node receives a transaction request sent by a transaction initiating account, wherein the transaction request comprises transaction content, the transaction content comprises account information of a transaction receiving account, a first virtual token amount transacted with the transaction receiving account, and a second virtual token amount paid to the agent node.
The transaction initiating account is an account initiating the transaction, the transmitted transaction request is used for carrying out the transaction on the blockchain with the transaction receiving account, and the transaction receiving account is an account carrying out the transaction with the transaction initiating account. It will be appreciated that the transaction initiating account and the transaction receiving account need to be on a blockchain, and may be held by the same user or different users, and may be specifically determined based on the actual application scenario, which is not limited herein.
The account information of the transaction receiving account is information for identifying the transaction receiving account, and includes, but is not limited to, an account number of the transaction receiving account, an address of the transaction receiving account on a blockchain, a characteristic identifier of the transaction receiving account, and the like.
The first virtual token amount transacted with the transaction receiving account is used for indicating the token amount of the transaction initiating account and the transaction receiving account currently transacted, and may be the token amount transferred from the transaction initiating account to the transaction receiving account, or may be the token amount acquired from the transaction receiving account by the transaction initiating account, which may be specifically determined based on the actual application scenario, and is not limited herein.
It can be appreciated that, since one account needs to pay the Gas fee generated in the transaction process by the native token if it wants to realize the transaction with another account on one blockchain, and in the case that the account does not have the native token corresponding to the blockchain where the account is currently located, a proxy node is introduced in this embodiment, that is, the proxy node is used to proxy the account to send the transaction request that the transaction initiating account wants to make to the intelligent contract node, and the proxy node needs to have the native token.
The transaction request sent by the transaction initiating account to the proxy node needs to include a second virtual token amount paid to the proxy node, wherein the second virtual token amount is the token amount transferred by the transaction initiating account to the corresponding account of the proxy node, and is used as the proxy fee of the proxy node, and the amount is the willingness paid by the transaction initiating account.
In some embodiments, the transaction content further includes a current transaction number corresponding to the transaction initiation account, and the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount, and the current transaction number are represented in a form of four-tuple.
It can be understood that, because there may be a request that the proxy node has received for the transaction initiation account that has been initiated, i.e., the proxy node has received the request before the request is received this time, in order to prevent replay attacks, in this embodiment, the transaction number is introduced, i.e., when the transaction initiation account sends the transaction request, the transaction content of the transaction request further includes the current transaction number corresponding to the current transaction of the transaction initiation account, so that the proxy node queries whether it proxies the transaction this time. The transaction times are self-increment corresponding to the transaction initiating account, namely the transaction times are accumulated when the transaction initiating account initiates the transaction each time, for example, 1 is added, so that each transaction can only have one validity.
For example, the representation of the four-tuple may be (dest 1, current, fe, nonce), where dest1 in the four-tuple is account information of the transaction receiving account; the amounts in the quadruple are a first virtual token amount; fee in the quadruple is a second virtual token amount; the nonce in the quadruple is the current transaction number corresponding to the transaction initiating account, and the value can be determined according to the actual transaction number of the transaction initiating account, for example, the first transaction of the transaction initiating account on the current blockchain, then the nonce can be set to 1 or 0, specifically, the nonce is set based on the actual requirement, and is not limited herein.
In some embodiments, the transaction content further includes signature information generated by signing the transaction initiating account for the transaction content, so as to verify whether the transaction content is signed by the transaction initiating account based on the signature information, that is, to verify the validity of the transaction. If the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount and the current transaction number in the transaction content are expressed in a form of a quadruple, the signature information is signature information corresponding to the signature of the quadruple by the transaction initiating account.
For example, if the transaction initiation account is set to be an account a held by the user, there are 100 virtual tokens token in the account a, the account a is on the ETH blockchain, and there are no native tokens corresponding to the ETH blockchain in which the account a is currently located, that is, the ETH tokens. Then, the user is set to hold account B on the ETH blockchain, and there is an ETH token in account B, and the user wants to transfer the virtual token in account a held by the user to account B held by the user for portability of later use.
However, since the primary token does not exist in the account a, in order to implement the transfer of the virtual token, the account a may send a transaction request to the proxy node, so that the proxy node receives the transaction request sent by the account a, where the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount and the current transaction number in the transaction content of the transaction request may be represented in the form of a quadruple, and the transaction request further includes signing the quadruple by the account a to obtain signature information (recorded as sig). Wherein the representation of the quadruple in this example is as follows:
(B,90,10,0)
Wherein B in the quadruple is account B; 90 in the quadruple is the first virtual token amount, namely, the token amount of the virtual token transferred from the account A to the account B is 90; 10 in the quadruple is the second virtual token amount, namely, the token amount of virtual token transferred by the account A to the proxy node is 10; and 0 in the quadruple is used for indicating that the current transaction number corresponding to the account A is the first transaction.
202. The proxy node generates a proxy transaction request based on the transaction request, sends the proxy transaction request to the smart contract node, and pays the smart contract node with a native token required to complete the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount.
The account information of the transaction initiating account is information for identifying the transaction initiating account, and includes, but is not limited to, an account number of the transaction initiating account, an address of the transaction initiating account on a blockchain, a characteristic identifier of the transaction initiating account, and the like.
In this embodiment, after receiving the transaction request sent by the transaction initiation account, the proxy node may further process the transaction request to generate a proxy transaction request consistent with the transaction content corresponding to the transaction request, and the proxy node needs to pay the smart contract node for the native token required for completing the transaction content corresponding to the transaction request, where the native token may be collected by the smart contract node before processing the transaction content or may be collected by the smart contract node after processing the transaction content, which may specifically be determined based on an actual scenario, and is not limited herein.
The proxy transaction request sent by the proxy node to the intelligent contract node is to realize the transaction content requested by the transaction initiating account, so that the proxy transaction request needs to include account information of the transaction initiating account and the transaction receiving account, the first virtual token amount and the second virtual token amount, so that the intelligent contract can conduct corresponding transaction based on the content carried in the proxy transaction request.
In some embodiments, the proxy node generating a proxy transaction request based on the transaction request may include: the agent node assembles signature information generated by the transaction content in the transaction request, the transaction initiating account for sending the transaction request and the signature of the transaction initiating account on the transaction content in the transaction request to obtain an agent transaction request which is required to be sent to the intelligent contract node by the agent node.
In this embodiment, the terminal corresponding to the proxy node may process the proxy transaction request through a preset proxy protocol based on the transaction request, so as to obtain a proxy transaction request, where the proxy protocol may be integrated with the original token protocol by an interface manner, so as to implement that a transaction initiation account without a native token is proxy for transaction.
Specifically, based on the transaction content (dest 1, amount, fe, nonce) and the signature information sig in the transaction request, a proxy transaction request may be generated, in which the content transfer_by_paytoken is represented as follows:
transfer_by_payTheToken(source,dest1,amount,fee,sig)
the source is account information of a transaction initiation account; the dest1 is account information of a transaction receiving account; the amountis a first virtual token amount; the fee is a second virtual token amount; the sig is signature information of a transaction initiation account pair (dest 1, amountfee, nonce).
Illustratively, based on the above example, the representation of the content transfer_by_paytoken in the proxy transaction request is as follows:
transfer_by_payTheToken(A,B,90,10,sig)
wherein, the A is account A; the B is account B; the value 90 is the first virtual token amount, that is, the token amount of the virtual token transferred from account a to account B is 90; the value 10 is the second virtual token amount, that is, the token amount of the virtual token transferred from the account a to the agent node is 10; the sig is signature information of a transaction initiating account pair (B, 90, 10, nonce).
In some embodiments, to avoid the occurrence of an invalid proxy, the proxy node needs to perform validity check on the received transaction request before generating the proxy transaction request based on the transaction request, for example, whether the transaction content of the proxy node proxy is valid or not, or whether the total amount of virtual tokens in the transaction initiation account proxied by the proxy node is enough to support the proxy node to perform proxy transaction, so that the validity check is performed on the transaction request before generating the proxy transaction request, if the verification is passed, the proxy node generates the proxy transaction request based on the transaction request, if the verification is not passed, the proxy node may not feed back any information, or feed back the verification failure information to the transaction initiation account, so that the transaction initiation account determines whether to continue to send the transaction request to the proxy node based on the verification failure information, and whether to adjust the transaction content in the transaction request.
Wherein the proxy node may verify the transaction request by at least one of the following verification means; when the transaction request is checked in at least two ways, if the check of at least one check means is not passed, the proxy node is considered to not pass the check of the transaction request.
The verification failure information fed back by the proxy node to the transaction initiating account includes, but is not limited to, verification failure reasons, suggested measures for the verification failure phenomenon and the like.
Specifically, before the proxy node generates the proxy transaction request based on the transaction request, the method may further include: the agent node querying a virtual token total in the transaction initiating account; the agent node calculating a sum of the first virtual token amount and the second virtual token amount; then, the agent node judges the size between the sum and the total amount of the virtual tokens, and if the sum is smaller than or equal to the total amount of the virtual tokens, the agent node generates an agent transaction request based on the transaction request; if the sum is greater than the total amount of the virtual tokens, a check fail message may be fed back.
Specifically, before the proxy node generates the proxy transaction request based on the transaction request, the method may further include: the agent node acquires the historical agent transaction times of the transaction initiating account and the current agent transaction times of the transaction initiating account; then, the agent node judges whether the historical agent transaction times are matched with the current agent transaction times or not, and if the historical agent transaction times are matched with the current agent transaction times, the agent node generates an agent transaction request based on the transaction request; if the historical proxy transaction times are not matched with the current proxy transaction times, the non-passing information can be fed back and checked.
Specifically, to avoid that the transaction receiving account does not accept the transaction, before the proxy node generates the proxy transaction request based on the transaction request, the method may further include: the proxy node further includes, before generating a proxy transaction request based on the transaction request: the agent node generates an authorized agent request based on the transaction request, and transmits the authorized agent request to the transaction receiving account so that the transaction receiving account feeds back information based on the authorized agent request, wherein the transaction receiving account comprises account information of the transaction initiating account and the first virtual token amount. If the proxy node receives the agreement proxy information fed back by the transaction receiving account, the proxy node generates a proxy transaction request based on the transaction request; if the proxy node receives the disagreement proxy information fed back by the transaction receiving account, the proxy node can feed back related information to the transaction initiating account.
203. The smart contract node receives the proxy transaction request, performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In this embodiment, after the intelligent contract node receives the proxy transaction request sent by the proxy node, the intelligent contract node may perform a corresponding transaction based on the transaction content in the proxy transaction request, that is, between the transaction initiating account and the transaction receiving account, and perform a corresponding transaction between the transaction initiating account and the proxy node, so that the transaction between the transaction initiating account and the transaction receiving account can be proxied through the proxy node, thereby avoiding the waste of resources and time caused by transferring the native token to the transaction initiating account, and improving the efficiency of performing the blockchain transaction for the account not holding the native token.
In some embodiments, to improve security during the transaction, the smart contract node performs a validity check on the proxy transaction request received by the smart contract node before performing the transaction based on the proxy transaction request, for example, whether the transaction content of the proxy transaction request is valid, so that the proxy transaction request needs to be validated before performing the transaction, and if the validation passes, the smart contract node performs a transaction of the first virtual token amount between the transaction initiation account and the transaction receipt account and performs a transaction of the second virtual token amount between the transaction initiation account and the proxy node based on the proxy transaction request; if the verification is not passed, the intelligent contract node may not feed back any information, and may feed back the verification failure information to the transaction initiating account, or feed back the verification failure information to the proxy node, so that the proxy node sends the verification failure information to the transaction initiating account, thereby causing the transaction initiating account to determine whether to continue sending the transaction request to the proxy node and whether to adjust the transaction content in the transaction request based on the verification failure information.
Wherein the smart contract node may verify the proxy transaction request by at least one of the following verification means; when the proxy transaction request is checked in at least two ways, if the check of at least one check means is not passed, the intelligent contract node is considered to not pass the check of the proxy transaction request.
The verification failure information fed back by the intelligent contract node includes, but is not limited to, verification failure reasons, suggested measures for verification failure phenomena and the like.
Specifically, the proxy transaction request further includes the current transaction number corresponding to the transaction initiation account, and the processing method of the blockchain transaction may further include: the intelligent contract node obtains the historical transaction times of the transaction initiating account, compares the current transaction times with the historical transaction times, and performs the transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and performs the transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request if the current transaction times are matched with the historical transaction times; if the current transaction times are not matched with the historical transaction times, the non-passing information can be fed back and checked.
Specifically, the proxy transaction request further includes signature information of the transaction initiating account on the transaction content, and the processing method of the blockchain transaction may further include: the intelligent contract node determining target account information of the transaction initiation account based on the signature information; if the target account information matches the account information of the transaction initiation account, performing a transaction of the first virtual token amount between the transaction initiation account and the transaction receipt account and performing a transaction of the second virtual token amount between the transaction initiation account and the proxy node based on the proxy transaction request; if the target account information is inconsistent with the account information of the transaction initiating account, information that the verification fails can be fed back.
Wherein the smart contract node determines target account information of the transaction initiation account based on the signature information, and may include: the intelligent contract node can infer account information of a transaction initiating account corresponding to the signature information based on the signature information and transaction content corresponding to the signature information, namely, the target account information of the transaction initiating account is determined.
Illustratively, based on the above example, when the smart contract receives the proxy transaction request, the validity check may be performed on the sig based on the content transfer_by_paythestoken (a, B,90, 10, sig) in the proxy transaction request, and when the sig validity check passes, the smart contract node transfers 90 token na in account a to account B and transfers 10 token na in account a to the proxy node to serve as the proxy node to proxy the proxy fee of the transaction.
In some embodiments, since the first virtual token amount traded with the transaction receiving account may include a token amount transferred from the transaction initiating account to the transaction receiving account or a token amount obtained from the transaction receiving account, the manner in which the first virtual token amount is traded between the transaction initiating account and the transaction receiving account is correspondingly different.
Specifically, the first virtual token amount transacted with the transaction receipt account includes a token amount transferred from the transaction initiation account to the transaction receipt account, and the transaction of the first virtual token amount between the transaction initiation account and the transaction receipt account may include: the smart contract node transfers virtual tokens of the first virtual token amount in the transaction initiating account to the transaction receiving account.
Specifically, the first virtual token amount transacted with the transaction receipt account may include a token amount acquired from the transaction receipt account, and the transaction of the first virtual token amount between the transaction initiation account and the transaction receipt account may include: the smart contract node transfers virtual tokens of the first virtual token amount in the transaction receipt account to the transaction initiation account.
It will be appreciated that when the transaction initiating account and the transaction receiving account are held by different users and the transaction receiving account is to be transferred to the transaction initiating account for a virtual token amount, i.e. a first virtual token amount, but the transaction receiving account does not want to pay the primary token to the smart contract or to transfer the virtual token of a second virtual token amount to the agent node, the transaction initiating account may issue a transaction request to the agent node for the first virtual token amount in the transaction receiving account, i.e. the transaction initiating account pays the agent fee required by the agent node, i.e. the token of the second virtual token amount, to cause the agent node to issue an agent transaction request to the smart contract, causing the smart contract node to transfer the virtual token of the first virtual token amount in the transaction receiving account to the transaction initiating account based on the agent transaction request.
Wherein, because virtual token transfer is required from the transaction receiving account, in order to avoid that the transaction receiving account does not accept the transaction, before the proxy node generates the proxy transaction request based on the transaction request, the method may further include: the proxy node further includes, before generating a proxy transaction request based on the transaction request: the agent node generates an authorized agent request based on the transaction request, and transmits the authorized agent request to the transaction receiving account so that the transaction receiving account feeds back information based on the authorized agent request, wherein the transaction receiving account comprises account information of the transaction initiating account and the first virtual token amount. If the proxy node receives the agreement proxy information fed back by the transaction receiving account, the proxy node generates a proxy transaction request based on the transaction request; if the proxy node receives the disagreement proxy information fed back by the transaction receiving account, the proxy node can feed back related information to the transaction initiating account.
As can be seen from the above, a transaction request sent by a transaction initiation account is received by the agent node, wherein the transaction request includes transaction content, the transaction content including account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the agent node; the agent node also generates an agent transaction request based on the transaction request, sends the agent transaction request to the smart contract node, and pays the smart contract node for the native tokens required to complete the agent transaction request, wherein the agent transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount; and finally, the intelligent contract node receives the proxy transaction request, and based on the proxy transaction request, the first virtual token amount is transacted between the transaction initiating account and the transaction receiving account, and the second virtual token amount is transacted between the transaction initiating account and the proxy node, so that under the condition that the transaction initiating account does not have the original token, the proxy node proxies the transaction initiating account to initiate the request to the intelligent contract node, so that the intelligent contract node is caused to conduct the blockchain transaction which the transaction initiating account wants to conduct based on the request, and the efficiency of the blockchain transaction of the account which does not hold the original token is improved.
In order to better implement the above method, the embodiment of the present application further provides a processing system for a blockchain transaction, where the processing system for a blockchain transaction may be specifically integrated in at least one electronic device, for example, a computer device, where the computer device may be a terminal, a server, or a device.
The terminal can be a mobile phone, a tablet personal computer, an intelligent Bluetooth device, a notebook computer, a personal computer and other devices; the server may be a single server or a server cluster composed of a plurality of servers.
For example, in this embodiment, taking a specific integration of a processing system of a blockchain transaction in a terminal as an example, the method of this embodiment is described in detail, and this embodiment provides a processing system of a blockchain transaction, which is applied to a blockchain, where the blockchain includes an agent node and an intelligent contract node, as shown in fig. 3, the processing system of a blockchain transaction may include:
a request receiving module 301, where the request receiving module 301 is applied to the proxy node, and the request receiving module 301 is configured to receive a transaction request sent by a transaction initiation account, where the transaction request includes transaction content, and the transaction content includes account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the proxy node;
A request generation module 302, the request generation module 302 being applied to the proxy node, the request generation module 302 being configured to generate a proxy transaction request based on the transaction request, send the proxy transaction request to the smart contract node, and pay the smart contract node for a native token required for completing the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
a transaction module 303, wherein the transaction module 303 is applied to the smart contract node, the transaction module 303 is configured to receive the proxy transaction request, perform a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and perform a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In some embodiments, the proxy transaction request further includes a current transaction number corresponding to the transaction initiation account, and the blockchain transaction processing system further includes a number comparison module, where the number comparison module is applied to the intelligent contract node, and the number comparison module is specifically configured to:
The intelligent contract node obtains historical transaction times of the transaction initiating account;
if the current transaction number matches the historical transaction number, the smart contract node performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
In some embodiments, the proxy transaction request further includes signature information of the transaction initiating account on the transaction content, and the processing system of the blockchain transaction further includes an information comparison module, where the information comparison module is applied to the smart contract node, and the information comparison module is specifically configured to:
the intelligent contract node determining target account information of the transaction initiation account based on the signature information;
and if the target account information is identical to the account information of the transaction initiation account, performing a transaction of the first virtual token amount between the transaction initiation account and the transaction reception account and performing a transaction of the second virtual token amount between the transaction initiation account and the proxy node based on the proxy transaction request.
In some embodiments, the proxy transaction request further includes a current transaction number corresponding to the transaction initiation account, and the blockchain transaction processing system further includes an amount comparison module, where the amount comparison module is applied to the proxy node, and the amount comparison module is specifically configured to:
the agent node querying a virtual token total in the transaction initiating account;
the agent node calculating a sum of the first virtual token amount and the second virtual token amount;
and if the sum is less than or equal to the total amount of the virtual tokens, the proxy node generates a proxy transaction request based on the transaction request.
In some embodiments, the transaction content further includes a current transaction number corresponding to the transaction initiation account, and the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount, and the current transaction number are represented in a form of four-tuple.
In some embodiments, the first virtual token amount traded with the transaction receipt account includes a token amount transferred from the transaction initiation account to the transaction receipt account, and the transaction module 303 is specifically configured to:
The smart contract node transfers virtual tokens of the first virtual token amount in the transaction initiating account to the transaction receiving account.
In some embodiments, the first virtual token amount traded with the transaction receipt account includes a token amount obtained from the transaction receipt account, and the transaction module 303 is specifically configured to:
the smart contract node transfers virtual tokens of the first virtual token amount in the transaction receipt account to the transaction initiation account.
As can be seen from the above, the processing system for blockchain transaction of the present embodiment is configured to apply the request receiving module 301 to the proxy node, where the request receiving module 301 is configured to receive a transaction request sent by a transaction initiation account, and the transaction request includes transaction content, where the transaction content includes account information of the transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the proxy node; the request generation module 302 is applied to the proxy node, and the request generation module 302 is configured to generate a proxy transaction request based on the transaction request, send the proxy transaction request to the smart contract node, and pay the smart contract node for a native token required for completing the proxy transaction request, where the proxy transaction request includes account information of the transaction initiation account and the transaction receipt account, the first virtual token amount, and the second virtual token amount; finally, by the transaction module 303, the transaction module 303 is applied to the smart contract node, the transaction module 303 is configured to receive the proxy transaction request, and based on the proxy transaction request, perform a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account, and perform a transaction of the second virtual token amount between the transaction initiating account and the proxy node, so that in a case that the transaction initiating account does not have a native token, the proxy node proxy transaction initiating account initiates a request to the smart contract node, so as to prompt the smart contract node to perform a blockchain transaction that the transaction initiating account wants to perform based on the request, thereby improving efficiency when the account not holding the native token performs the blockchain transaction.
Correspondingly, the embodiment of the application also provides electronic equipment, which can be a terminal, and the terminal can be terminal equipment such as a smart phone, a tablet personal computer, a notebook computer, a touch screen, a game machine, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and the like. As shown in fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. It will be appreciated by those skilled in the art that the electronic device structure shown in the figures is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device 400 using various interfaces and lines, and performs various functions of the electronic device 400 and processes data by running or loading software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device 400.
In the embodiment of the present application, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions:
the agent node receives a transaction request sent by a transaction initiating account, wherein the transaction request comprises transaction content, and the transaction content comprises account information of a transaction receiving account, a first virtual token amount transacted with the transaction receiving account, and a second virtual token amount paid to the agent node;
the agent node generating an agent transaction request based on the transaction request, transmitting the agent transaction request to the smart contract node, and paying the smart contract node for a native token required to complete the agent transaction request, wherein the agent transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
the smart contract node receives the proxy transaction request, performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In some embodiments, the proxy transaction request further includes a current transaction number corresponding to the transaction initiation account, and further includes:
the intelligent contract node obtains historical transaction times of the transaction initiating account;
if the current transaction number matches the historical transaction number, the smart contract node performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
In some embodiments, the proxy transaction request further includes signature information of the transaction initiating account on the transaction content, and further includes:
the intelligent contract node determining target account information of the transaction initiation account based on the signature information;
and if the target account information is identical to the account information of the transaction initiation account, performing a transaction of the first virtual token amount between the transaction initiation account and the transaction reception account and performing a transaction of the second virtual token amount between the transaction initiation account and the proxy node based on the proxy transaction request.
In some embodiments, further comprising:
the agent node querying a virtual token total in the transaction initiating account;
the agent node calculating a sum of the first virtual token amount and the second virtual token amount;
and if the sum is less than or equal to the total amount of the virtual tokens, the proxy node generates a proxy transaction request based on the transaction request.
In some embodiments, the transaction content further includes a current transaction number corresponding to the transaction initiation account, and the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount, and the current transaction number are represented in a form of four-tuple.
In some embodiments, the first virtual token amount traded with the transaction receipt account comprises a token amount transferred from the transaction initiation account to the transaction receipt account, the trading of the first virtual token amount between the transaction initiation account and the transaction receipt account comprising:
the smart contract node transfers virtual tokens of the first virtual token amount in the transaction initiating account to the transaction receiving account.
In some embodiments, the first virtual token amount traded with the transaction receipt account comprises a token amount drawn from the transaction receipt account, and the trading of the first virtual token amount between the transaction initiation account and the transaction receipt account comprises:
the smart contract node transfers virtual tokens of the first virtual token amount in the transaction receipt account to the transaction initiation account.
Thus, the electronic device 400 provided in this embodiment may have the following technical effects: the efficiency of blockchain transactions for accounts that do not hold native tokens is improved.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 4, the electronic device 400 further includes: a touch display 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
The touch display 403 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 401, and can receive and execute commands sent from the processor 401. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 401 to determine the type of touch event, and the processor 401 then provides a corresponding visual output on the display panel in accordance with the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to implement the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch-sensitive display 403 may also implement an input function as part of the input unit 406.
The radio frequency circuitry 404 may be used to transceive radio frequency signals to establish wireless communication with a network device or other electronic device via wireless communication.
The audio circuitry 405 may be used to provide an audio interface between a user and an electronic device through a speaker, microphone. The audio circuit 405 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 405 and converted into audio data, which are processed by the audio data output processor 401 and sent via the radio frequency circuit 404 to e.g. another electronic device, or which are output to the memory 402 for further processing. The audio circuit 405 may also include an ear bud jack to provide communication of the peripheral headphones with the electronic device.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the electronic device 400. Alternatively, the power supply 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 407 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 4, the electronic device 400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the methods of processing blockchain transactions provided by embodiments of the present application. For example, the computer program may perform the steps of:
The agent node receives a transaction request sent by a transaction initiating account, wherein the transaction request comprises transaction content, and the transaction content comprises account information of a transaction receiving account, a first virtual token amount transacted with the transaction receiving account, and a second virtual token amount paid to the agent node;
the agent node generating an agent transaction request based on the transaction request, transmitting the agent transaction request to the smart contract node, and paying the smart contract node for a native token required to complete the agent transaction request, wherein the agent transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
the smart contract node receives the proxy transaction request, performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
In some embodiments, the proxy transaction request further includes a current transaction number corresponding to the transaction initiation account, and further includes:
The intelligent contract node obtains historical transaction times of the transaction initiating account;
if the current transaction number matches the historical transaction number, the smart contract node performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
In some embodiments, the proxy transaction request further includes signature information of the transaction initiating account on the transaction content, and further includes:
the intelligent contract node determining target account information of the transaction initiation account based on the signature information;
and if the target account information is identical to the account information of the transaction initiation account, performing a transaction of the first virtual token amount between the transaction initiation account and the transaction reception account and performing a transaction of the second virtual token amount between the transaction initiation account and the proxy node based on the proxy transaction request.
In some embodiments, further comprising:
The agent node querying a virtual token total in the transaction initiating account;
the agent node calculating a sum of the first virtual token amount and the second virtual token amount;
and if the sum is less than or equal to the total amount of the virtual tokens, the proxy node generates a proxy transaction request based on the transaction request.
In some embodiments, the transaction content further includes a current transaction number corresponding to the transaction initiation account, and the account information of the transaction receiving account, the first virtual token amount, the second virtual token amount, and the current transaction number are represented in a form of four-tuple.
In some embodiments, the first virtual token amount traded with the transaction receipt account comprises a token amount transferred from the transaction initiation account to the transaction receipt account, the trading of the first virtual token amount between the transaction initiation account and the transaction receipt account comprising:
the smart contract node transfers virtual tokens of the first virtual token amount in the transaction initiating account to the transaction receiving account.
In some embodiments, the first virtual token amount traded with the transaction receipt account comprises a token amount drawn from the transaction receipt account, and the trading of the first virtual token amount between the transaction initiation account and the transaction receipt account comprises:
The smart contract node transfers virtual tokens of the first virtual token amount in the transaction receipt account to the transaction initiation account.
It can be seen that the computer program can be loaded by a processor to perform the steps in any of the blockchain transaction processing methods provided in the embodiments of the present application, thereby bringing about the following technical effects: the efficiency of blockchain transactions for accounts that do not hold native tokens is improved.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the computer program stored in the computer readable storage medium can execute the steps in any of the blockchain transaction processing methods provided in the embodiments of the present application, the beneficial effects that any of the blockchain transaction processing methods provided in the embodiments of the present application can be achieved, which are detailed in the previous embodiments and are not described herein.
The above describes in detail a blockchain transaction processing method, system, electronic device and computer readable storage medium provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and implementations of the present application, where the above description of the embodiments is only used to help understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method of processing a blockchain transaction, applied to a blockchain, the blockchain including a proxy node and an intelligent contract node, the method comprising:
the agent node receives a transaction request sent by a transaction initiation account, wherein the transaction request comprises transaction content, and the transaction content comprises account information of a transaction receiving account, a first virtual token amount transacted with the transaction receiving account, and a second virtual token amount paid to the agent node;
the proxy node generating a proxy transaction request based on the transaction request, sending the proxy transaction request to the smart contract node, and paying the smart contract node for a native token required to complete the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
the smart contract node receives the proxy transaction request, performs a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and performs a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
2. The method for processing a blockchain transaction as in claim 1, wherein the proxy transaction request further includes a current transaction number corresponding to the transaction initiation account, further comprising:
the intelligent contract node obtains historical transaction times of the transaction initiating account;
if the current transaction number matches the historical transaction number, the intelligent contract node performs a transaction for the first virtual token amount between the transaction initiating account and the transaction receiving account and performs a transaction for the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
3. The method of processing a blockchain transaction of claim 1, wherein the proxy transaction request further includes signature information of the transaction initiating account on the transaction content, further comprising:
the intelligent contract node determines target account information of the transaction initiation account based on the signature information;
and if the target account information is consistent with the account information of the transaction initiating account, carrying out the transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account and carrying out the transaction of the second virtual token amount between the transaction initiating account and the proxy node based on the proxy transaction request.
4. The method of processing a blockchain transaction of claim 1, further comprising:
the agent node querying a virtual token total in the transaction initiating account;
the agent node calculating a sum of the first virtual token amount and the second virtual token amount;
and if the sum is less than or equal to the total amount of the virtual tokens, the proxy node generates a proxy transaction request based on the transaction request.
5. The method of claim 1, wherein the transaction content further includes a current transaction number corresponding to the transaction initiation account, and wherein the account information of the transaction receipt account, the first virtual token amount, the second virtual token amount, and the current transaction number are represented in a quadruple.
6. The method of processing a blockchain transaction of any of claims 1 to 5, wherein the first virtual token amount traded with the transaction receiving account includes a token amount transferred by the transaction initiating account to the transaction receiving account, the trading of the first virtual token amount between the transaction initiating account and the transaction receiving account comprising:
The smart contract node transfers virtual tokens of a first virtual token amount in the transaction initiating account into the transaction receiving account.
7. The method of processing a blockchain transaction of any of claims 1 to 5, wherein the first virtual token amount traded with the transaction receiving account includes a token amount obtained from the transaction receiving account, the trading of the first virtual token amount between the transaction initiating account and the transaction receiving account comprising:
the smart contract node transfers virtual tokens of a first virtual token amount in the transaction receipt account into the transaction initiation account.
8. A processing system for a blockchain transaction, the blockchain including an agent node and an intelligent contract node, the system comprising:
a request receiving module applied to the proxy node, the request receiving module configured to receive a transaction request sent by a transaction initiation account, wherein the transaction request includes transaction content including account information of a transaction receipt account, a first virtual token amount transacted with the transaction receipt account, and a second virtual token amount paid to the proxy node;
A request generation module applied to the proxy node, the request generation module configured to generate a proxy transaction request based on the transaction request, send the proxy transaction request to the smart contract node, and pay the smart contract node for a native token required to complete the proxy transaction request, wherein the proxy transaction request includes account information of the transaction initiating account and the transaction receiving account, the first virtual token amount, and the second virtual token amount;
a transaction module applied to the smart contract node, the transaction module to receive the proxy transaction request, conduct a transaction of the first virtual token amount between the transaction initiating account and the transaction receiving account based on the proxy transaction request, and conduct a transaction of the second virtual token amount between the transaction initiating account and the proxy node.
9. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions; the processor loads instructions from the memory to perform the steps in the method of processing a blockchain transaction as in any of claims 1 to 7.
10. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the method of processing a blockchain transaction of any of claims 1 to 7.
CN202310216091.1A 2023-03-02 2023-03-02 Processing method, system, electronic equipment and readable storage medium for blockchain transaction Pending CN116308786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310216091.1A CN116308786A (en) 2023-03-02 2023-03-02 Processing method, system, electronic equipment and readable storage medium for blockchain transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310216091.1A CN116308786A (en) 2023-03-02 2023-03-02 Processing method, system, electronic equipment and readable storage medium for blockchain transaction

Publications (1)

Publication Number Publication Date
CN116308786A true CN116308786A (en) 2023-06-23

Family

ID=86777361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310216091.1A Pending CN116308786A (en) 2023-03-02 2023-03-02 Processing method, system, electronic equipment and readable storage medium for blockchain transaction

Country Status (1)

Country Link
CN (1) CN116308786A (en)

Similar Documents

Publication Publication Date Title
US11663577B2 (en) Resource transfer method and apparatus and storage medium
CN109615516B (en) Resource transfer method, device, electronic equipment and storage medium
CN110365491B (en) Service processing method, device, equipment, storage medium and data sharing system
TW201836322A (en) Certificate management method and system
CN110601858B (en) Certificate management method and device
US20190205976A1 (en) Account number registration method, apparatus, and system
CN111080429B (en) Virtual resource acquisition method, device and storage medium
WO2018233584A1 (en) Method, device, computer apparatus, and storage medium for transferring account value
CN113506100B (en) Alliance chain data processing method, device, computer equipment and storage medium
CN110322321B (en) Block chain-based electronic bill transfer method, device, equipment and medium
CN110555692A (en) virtual resource transfer method, device and storage medium
WO2023134259A1 (en) Point-to-point-based data processing method and system, computing device, and storage medium
CN113746640B (en) Digital certificate using method, device, computer equipment and storage medium
CN116308786A (en) Processing method, system, electronic equipment and readable storage medium for blockchain transaction
CN110489488B (en) Data processing method and device
WO2021172133A1 (en) Provider terminal, network system, service providing method, and program
CN111476562A (en) Virtual resource transfer method, device, electronic equipment and storage medium
CN104899730B (en) Mobile terminal data processing method, terminal and system
CN114328538A (en) Method and device for processing transactions on block chain, storage medium and server
CN113360883B (en) Intelligent contract processing method and device, computer equipment and storage medium
CN116384998A (en) DID contract management method, DID contract management device, electronic equipment and readable storage medium
CN113806801B (en) Transaction information uplink method, device, computer equipment and storage medium
CN116128619A (en) Service processing method, device, computer equipment and storage medium
JP7102459B2 (en) Provider terminal, network system, service provision method and program
CN116468442A (en) Virtual resource transfer method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination