CN112184251A - Asset transfer method, device and storage medium - Google Patents

Asset transfer method, device and storage medium Download PDF

Info

Publication number
CN112184251A
CN112184251A CN202011069529.0A CN202011069529A CN112184251A CN 112184251 A CN112184251 A CN 112184251A CN 202011069529 A CN202011069529 A CN 202011069529A CN 112184251 A CN112184251 A CN 112184251A
Authority
CN
China
Prior art keywords
transaction
assets
asset transfer
parallel
chain
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
CN202011069529.0A
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.)
Zhuo Mimi
Original Assignee
Hangzhou Fuzamei Technology 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202011069529.0A priority Critical patent/CN112184251A/en
Publication of CN112184251A publication Critical patent/CN112184251A/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/42Confirmation, e.g. check or permission by the legal debtor of payment
    • 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/3827Use of message hashing
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an asset transfer method, equipment and a storage medium, wherein the method comprises the following steps: generating a first asset transfer transaction in response to a current user transferring assets held on the first parallel chains to the second parallel chains; sending the first asset transfer transaction to a main chain for each parallel chain link point of each first parallel chain and each second parallel chain to execute corresponding first transaction content and respectively generate corresponding consensus transactions; when the parallel chain blocks each including the first asset transfer transaction are successfully identified in the main chain, generating a first confirmation transaction including a transaction hash of the first asset transfer transaction and sending the first confirmation transaction to the main chain, so that each parallel chain link point of each first parallel chain and each second parallel chain executes the first confirmation transaction: and correspondingly unfreezing or deducting the assets according to the execution result of each successfully-identified first asset transfer transaction acquired by the main chain. The method and the device enable related transaction contents to be executed simultaneously, and the commission cost is low.

Description

Asset transfer method, device and storage medium
Technical Field
The present application relates to the field of parallel chain technology, and in particular, to an asset transfer method, device, and storage medium.
Background
In the existing block chain technology, a user A has accounts and holds a plurality of assets on a plurality of parallel chains (such as parachain 1-pa rachain4), if the user A wants to transfer part of assets on the parachain1 to the parachain 2-parachain 4, two transactions tx1 and tx2 are required to be sent to each parallel chain for completion, taking the parachain2 as an example, tx1 is the assets to be transferred which are partially locked on the parachain1, tx1 is successfully executed and then is regenerated into tx2, tx2 is used for generating assets on the parachain2 which are equivalent to the locked assets, which is inconvenient and needs to spend more commission.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide an asset transfer method, apparatus, and storage medium that are capable of simultaneously executing related transaction content with reduced commission.
In a first aspect, the present invention provides an asset transfer method suitable for a client, where the method includes:
generating a first asset transfer transaction in response to a current user transferring assets held on the first parallel chains to the second parallel chains; the first asset transfer transaction comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents which are respectively and correspondingly executed on the first parallel chains and the second parallel chains;
sending the first asset transfer transaction to the main chain for each parallel chain node of each parallel chain:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain to which the first identification belongs:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
when the parallel chain blocks each comprising the first asset transfer transaction are all successfully identified at the main chain, generating a first confirmation transaction comprising a transaction hash of the first asset transfer transaction and sending the first confirmation transaction to the main chain for each parallel chain node of each parallel chain:
and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, a first confirmation transaction is executed: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
judging whether each execution result is successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
In a second aspect, the present invention provides an asset transfer method for a backbone node, the method comprising:
receiving a first asset transfer transaction; the first asset transfer transaction is generated by a first client of a first user responding to the first user to transfer assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents executed on the first parallel chains and the second parallel chains respectively; the first asset transfer transaction is also for each parallel chain's parallel chain node:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain to which the first identification belongs:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
receiving a first confirmation transaction comprising a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when the parallel chain blocks each comprising the first asset transfer transaction are all cognizant successfully at the primary chain; the first confirmation transaction is also for each parallel chain's parallel chain node:
and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, a first confirmation transaction is executed: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
judging whether each execution result is successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
In a third aspect, the present invention provides an asset transfer method for parallel link nodes, the method comprising:
obtaining a first asset transfer transaction from a backbone; the first asset transfer transaction is generated by a first client of a first user responding to the first user to transfer assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents executed on the first parallel chains and the second parallel chains respectively;
judging whether the first identification in the first asset transfer transaction comprises a second identification of the current parallel chain:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is to generate a plurality of assets, generating a plurality of assets, freezing the generated plurality of assets and,
generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
obtaining a first confirmation transaction from the master chain that includes a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when the parallel chain blocks each comprising the first asset transfer transaction are all cognizant successfully at the primary chain;
and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, a first confirmation transaction is executed: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
judging whether each execution result is successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
In a fourth aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform an asset transfer method provided according to embodiments of the present invention.
In a fifth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the asset transfer method provided according to the embodiments of the present invention.
Embodiments of the present invention provide asset transfer methods, devices, and storage media that generate a first asset transfer transaction by transferring assets held on a number of first parallel chains to a number of second parallel chains in response to a current user; sending the first asset transfer transaction to a main chain for each parallel chain link point of each first parallel chain and each second parallel chain to execute corresponding first transaction content and respectively generate corresponding consensus transactions; when the parallel chain blocks each including the first asset transfer transaction are successfully identified in the main chain, generating a first confirmation transaction including a transaction hash of the first asset transfer transaction and sending the first confirmation transaction to the main chain, so that each parallel chain link point of each first parallel chain and each second parallel chain executes the first confirmation transaction: the method for unfreezing or deducting the assets correspondingly according to the execution result of each identified successful first asset transfer transaction acquired by the main chain enables related transaction contents to be executed simultaneously and costs less.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of an asset transfer method according to an embodiment of the present invention.
Fig. 2 is a flowchart of another asset transfer method according to an embodiment of the present invention.
Fig. 3 is a flowchart of another asset transfer method according to an embodiment of the invention.
Fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of an asset transfer method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides an asset transfer method suitable for a client, where the method includes:
s12: generating a first asset transfer transaction in response to a current user transferring assets held on the first parallel chains to the second parallel chains; the first asset transfer transaction comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents which are respectively and correspondingly executed on the first parallel chains and the second parallel chains;
s14: sending the first asset transfer transaction to the main chain for each parallel chain node of each parallel chain:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain to which the first identification belongs:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
s16: when the parallel chain blocks each comprising the first asset transfer transaction are all successfully identified at the main chain, generating a first confirmation transaction comprising a transaction hash of the first asset transfer transaction and sending the first confirmation transaction to the main chain for each parallel chain node of each parallel chain:
and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, a first confirmation transaction is executed: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
judging whether each execution result is successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
Specifically, a main chain and ten parallel chains parachain 1-parachain 10 (named as pc 1-pc 10) are assumed in the block chain network; taking the identifiers (including the first identifier and the second identifier) as parallel chain names, the user A wants to transfer the 10c oil held by the user A on the parachain1 to the parachain3 and the 20coin held by the user A on the parachain2 to the parachain 4;
the client of the user a performs step S12, and in response to the user a wanting to transfer 10 coins held by the user a on the parachai n1 to parachain3 and 20 coins held by the user a on the parachain2 to parachain4, generates an asset transfer transaction tx 1; tx1 includes p c1, pc2, pc3, pc4, and transaction contents executed in correspondence with each parallel link of parachain1 (account (a) _ pc1, -10coin), transaction contents executed in correspondence with each parallel link of parachain2 (account (a) _ pc2, -20coin), transaction contents executed in correspondence with each parallel link of parachain 3(account (a) _ pc3, +10coin), transaction contents executed in correspondence with each parallel link of parachain4 (account (a) _ pc4, +20 coin);
the client of the user a performs the step S14, sending tx1 to the main chain;
backbone node certificate of existence tx 1; in further embodiments, the backbone node may also execute tx1, recording the first identifier and each first transaction content onto the backbone (i.e., pc1, pc2, pc3, p c4, and (account (a) _ pc1, -10 account), (account (a) _ pc2, -20 account), (account (a) _ pc3, +10 account), (account (a) _ pc4, +20 account);
each parallel chain link point of the parachain 1-10 judges whether the marks pc1, pc2, pc3 and pc4 in tx1 comprise the marks of the corresponding parallel chains:
tx1 includes pc1, then each parallel link point of parachain1 executes (account (a) _ pc1, -10coin), freezing 10 coins of account (a) on parachain 1;
tx1 includes pc2, then each parallel link point of parachain2 executes (account (a) _ pc2, -20 core), freezing 20 cores of account (a) on parachain 2;
tx1 includes pc3, then each parallel chain link point of parachain3 executes (account (a) _ pc3, +10coin), generates 10 coins in account (a) on parachain3, and freezes the generated 10 coins;
tx1 includes pc4, then each parallel chain link point of parachain4 executes (account (a) _ pc4, +20coin), generates 20 coins in account (a) on parachain4, and freezes the generated 20 coins;
tx1 does not include pc5 to pc10, then parallel link points of parachain5 to parachain10 do not execute tx 1;
the client of the user a performs step S16, and when the parallel chain blocks each including tx1 are successfully recognized in the main chain, generates a confirmation transaction tx2 including a hash (tx1) and sends the confirmation transaction tx2 to the main chain;
backbone node certificate of existence tx 2; in further embodiments, the backbone node may also perform tx2, recording a hash (tx1) onto the backbone;
judging whether each parallel chain node of the parachain 1-10 comprises tx1 according to the hash (tx 1):
since tx1 is included on the parachain 1-4, each parallel link point of the parachain 1-4 performs tx 2: obtaining the execution result of each successful tx1 from the main chain;
if each execution result is successful, each parallel chain link on the parachain1 deducts the frozen 10coin in the account (A) on the parachain 1; each parallel link on parachain2 subtracted the frozen 20-coin subtraction in account (a) on parachain 2; each parallel link on parachain3 thawed the 10 coins produced frozen in account (a) on parachain3, i.e. when there is 10 coins in account (a) on parachain 3; each parallel link on parachain4 thawed the 20 coins produced frozen in account (a) on parachain4, i.e. when there is 20 coins in account (a) on parachain 4;
if the execution results are not successful, then each parallel link on the parachain1 unfreezes the frozen 10 counts in the account (A) on the parachain 1; each parallel link on the parachain2 thawed the frozen 20 coins in account (a) on parachain 2; each parallel link on parachain3 deducts the resulting 10-coin frozen in account (a) on parachain 3; each parallel link on parachain4 deducts the resulting 20-coin frozen in account (A) on parachain 4.
The above embodiment illustrates the asset transfer principle of the present invention by way of example as identified as a parallel chain name, user a wants to transfer 10 coins that he holds on parachain1 to parachain3 and 20 coins that he holds on parachain2 to parachain 4.
In more embodiments, the identifiers may be configured as other parameters according to actual requirements, for example, assuming that the identifier M is configured on the parallel chain of the game class, and the parachain1 to the parachain4 are all parallel chains of the game class, the first identifier in the first asset transfer transaction is M, the second identifiers of the parachain1 to the parachain4 are also M, and each parallel chain node of the parachain1 to the parachain4 executes corresponding transaction content in tx1, so that the same technical effect may be achieved.
It should be noted that, the parallel chain node of each parallel chain may synchronize the first asset transfer transaction from the main chain, and then determine whether the first identifier in the first asset transfer transaction includes the second identifier of the corresponding parallel chain; or, firstly, judging whether the first identifier in the first asset transfer transaction comprises a second identifier of the parallel chain: if so, then the first asset transfer transaction is synchronized from the main chain and executed. And is not limited herein.
It should be noted that, in the present application, the parallel link point of each parallel chain actively acquires the first asset transfer transaction from the main chain, and it should be understood by those skilled in the art that, in the case that the main chain node can execute the first asset transfer transaction and the first confirmation transaction, the main chain node can identify the parallel chain parachain 1-pa rachain4 included in the first asset transfer transaction and the first confirmation transaction, and push the first asset transfer transaction and the first confirmation transaction to the parallel chain node of the connected par achain 1-parachain 4.
It should be noted that those skilled in the art should understand that the coins frozen, generated and subtracted by tx1 and tx2 in the above embodiments are only used as references; the names of the assets should be different on different parallel chains, for example, the asset name of parachain1 is aaa, the asset name of parachain2 is bbb, the asset name of parachain3 is ccc, and the asset name of parachain4 is ddd. Taking the transaction content executed correspondingly by each parallel link point of the parachain1 as (accou nt (a) _ pc1, -10aaa) as an example, each parallel link node on the parachain3 should generate several bbbs corresponding to 10aaa in account (a) on the parachain3 or pseudo 10aaa in account (a) on the parachain3 when tx1 is executed; and when each parallel chain node on the parachain3 executes tx2, if each execution result is successful, each parallel chain link on pa rachain3 unfreezes the corresponding generated bbb or pseudo 10aaa frozen in account (a) on parachain3, and if each execution result is not successful, each parallel chain link on parachain3 subtracts the corresponding generated bbb or pseudo 10aaa frozen in account (a) on parachain 3.
The above embodiment enables the related transaction contents to be executed simultaneously with less commission cost.
Preferably, the method further comprises:
generating a first transfer transaction; wherein the first transfer transaction is a transfer transaction of a first parallel chain or a second parallel chain;
sending a first transfer transaction to the main chain for each main chain node:
determining whether each parallel chain block comprising the first asset transfer transaction is successfully identified in the main chain:
and if not, temporarily not packaging the first transfer transaction.
Specifically, the client of user A generates the transfer transaction tx3(account (A) _ pc3, acount (B) _ pc3,10 coin);
user A's client sends tx3 to the backbone;
each main chain node judges whether the parallel chain blocks comprising tx1 are successfully identified in the main chain:
otherwise, tx3 is not packed for the time being.
The above-described embodiments ensure that different transactions of the same user are performed serially.
It should be noted that, as those skilled in the art can imagine, in the case where the main chain node can execute the first asset transfer transaction and the first confirmation transaction, the first forwarding transaction is not packaged for the moment, including:
determining whether the corresponding first transaction content is a deducted plurality of assets:
if so, the first transfer transaction is not packaged for the time being.
Fig. 2 is a flowchart of another asset transfer method according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides an asset transfer method suitable for a main chain node, where the method includes:
s22: receiving a first asset transfer transaction; the first asset transfer transaction is generated by a first client of a first user responding to the first user to transfer assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents executed on the first parallel chains and the second parallel chains respectively; the first asset transfer transaction is also for each parallel chain's parallel chain node:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain to which the first identification belongs:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
s24: receiving a first confirmation transaction comprising a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when the parallel chain blocks each comprising the first asset transfer transaction are all cognizant successfully at the primary chain; the first confirmation transaction is also for each parallel chain's parallel chain node:
and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, a first confirmation transaction is executed: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
judging whether each execution result is successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
The asset transfer principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the method further comprises:
receiving a first transfer transaction; the first transfer transaction is generated by a first client, and the first transfer transaction is a transfer transaction of a first parallel chain or a second parallel chain;
determining whether each parallel chain block comprising the first asset transfer transaction is successfully identified in the main chain:
and if not, temporarily not packaging the first transfer transaction.
The asset transfer principle of the above embodiment can refer to a method of a preferred embodiment shown in fig. 1, and is not described herein again.
Fig. 3 is a flowchart of another asset transfer method according to an embodiment of the invention. As shown in fig. 3, in this embodiment, the present invention provides an asset transfer method suitable for parallel link nodes, where the method includes:
s31: obtaining a first asset transfer transaction from a backbone; the first asset transfer transaction is generated by a first client of a first user responding to the first user to transfer assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of the first parallel chains and the second parallel chains and first transaction contents executed on the first parallel chains and the second parallel chains respectively;
s331: judging whether the first identification in the first asset transfer transaction comprises a second identification of the current parallel chain:
if yes, go to step S332: executing the corresponding first transaction content:
if the corresponding first transaction content is deducting a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
s333: generating and sending to the main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
s35: obtaining a first confirmation transaction from the master chain that includes a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when the parallel chain blocks each comprising the first asset transfer transaction are all cognizant successfully at the primary chain;
s371: and judging whether the parallel chain comprises a first asset transfer transaction according to the transaction hash:
if yes, go to step S372: performing a first confirmation transaction: obtaining the execution result of each first asset transfer transaction with successful consensus from the main chain;
s391: judging whether each execution result is successful:
if yes, go to step S392: deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, step S393 is executed: unfreezing the frozen assets or deducting the frozen generated assets.
The asset transfer principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention. As shown in fig. 4, as another aspect, the present application also provides an apparatus including one or more Central Processing Units (CPUs) 401 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the device 400 are also stored. The CPU401, ROM402, and RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (7)

1. An asset transfer method, adapted for a client, the method comprising:
generating a first asset transfer transaction in response to a current user transferring assets held on the first parallel chains to the second parallel chains; the first asset transfer transaction comprises a first identifier of each first parallel chain and each second parallel chain, and each first transaction content executed on each first parallel chain and each second parallel chain correspondingly;
sending the first asset transfer transaction to a master chain for each parallel chain node of each parallel chain to:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deduction of a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to a main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
when the parallel chain blocks each comprising the first asset transfer transaction are successfully identified in the main chain, generating a first confirmation transaction comprising a transaction hash of the first asset transfer transaction and sending the first confirmation transaction to the main chain for each parallel chain node of each parallel chain:
judging whether the first asset transfer transaction is included in the parallel chain according to the transaction hash:
if so, executing the first confirmation transaction: obtaining, from a main chain, execution results of the first asset transfer transactions for which the respective consensus was successful;
judging whether the execution results are successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
2. The method of claim 1, further comprising:
generating a first transfer transaction; wherein the first transfer transaction is a transfer transaction of the first parallel chain or the second parallel chain;
sending the first transfer transaction to a main chain for each main chain node:
determining whether each parallel chain block comprising the first asset transfer transaction is successfully identified in the main chain:
and if not, temporarily not packaging the first transfer transaction.
3. An asset transfer method adapted for use at a backbone node, the method comprising:
receiving a first asset transfer transaction; the first asset transfer transaction is generated by a first client of a first user in response to the first user transferring assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of each first parallel chain and each second parallel chain and first transaction contents executed on each first parallel chain and each second parallel chain correspondingly; the first asset transfer transaction is further for each parallel chain's parallel chain node:
judging whether the first identification in the first asset transfer transaction comprises a second identification of the parallel chain:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deduction of a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the assets, generating the assets, and freezing the assets; and the number of the first and second groups,
generating and sending to a main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
receiving a first confirmation transaction comprising a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when parallel chain blocks each comprising the first asset transfer transaction are all co-identified successfully at the primary chain; the first confirmation transaction is also for each parallel chain's parallel chain node:
judging whether the first asset transfer transaction is included in the parallel chain according to the transaction hash:
if so, executing the first confirmation transaction: obtaining, from a main chain, execution results of the first asset transfer transactions for which the respective consensus was successful;
judging whether the execution results are successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
4. The method of claim 3, further comprising:
receiving a first transfer transaction; wherein the first reconciled transaction is generated by the first client, the first reconciled transaction being a transfer transaction of the first parallel chain or the second parallel chain;
determining whether each parallel chain block comprising the first asset transfer transaction is successfully identified in the main chain:
and if not, temporarily not packaging the first transfer transaction.
5. An asset transfer method adapted for parallel chain nodes, the method comprising:
obtaining a first asset transfer transaction from a backbone; the first asset transfer transaction is generated by a first client of a first user in response to the first user transferring assets held on a plurality of first parallel chains to a plurality of second parallel chains, and comprises first identifications of each first parallel chain and each second parallel chain and first transaction contents executed on each first parallel chain and each second parallel chain correspondingly;
determining whether the first identifier in the first asset transfer transaction includes a second identifier of a current parallel chain:
if yes, executing the corresponding first transaction content:
if the corresponding first transaction content is deduction of a plurality of assets, freezing the plurality of assets;
if the corresponding first transaction content is the generation of a plurality of assets, generating the plurality of assets, freezing the generated plurality of assets and,
generating and sending to a main chain a consensus transaction comprising a parallel chain block of the first asset transfer transaction;
obtaining the first confirmation transaction from a master chain that includes a transaction hash of the first asset transfer transaction; wherein the first confirmation transaction is generated by the first client when parallel chain blocks each comprising the first asset transfer transaction are all co-identified successfully at the primary chain;
judging whether the first asset transfer transaction is included in the parallel chain according to the transaction hash:
if so, executing the first confirmation transaction: obtaining, from a main chain, execution results of the first asset transfer transactions for which the respective consensus was successful;
judging whether the execution results are successful:
if yes, deducting the frozen assets, or unfreezing the frozen generated assets;
otherwise, unfreezing the frozen assets, or deducting the frozen generated assets.
6. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-5.
7. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-5.
CN202011069529.0A 2020-09-30 2020-09-30 Asset transfer method, device and storage medium Pending CN112184251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011069529.0A CN112184251A (en) 2020-09-30 2020-09-30 Asset transfer method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011069529.0A CN112184251A (en) 2020-09-30 2020-09-30 Asset transfer method, device and storage medium

Publications (1)

Publication Number Publication Date
CN112184251A true CN112184251A (en) 2021-01-05

Family

ID=73948477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011069529.0A Pending CN112184251A (en) 2020-09-30 2020-09-30 Asset transfer method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112184251A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888562A (en) * 2017-10-13 2018-04-06 布比(北京)网络技术有限公司 Interconnect serobila architecture
CN109325762A (en) * 2018-08-30 2019-02-12 杭州复杂美科技有限公司 Across the chain method of commerce of parallel chain, equipment and storage medium
CN109558454A (en) * 2018-11-28 2019-04-02 杭州复杂美科技有限公司 Parallel chain digs mine common recognition method, equipment and storage medium
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110084601A (en) * 2019-04-30 2019-08-02 杭州复杂美科技有限公司 Parallel chain main chain stateful transaction synchronous method, equipment and storage medium
CN110113409A (en) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 Parallel chain authorization node configuration method, equipment and storage medium
CA3045632A1 (en) * 2018-05-29 2019-11-29 Alibaba Group Holding Limited Blockchain asset issuing and redemption methods and apparatuses, and electronic device therefore
WO2020177537A1 (en) * 2019-03-02 2020-09-10 杭州复杂美科技有限公司 Parallel chain consensus method, data exception processing method, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888562A (en) * 2017-10-13 2018-04-06 布比(北京)网络技术有限公司 Interconnect serobila architecture
CA3045632A1 (en) * 2018-05-29 2019-11-29 Alibaba Group Holding Limited Blockchain asset issuing and redemption methods and apparatuses, and electronic device therefore
CN109325762A (en) * 2018-08-30 2019-02-12 杭州复杂美科技有限公司 Across the chain method of commerce of parallel chain, equipment and storage medium
CN109558454A (en) * 2018-11-28 2019-04-02 杭州复杂美科技有限公司 Parallel chain digs mine common recognition method, equipment and storage medium
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
WO2020177537A1 (en) * 2019-03-02 2020-09-10 杭州复杂美科技有限公司 Parallel chain consensus method, data exception processing method, device and storage medium
CN110084601A (en) * 2019-04-30 2019-08-02 杭州复杂美科技有限公司 Parallel chain main chain stateful transaction synchronous method, equipment and storage medium
CN110113409A (en) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 Parallel chain authorization node configuration method, equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘明熹;甘国华;程郁琨;肖琳;刘帅;房勇;: "区块链共识机制的发展现状与展望", 运筹学学报, no. 01 *
叶少杰;汪小益;徐才巢;孙建伶;: "BitXHub:基于侧链中继的异构区块链互操作平台", 计算机科学, no. 06, 15 June 2020 (2020-06-15) *
郭朝;郭帅印;张胜利;宋令阳;王晖;: "区块链跨链技术分析", 物联网学报, no. 02 *
闵新平;李庆忠;孔兰菊;张世栋;郑永清;肖宗水;: "许可链多中心动态共识机制", 计算机学报, no. 05 *

Similar Documents

Publication Publication Date Title
CN110751475A (en) Cross-chain method, system, equipment and storage medium for blockchain transaction
CN110083745B (en) Data query method, device and storage medium
CN112583585B (en) Transaction execution method, apparatus and storage medium
CN110287196B (en) Block storage method, parallel chain transaction acquisition method, equipment and storage medium
CN109005208B (en) Method and device for pushing information
CN111798238A (en) Parallel chain consensus method, device and storage medium
CN111290965B (en) Test method, test device, computer equipment and storage medium
CN111861754A (en) Transaction packaging method, device and storage medium
CN114266665B (en) Contract multi-main chain crossing method, equipment and storage medium
CN110928952A (en) Data synchronization method and device based on block chain
CN114553429A (en) Chameleon hash-based block chain cross-chain transaction method and device and storage medium
CN112184251A (en) Asset transfer method, device and storage medium
CN112184228A (en) Asset exchange method, device and storage medium
CN112184227A (en) Parallel chain supervision consensus method, equipment and storage medium
CN103152216B (en) The method of testing of system and device in a kind of the Internet
CN111523896A (en) Anti-attack method, device and storage medium
CN113342353B (en) Mock data generation method and device
CN112733202B (en) Parallel chain supervision consensus method, computer device and storage medium
CN111798239B (en) Parallel chain consensus method, apparatus and storage medium
CN112948388A (en) Parallel chain arbitration consensus method, computer device and storage medium
CN112804322B (en) Block generation method, computer device and storage medium
CN114202425A (en) Method, device and storage medium for predicting multi-main-chain interlinkage of language machine
CN111858772A (en) Parallel chain transaction group execution method, device and storage medium
CN113592653A (en) Proxy delayed transaction method, computer device and storage medium
CN112905170A (en) Channel package generation method, device, 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
TA01 Transfer of patent application right

Effective date of registration: 20240831

Address after: 361000 No. 728, Yangming Road, Haicang District, Xiamen City, Fujian Province

Applicant after: Zhuo Mimi

Country or region after: China

Address before: 310000 Room 702, 7th Floor, Building 6, East Software Park, No. 90 Wensan Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU FUZAMEI TECHNOLOGY Co.,Ltd.

Country or region before: China