CN111292190A - Transaction generation method, block creation method, related device and equipment - Google Patents

Transaction generation method, block creation method, related device and equipment Download PDF

Info

Publication number
CN111292190A
CN111292190A CN202010076933.4A CN202010076933A CN111292190A CN 111292190 A CN111292190 A CN 111292190A CN 202010076933 A CN202010076933 A CN 202010076933A CN 111292190 A CN111292190 A CN 111292190A
Authority
CN
China
Prior art keywords
transaction
utxo
node
transaction data
utxos
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
CN202010076933.4A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010076933.4A priority Critical patent/CN111292190A/en
Publication of CN111292190A publication Critical patent/CN111292190A/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/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application discloses a transaction generation method, a block creation method, a related device and equipment, wherein the transaction generation method comprises the following steps: the first node receiving a roll-out instruction, the roll-out instruction for instructing transfer of the first digital asset from the transaction address of the first node to the transaction address of the second node; further, at least one UTXO is selected from the residual digital assets of the first node, so that first transaction data are generated according to the at least one UTXO and the transfer-out instruction, and the first transaction data are uploaded to the block chain network; wherein the first transaction data has the at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXO for the output of the first transaction data being equal to 0 or greater than a target threshold; therefore, the generation of dust transaction is avoided, and the operation efficiency of the block chain network is improved.

Description

Transaction generation method, block creation method, related device and equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to the field of data processing technologies, and in particular, to a transaction generation method, a block creation method, and related devices and apparatuses.
Background
In the area of blockchain technology, "dust" is a very small amount of currency or tokens that one can typically ignore. Taking bitonshi as an example, the minimum unit of bitonshi is 1satoshi, that is, 0.00000001 bitonshi, and generally we consider the number less than several hundred satoshi as dust. That is, dust is a very small portion of the transaction or amount that is generally not worth the transaction because their transaction costs are often higher than their own value.
At present, the dust Attack (Dusting attach) is a problem in the block chain field, and the dust Attack process is as follows: the dust attack implementer generates dust-like transaction (also called dust transaction) by generating a small amount of satoshi from transaction addresses of a large number of users, further tracks the dust transaction, associates other associated addresses of the addresses, and performs behavior analysis by reading the associated addresses, so that companies or individuals behind one address can be analyzed, and the anonymity of the bitcoin can be destroyed. Further, after being attacked, it is easy to launch a phishing threat. Moreover, a large amount of dust transactions can generate a large amount of transactions to be packaged, block congestion is caused, transaction cost is increased, and the operation efficiency of a block chain network is reduced.
How to reduce the generation of dust transaction is a technical problem to be solved in the current block chain technical field.
Disclosure of Invention
The embodiment of the application provides a transaction generation method, a block creation method, a related device and equipment, which can avoid the generation of dust transactions and improve the operation efficiency of a block chain network.
In a first aspect, an embodiment of the present application provides a transaction generation method, which is applied to a node of an initiator of a transaction in a blockchain network, where the method includes:
receiving a roll-out instruction for instructing transfer of a first digital asset from a transaction address of the first node to a transaction address of the second node;
selecting at least one unspent transaction Output (UTXO) from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer;
generating first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data having the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXOs equal to 0 or greater than a target threshold;
and uploading the first transaction data to a blockchain network.
In one possible implementation, the total remaining digital assets of the at least one UTXO is equal to the first digital assets or a difference between the total remaining digital assets of the at least one UTXO and the first digital assets is greater than the target threshold.
In one possible implementation, the selecting at least one UTXO from the remaining digital assets of the first node specifically comprises:
adding one UTXO obtained from the residual UXTO set into the UTXO set, wherein the residual UXTO set is the UTXO except the UTXO set in the M UXTOs;
determining that the set of UTXOs is the at least one UTXO when the total remaining digital asset of all UTXOs in the set of UTXOs is equal to the first digital asset;
determining the UTXO set as the at least one UTXO when the total remaining digital assets of all UTXOs in the UTXO set is greater than the first digital asset and the difference between the total remaining digital assets of all UTXOs in the UTXO set and the first digital asset is greater than the target threshold;
when the total residual digital assets of all the UTXOs in the UTXO set are smaller than the first digital assets, the step of adding one UTXO obtained from the residual UXTO set into the UTXO set is repeatedly executed.
In one possible implementation, the selecting at least one UTXO from the remaining digital assets of the first node specifically comprises:
according to the residual digital assets of each UTXO in the M UTXOs, sequencing the M UTXOs from large to small of the residual digital assets;
determining the first i UTXOs of the M UTXOs as the at least one UTXO, wherein the total remaining digital assets of the first i UTXOs are not less than the first digital assets, and i is a positive integer less than M.
Optionally, the total remaining digital asset of the first i-1 UTXOs is less than the first digital asset.
Optionally, a difference between the total remaining digital assets of the first i UTXOs and the first digital asset is equal to 0 or greater than the target threshold.
In one possible implementation, the first transaction data further includes a transaction fee, the method further comprising:
when a difference between the total remaining digital assets of the at least one UTXO and the first digital asset is less than the target threshold, treating the difference as a transaction fee for the first transaction data.
In one possible implementation, the roll-out instruction further includes transaction information, the method further comprising:
identifying the transaction type of the transaction information according to the transaction information;
and determining the type of the transaction information and determining the target threshold according to the corresponding relation between the transaction type and the threshold.
In a second aspect, an embodiment of the present application provides a block creation method, which is applied to a mine excavation node in a block chain network, and the method includes:
obtaining first transaction data uploaded into a blockchain network by a first node, the first transaction data indicating a transfer of a first digital asset from a transaction address of the first node to a transaction address of a second node, the first transaction data having at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXOs of an output of the first transaction data being equal to 0 or greater than a target threshold, the at least one UTXO being selected from the remaining digital assets of the first node, the remaining digital assets of the first node including M UTXOs, M being a positive integer;
writing first transaction data to a block according to the first transaction data, wherein an input of the block is the at least one UTXO.
In a third aspect, an embodiment of the present application provides a transaction generation apparatus, which is applied to a node of an initiator of a transaction in a blockchain network, and includes:
a receiving unit, configured to receive a roll-out instruction, where the roll-out instruction is used to instruct to transfer a first digital asset from a transaction address of the first node to a transaction address of the second node;
a selecting unit for selecting at least one Unspent Transaction Output (UTXO) from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer;
a generating unit for generating first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data having the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXOs equal to 0 or greater than a target threshold;
and the uploading unit is used for uploading the first transaction data to a block chain network.
In one possible implementation, the total remaining digital assets of the at least one UTXO is equal to the first digital assets or a difference between the total remaining digital assets of the at least one UTXO and the first digital assets is greater than the target threshold.
In a fourth aspect, an embodiment of the present application provides a block creation apparatus, which is applied to a mine excavation node in a block chain network, and includes:
an obtaining unit, configured to obtain first transaction data uploaded into a blockchain network by a first node, where the first transaction data is used to indicate that a first digital asset is transferred from a transaction address of the first node to a transaction address of a second node, the first transaction data uses at least one UTXO as a transaction input of the first transaction data, a total remaining digital asset of the UTXOs of an output of the first transaction data is equal to 0 or greater than a target threshold, the at least one UTXO is selected from remaining digital assets of the first node, the remaining digital asset of the first node includes M UTXOs, and M is a positive integer;
a creating unit, configured to create a block from the first transaction data according to the first transaction data, wherein the input of the block is the at least one UTXO.
In a fifth aspect, an embodiment of the present application provides a transaction generation apparatus, including a processor and a memory, the processor and the memory being coupled, wherein the memory is configured to store computer instructions, and the processor is configured to execute the computer instructions, so as to enable the transaction generation apparatus to implement the method according to the first aspect or any one of the first aspects.
In a sixth aspect, an embodiment of the present application provides a block creation apparatus, including a processor and a memory, where the processor and the memory are coupled, where the memory is used to store computer instructions, and the processor is used to execute the computer instructions, so that the block creation apparatus implements the method according to any one of the first aspect and the second aspect.
In a seventh aspect, this application embodiment further provides a computer-readable storage medium, which stores one or more computer instructions that, when invoked by a computer, cause the computer to implement the method according to the first aspect or any one of the first aspects.
In an eighth aspect, embodiments of the present application provide a computer program, which, when executed by a computer device, implements the method according to the first aspect or any one of the first aspects.
In a ninth aspect, the present application further provides a computer-readable storage medium storing one or more computer instructions, which when invoked by a computer, cause the computer to implement the method according to any one of the second aspect or the second aspect.
In a tenth aspect, embodiments of the present application provide a computer program, which, when executed by a computer device, implements the method according to any one of the second aspect or the second aspect.
In an embodiment of the application, a first node receives a roll-out instruction, wherein the roll-out instruction is used for instructing to transfer a first digital asset from a transaction address of the first node to a transaction address of a second node; further, at least one UTXO is selected from the residual digital assets of the first node, so that first transaction data are generated according to the at least one UTXO and the transfer-out instruction, and the first transaction data are uploaded to the block chain network; wherein the first transaction data has the at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXO for the output of the first transaction data being equal to 0 or greater than a target threshold; therefore, the generation of dust transaction is avoided, and the operation efficiency of the block chain network is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an architecture of a blockchain network according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a data structure of a block chain according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a transaction generation method according to an embodiment of the present application;
fig. 4A is a flowchart illustrating an implementation method for a first node to select at least one UTXO from remaining digital assets of the first node according to an embodiment of the present application;
fig. 4B is a schematic flowchart of another implementation method for selecting, by a first node, at least one UTXO from remaining digital assets of the first node according to an embodiment of the present application;
fig. 4C is a schematic flowchart of an implementation method for determining that the first i UTXOs of the M UTXOs are at least one UTXO according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a block creating method according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a transaction generation structure provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of block creation according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another transaction generation structure provided in the embodiments of the present application;
fig. 9 is a schematic structural diagram of another block creation provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
First, a description is made of concepts related to embodiments of the present application:
(1) blockchain (Blockchain): the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain, which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
Blockchains are generally divided into three types: public chain (Public Blockchain), private chain (PrivateBlockchain) and alliance chain (Consortium Blockchain).
Among them, the most decentralized is the public chain. Common public chains have bitcoin and ether houses, and nodes/participants joining the public chains can read data on the chains, issue transactions, compete for the accounting rights of new blocks and the like; also, each node/participant is free to join and leave the public chain. The private chain is contrary, the accounting authority of the private chain is controlled by a certain organization or organization, the data reading authority is also controlled by the organization or organization, and the number of participants is few, and the participants cannot be added into the private chain at will and need to be audited by the organization or organization.
A federation chain is also referred to as a community blockchain, which refers to a blockchain whose consensus process is controlled by a preselected node, and is a mixture of public and private chains, which can achieve "partial decentralization". Each node on the chain typically has a physical organization or organization corresponding to it; participants jointly maintain blockchain operation by authorizing to join the network and forming a benefit-related alliance. With a federation chain, a new participant can join an already formed blockchain and share data without having to build it from scratch. At the same time, companies have reduced development costs and time expenses by solving common problems together.
Whether public, private, or alliance, may provide the functionality of an intelligent contract. An intelligent contract on a blockchain is a contract that can be executed on a blockchain system triggered by a transaction. An intelligent contract may be defined in the form of code.
(2) The shared account book is used for providing functions of operations such as storage and query of data fingerprints, sending recorded data (also called logs and reference data in the application) of operations on files or equipment to other nodes in the block chain network, storing the recorded data in a temporary block after the other nodes verify the validity, and also sending confirmation to a node initiating the operations.
(3) Intelligent contracts, computerized agreements, which may execute the terms of a contract, are implemented by code deployed on a shared ledger for execution when certain conditions are met, are used to complete automated transactions according to actual business requirement code, and are not limited to executing contracts for transactions, but may also execute contracts that process received information.
(4) Public key, private key, transaction address
The node added into the block chain network is provided with a pair of public and private keys and can be created by adopting an asymmetric encryption algorithm, for example, the private key can be randomly generated by the node, then the public key is calculated by the private key based on the principle of the asymmetric encryption algorithm, and then the transaction address (also called a wallet address) can be obtained by the public key through a series of digital signature operations. That is, knowing the public key of a node, the transaction address of the node can be calculated. In some embodiments, the public key may also serve as the wallet address or an identification of the wallet address.
The asymmetric encryption algorithm may include, but is not limited to: the Elgamal algorithm, the Rabin algorithm, the Diffie-Hellman algorithm, the elliptic Curve Encryption (ECC) algorithm. Wherein the key pair comprises a public key and a private key; the public key is typically broadcast to the blockchain network and the private key is kept by the node. It should be noted that the public and private keys in the blockchain network are unique.
Fig. 1 is a schematic diagram illustrating an architecture of a blockchain network 100 according to an embodiment of the present invention. Blockchain 100 includes a plurality of blockchain node devices (also referred to herein as nodes), such as node 101, node 102, node 103, node 104, and so forth. Although the blockchain network 100 shown in fig. 1 includes four nodes, it should be appreciated that in actual applications, the blockchain system 100 may include more or fewer nodes. Optionally, each node may be each client in the blockchain network, may be an electronic device such as a mobile phone, a personal computer, a tablet computer, a vehicle-mounted unit, a server, and the like, and may also be an application program.
In order to ensure information interworking in the blockchain network 100, there may be an information connection between each node in the blockchain network 100, and information transmission may be performed between the nodes through the information connection. For example, after any node in the blockchain network receives transaction data for the first time, the validity of the transaction data is verified, and when the transaction data is legal, the transaction data can be broadcast to the neighbor nodes of the node, so that other nodes in the blockchain network can receive the transaction data conveniently. It should be appreciated that after the node again receives the same transaction data, it is no longer broadcasting to neighboring nodes to avoid infinite propagation of transaction data.
In one scenario, node 101 may be an initiator of the transaction data (also referred to herein as a first node), and the first node may be based on receiving a roll-out instruction that instructs transfer of the first digital asset from the transaction address of the first node to the transaction address of a second node (recipient of the digital asset), such as node 103; further, looking at all UTXOs of the first node, and selecting at least one UTXO from the residual digital assets of the first node; thereby, first transaction data is generated in accordance with the at least one UTXO and the roll-out instruction. Wherein the first transaction data has the at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXO for output of the first transaction data being equal to 0 or greater than a target threshold to avoid generation of dust transactions.
Further, the first node uploads the first transaction data to the blockchain network.
The nodes 102 and 104 may be mining nodes, and the mining nodes write the first transaction data into the block according to the first transaction data after receiving the first transaction data, where the input of the block is the at least one UTXO. And after the mining nodes generate the blocks, the blocks are issued to the block chain network, the propagation mode of the new blocks is similar to the propagation mode of the transaction data and is not repeated, the legality of the contents of the blocks can be detected and whether the blocks are on the longest legal chain or not can be checked after the mining nodes of the new blocks are received, and then the maximum legal chain can be stored by each mining node so as to ensure the consistency of the data stored by each mining node.
In one implementation, each node in the blockchain network 100 may store one identical blockchain. The Block chain is composed of a plurality of blocks, and it should be understood that the Block chain includes a series of blocks (blocks) which are consecutive to each other in chronological order of generation, and once a new Block is added to the Block chain, the new Block is not removed any more, and the recorded data submitted by the nodes in the Block chain system is recorded in the blocks. Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, as shown in fig. 2, and is a schematic diagram of a data structure of the block chain provided in the embodiment of the present application, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, transaction data, a version number, a timestamp, and the like are stored in the block header, and the transaction data is stored in the block main body; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores transaction data of the current block, hash values, version numbers, time stamps and the like of the data in the parent block, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the security of the transaction data in the block is ensured.
Alternatively, the blockchain may record respective Transaction data associated with the associated node device through an Unspent Transaction Output (UTXO) model. Where the non-spent transaction output refers to a transaction output that is not present in the transaction inputs of other blocks in the blockchain.
The block body may include at least one transaction input, such as transaction input in1, transaction input in2, etc., and at least one transaction output, such as transaction output out1, transaction output out2, etc. For each transaction output, an address of a previous block of the UTXO corresponding to the transaction output in the blockchain network may be included, e.g., a hash value of the previous block; but may also include the remaining digital assets of the transaction output, a digital signature, an address of the recipient of the digital asset, etc.
Alternatively, each node in the blockchain network may store a blockchain associated only with that node. Each blockchain may record transaction data related to the associated node.
A transaction generation method provided by an embodiment of the present application is described below, where the method may be executed by an initiator of a transaction, and the initiator of the embodiment of the present application is a node in a blockchain network, also referred to as a first node herein, as shown in fig. 3, where the method includes, but is not limited to, the following partial or all steps:
s11: a roll-out instruction is received, the roll-out instruction for instructing transfer of the first digital asset from the transaction address of the first node to the transaction address of the second node.
The first node may receive transaction information input by a user based on a client, and the transaction information may include a first digital asset, an asset transferring party (an identifier of the first node), an asset transferring party (an identifier of the second node), transaction additional information, and the like, wherein the transaction additional information may include a transaction type of the transaction information, detailed information of the transaction, and the like. The detailed information of the transaction may include a product or service for which the first digital asset is converted. For example, when the transaction is a detailed transaction where the first node expends a first digital asset in exchange for a specified product, such as a cell phone, to the second node.
The transaction types may include, but are not limited to, small transactions, medium transactions, large transactions, and the like. A small transaction may be a transaction in which the traded asset (referred to herein as the first digital asset) is less than a first threshold, a medium transaction may be a transaction in which the traded asset is greater than the first threshold and less than a second threshold, a large transaction may be a transaction in which the traded asset is greater than the second threshold, etc. The first threshold is less than the second threshold.
It should be understood that the transaction types are differentiated by the product or service purchased for the transaction, for example, the transaction types may include commodity transactions, electronic product transactions, movie content transactions, and the like. The transaction types may be divided in other ways, not limited herein.
Optionally, after S11, the method may further include: the first node identifies the transaction type of the transaction information according to the transaction information; and determining the type of the transaction information according to the corresponding relation between the transaction type and the threshold value to determine a target threshold value. And then, the size of the target threshold is dynamically adjusted so as to better adapt to different transaction scenes.
S12: at least one UTXO is selected from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer.
The first node may look up its remaining digital assets, i.e., the balance, i.e., all UTXOs of the first node. Taking the example where the first node includes M UTXOs as an example, it should be understood that the total number of UTXOs included in the first node changes as the first node issues transactions, and the total number of UTXOs may vary from node to node.
In order to avoid the generation of dust transaction, the first method: the difference between the total remaining digital assets (also referred to as a total balance) of the input UTXOs in the generated transaction data and the first digital assets may be made equal to 0 or greater than a target threshold, where the total remaining digital assets of the selected at least one UTXO is required to be equal to the first digital assets or the difference between the total remaining digital assets of the selected at least one UTXO and the first digital assets is required to be greater than the target threshold. The second method comprises the following steps: the difference between the total remaining digital asset (also referred to as the total balance) of the input UTXO in the generated transaction data and the first digital asset may be forced as the transaction fee when the difference is less than the target threshold. It is to be understood that the difference between the total remaining digital asset of the selected at least one UTXO and the first digital asset is the difference of the total remaining digital asset of the selected at least one UTXO minus the first digital asset, the difference being greater than 0.
For bitcoin, the target threshold may be 1000satoshi (i.e., 0.00001 bitcoin), 2000satoshi (i.e., 0.00002 bitcoin), 900satoshi (i.e., 0.00001 bitcoin), or other values.
For other digital currencies, the target threshold may also be other thresholds, and the embodiment of the present application is not limited.
Corresponding to the first or second mode, the first node may select at least one UTXO from the remaining digital assets of the first node, which may include, but is not limited to, the following three implementations:
the implementation method comprises the following steps:
as shown in fig. 4A, the implementation (one) may include, but is not limited to, the following steps:
s121: and adding one UTXO obtained from the residual UXTO set into the UTXO set, wherein the residual UXTO set is UTXO except the UTXO set in the M UXTOs.
It should be understood that, before the initial execution of S121, the remaining UXTO sets are M sets of UTXOs, which are empty sets; after the initial execution of S121, the UTXO set includes one UTXO acquired when the initial execution of S121 is performed.
S122: and comparing the total residual digital assets of all the UTXOs in the UTXO set with the first digital asset.
When the total residual digital assets of all the UTXOs in the UTXO set are equal to the first digital asset, performing S123; when the total residual digital assets of all the UTXOs in the UTXO set are greater than the first digital asset, executing S124; when the total residual digital assets of all the UTXOs in the UTXO set are greater than the first digital asset, executing S124; and when the total residual digital assets of all the UTXOs in the UTXO set are smaller than the first digital assets, repeatedly executing S121 to guide the total residual digital assets of all the UTXOs in the UTXO set not to be smaller than the first digital assets.
S123: determining the UTXO set as at least one UTXO.
And when the residual digital asset of the UTXO to be selected is equal to the first digital asset, selecting the UTXO to be selected.
S124: and judging whether the difference between the total residual digital assets of all the UTXOs in the UTXO set and the first digital assets is larger than a target threshold value, if so, executing S123, otherwise, executing S121, and repeatedly executing S124 until the difference between the total residual digital assets of all the UTXOs in the UTXO set and the first digital assets is larger than the target threshold value.
Therefore, the implementation (I) can ensure that the transaction output is greater than the target threshold value, and dust transaction is avoided.
And (2) realizing:
as shown in fig. 4B, this implementation (two) may include, but is not limited to, the following steps:
s125: according to the residual digital assets of each UTXO in the M UTXOs, sequencing the M UTXOs from large to small of the residual digital assets;
s126: determining the first i UTXOs of the M UTXOs as at least one UTXO, wherein the total remaining digital assets of the first i UTXOs is not less than the first digital asset.
As shown in fig. 4C, the embodiment (1) of S126 may be:
s1261: the first i UTXOs are selected from the sorted M UTXOs.
S1262: and comparing the total residual digital assets of all the UTXOs in the first i UTXOs with the first digital asset.
Executing S1263 when the total residual digital assets of all the UTXOs in the first i UTXOs are equal to the first digital asset; when the total residual digital assets of all the UTXOs in the first i UTXOs are larger than the first digital asset, executing S124; when the total residual digital assets of all the UTXOs in the first i UTXOs are larger than the first digital asset, executing S124; when the total remaining digital assets of all the UTXOs in the UTXO set are less than the first digital asset, S121 is repeatedly executed until the total remaining digital assets of all the UTXOs in the UTXO set are not less than the first digital asset.
S1263: the first i UTXOs are determined to be at least one UTXO.
S1264: and judging whether the difference between the total remaining digital assets of all the first i UTXOs and the first digital assets is larger than a target threshold value, if so, executing S1263 and S13, otherwise, i is i +1, repeatedly executing S1261, and repeatedly executing S1264 until the difference between the total remaining digital assets of all the first i UTXOs and the first digital assets is larger than the target threshold value.
This embodiment (1) of S126 may ensure that the difference between the total remaining digital asset of the selected at least one UTXO, i.e., the last i UTXOs output, and the first digital asset is equal to 0 or greater than the target threshold, and avoid generating dust transactions.
In embodiment (2) of S126, similarly to embodiment (1), when the total remaining digital assets of all UTXOs in the first i UTXOs are equal to the first digital asset, S1263 is performed. In contrast, when the total remaining digital assets of all the UTXOs in the first i UTXOs are greater than the first digital asset, the first node may perform S1263, and when the total remaining digital assets of all the UTXOs in the first i UTXOs are less than the first digital asset, i ═ i +1, and repeatedly perform S1261 until the difference between the total remaining digital assets of all the UTXOs in the first i UTXOs and the first digital asset is greater than the target threshold.
In embodiment (2) of S126, the first i-1 UTXOs of the selected at least one UTXO are necessarily smaller than the first digital asset. Although the embodiment (2) cannot ensure that the transaction output is greater than the target threshold, the process is simple and the operation speed is high.
Implementation (III)
In the implementation (iii), the manner of selecting the at least one UTXO is not limited. The first node may arbitrarily select at least one UTXO from the M UTXOs or select at least one UTXO in other manners as long as the selected at least one UTXO satisfies that the total remaining digital asset is not less than the first digital asset.
The implementation manner of the three selected at least one UTXO is not limited, and other implementations may also be included in the embodiments of the present application, which are not described herein again.
S13: first transaction data is generated based on the at least one UTXO and the roll-out instruction. The first transaction data has at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of the UTXO equal to 0 or greater than a target threshold.
Optionally, the first transaction data may include an identification of the first node, an identification of the second node, information of the selected at least one UTXO, the first digital asset, and/or the like. Wherein, the identifier of the first node can be a public key or a transaction address of the first node; the identity of the second node may be a public key or a transaction address of the second node; the information of the UTXO may include an address of a previous block of the UTXO (e.g., a hash value of the previous block), remaining digital assets, and the like. Wherein the first transaction data has a fixed data format, the meaning of each data included in the first transaction data is determined.
For the embodiment (2) of S126 in the implementation (two) of the selected at least one UTXO, the first transaction data may further include a transaction fee, and the first node may determine, during the generating of the first transaction data, whether a difference between a total remaining digital asset of all UTXOs in the first i UTXOs and the first digital asset is greater than a target threshold, and if the difference between the total remaining digital asset of all UTXOs in the first i UTXOs and the first digital asset is less than the target threshold, take the difference as the transaction fee of the first transaction data; otherwise, the first transaction data does not include the transaction fee, or the transaction fee is 0.
It should be understood that, corresponding to the implementation (three) above, the first node may determine whether the difference between the total remaining digital asset of the selected at least one UTXO and the first digital asset is greater than the target threshold during the process of generating the first transaction data, and if the difference between the total remaining digital asset of the selected at least one UTXO and the first digital asset is less than the target threshold, the difference is taken as the transaction fee of the first transaction data; otherwise, the first transaction data does not include the transaction fee, or the transaction fee is 0.
It should also be understood that for other implementations, the first transaction data may also include a transaction fee, but the difference remaining after removal of the first digital asset, the transaction fee, or the total remaining digital asset of its selected at least one UTXO is equal to or greater than 0, or greater than the target threshold.
S14: the first transaction data is uploaded to a blockchain network.
After the first node issues the first transaction data to the blockchain network, the node in the blockchain network verifies the validity of the first transaction data after receiving the first transaction data for the first time, and broadcasts the first transaction data to the neighbor nodes if the first transaction data is legal. And after receiving the first transaction data and verifying the legality of the first transaction data, the mining node generates a new block and distributes the new block. And in the process of generating the block by the mining node, the selected at least one UTXO in the first transaction data is used as the input of the block.
As shown in fig. 5, for the block creation method provided in this embodiment of the present application, the method may be performed by a mining node in a blockchain network, where in a public chain, such as a bitcoin, the mining node may be any node in the blockchain network, that is, any node may compete for the creation right of a block, and the block creation method may include, but is not limited to, the following steps:
s21: the first transaction data is obtained, wherein specific descriptions of the first transaction data may refer to relevant descriptions in the above embodiment of the transaction generating method, which are not described herein again.
S22: and writing the first transaction data into the block according to the first transaction data, wherein the input of the block is at least one UTXO.
Further, the mining node may publish the generated new blocks to the blockchain network.
It should be understood that other mining nodes may also generate new blocks and publish blockchain networks. Each mining node can receive a new block, detect the validity of the content of the block, and check whether the block is on the longest legal chain, and further each mining node can store the longest legal chain, so that the consistency of the data stored by each mining node is ensured.
Based on the description of the above method embodiment, the present application further provides a transaction generation apparatus, where the transaction generation apparatus may be a computer program (including a program code) running in a first node, a client; referring to fig. 6, the transaction generation device 60 may include or may operate as follows:
a receiving unit 601, configured to receive a roll-out instruction, where the roll-out instruction is used to instruct to transfer a first digital asset from a transaction address of the first node to a transaction address of the second node;
a selecting unit 602, configured to select at least one Unspent Transaction Output (UTXO) from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, and M is a positive integer;
a generating unit 603 configured to generate first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data having the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXOs equal to 0 or greater than a target threshold;
an uploading unit 604, configured to upload the first transaction data to a blockchain network.
In one possible implementation, the total remaining digital assets of the at least one UTXO is equal to the first digital assets or a difference between the total remaining digital assets of the at least one UTXO and the first digital assets is greater than the target threshold.
In a possible implementation, the selecting unit 602 is specifically configured to:
adding one UTXO obtained from the residual UXTO set into the UTXO set, wherein the residual UXTO set is the UTXO except the UTXO set in the M UXTOs;
determining that the set of UTXOs is the at least one UTXO when the total remaining digital asset of all UTXOs in the set of UTXOs is equal to the first digital asset;
determining the UTXO set as the at least one UTXO when the total remaining digital assets of all UTXOs in the UTXO set is greater than the first digital asset and the difference between the total remaining digital assets of all UTXOs in the UTXO set and the first digital asset is greater than the target threshold;
when the total residual digital assets of all the UTXOs in the UTXO set are smaller than the first digital assets, the step of adding one UTXO obtained from the residual UXTO set into the UTXO set is repeatedly executed.
In a possible implementation, the selecting unit 602 is specifically configured to:
according to the residual digital assets of each UTXO in the M UTXOs, sequencing the M UTXOs from large to small of the residual digital assets;
determining the first i UTXOs of the M UTXOs as the at least one UTXO, wherein the total remaining digital assets of the first i UTXOs are not less than the first digital assets, and i is a positive integer less than M.
Optionally, the total remaining digital asset of the first i-1 UTXOs is less than the first digital asset.
Optionally, a difference between the total remaining digital assets of the first i UTXOs and the first digital asset is equal to 0 or greater than the target threshold.
In one possible implementation, the first transaction data further includes a transaction fee, and the apparatus 60 further includes:
a processing unit to take the difference between the total remaining digital assets of the at least one UTXO and the first digital asset as a transaction fee for the first transaction data when the difference is less than the target threshold.
In one possible implementation, the roll-out instruction further includes transaction information, and the apparatus 60 further includes:
the identification unit is used for identifying the transaction type of the transaction information according to the transaction information;
and the determining unit is used for determining the type of the transaction information and determining the target threshold according to the corresponding relation between the transaction type and the threshold.
Based on the description of the above method embodiment, the present application further provides a block creation apparatus, where the block creation apparatus may be a computer program (including a program code) running in a mining node; referring to fig. 7, the block creating apparatus 70 may include or operate the following units:
an obtaining unit 701, configured to obtain first transaction data uploaded into a blockchain network by a first node, where the first transaction data is used to indicate that a first digital asset is transferred from a transaction address of the first node to a transaction address of a second node, the first transaction data uses at least one UTXO as a transaction input of the first transaction data, a total remaining digital asset of the UTXOs of an output of the first transaction data is equal to 0 or greater than a target threshold, the at least one UTXO is selected from remaining digital assets of the first node, the remaining digital asset of the first node includes M UTXOs, and M is a positive integer;
a creating unit 702, configured to create a block from the first transaction data according to the first transaction data, wherein the input of the block is the at least one UTXO.
According to an embodiment of the present application, some steps involved in the transaction generation method shown in fig. 3 may be performed by each unit in the transaction generation apparatus shown in fig. 6, and some steps involved in the block creation method shown in fig. 5 may be performed by each unit in the block creation apparatus shown in fig. 7. According to another embodiment of the present application, the units in the transaction generation apparatus shown in fig. 6 or the block creation apparatus shown in fig. 7 may be respectively or entirely combined into one or several other units to form a structure, or some unit(s) thereof may be further split into multiple functionally smaller units to form a structure, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, these functions may also be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the transaction generation apparatus shown in fig. 6 or the block creation apparatus shown in fig. 7 may be configured by running a computer program (including program codes) capable of executing the steps involved in the respective methods shown in fig. 3 and 5 on a general-purpose computing device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and the method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
In an embodiment of the present application, a first node receives a roll-out instruction for instructing transfer of a first digital asset from a transaction address of the first node to a transaction address of a second node; further, at least one UTXO is selected from the residual digital assets of the first node, so that first transaction data are generated according to the at least one UTXO and the transfer-out instruction, and the first transaction data are uploaded to the block chain network; wherein the first transaction data has the at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXO for the output of the first transaction data being equal to 0 or greater than a target threshold; therefore, the generation of dust transaction is avoided, and the operation efficiency of the block chain network is improved.
Based on the description of the method embodiment and the device item embodiment, the embodiment of the invention also provides a transaction generating device; the transaction generating means may be the user device or the detection device mentioned above. Referring to fig. 8, the transaction generation device 80 may include at least a processor 801, an input device 802, an output device 803, a memory 804 and a communication interface 805; the processor 801, the input device 802, the output device 803, the memory 804, and the communication interface 805 may be connected by a bus 808 or other connection means. The memory 804 is used for storing a computer program including program instructions, and the memory 804 may include a volatile memory (e.g., dynamic random access memory DRAM) and may also include a non-volatile memory (e.g., an otp rom OTPROM). In some examples, the memory 804 may further include memory located remotely from the processor 801, which may be connected to the apparatus 80 via a network. The input device 802 may include: a keyboard 8021, a microphone 8022, a touch panel 8023, and the like. The output devices 803 may include a display panel 8031, a microphone 8032, and the like.
The communication interface 805 is used to enable information interaction between the transaction generation apparatus 80 and other device apparatuses, such as a blockchain network.
The processor 801 is configured to execute program instructions stored by the memory 804. The processor 801 (or CPU) is a computing core and a control core of the client, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement the corresponding method flow or the corresponding function in the above-mentioned transaction generation method embodiment.
In some embodiments, the processor 801 according to embodiments of the present invention may be configured to perform a series of data processing, including:
receiving a roll-out instruction for instructing transfer of a first digital asset from a transaction address of the first node to a transaction address of the second node;
selecting at least one unspent transaction Output (UTXO) from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer;
generating first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data having the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXOs equal to 0 or greater than a target threshold;
and uploading the first transaction data to a blockchain network.
In one possible implementation, the total remaining digital assets of the at least one UTXO is equal to the first digital assets or a difference between the total remaining digital assets of the at least one UTXO and the first digital assets is greater than the target threshold.
In one possible implementation, the processor 801 executes the selecting at least one UTXO from the remaining digital assets of the first node, specifically including executing:
adding one UTXO obtained from the residual UXTO set into the UTXO set, wherein the residual UXTO set is the UTXO except the UTXO set in the M UXTOs;
determining that the set of UTXOs is the at least one UTXO when the total remaining digital asset of all UTXOs in the set of UTXOs is equal to the first digital asset;
determining the UTXO set as the at least one UTXO when the total remaining digital assets of all UTXOs in the UTXO set is greater than the first digital asset and the difference between the total remaining digital assets of all UTXOs in the UTXO set and the first digital asset is greater than the target threshold;
when the total residual digital assets of all the UTXOs in the UTXO set are smaller than the first digital assets, the step of adding one UTXO obtained from the residual UXTO set into the UTXO set is repeatedly executed.
In one possible implementation, the processor 801 executes the selecting at least one UTXO from the remaining digital assets of the first node, specifically including executing:
according to the residual digital assets of each UTXO in the M UTXOs, sequencing the M UTXOs from large to small of the residual digital assets;
determining the first i UTXOs of the M UTXOs as the at least one UTXO, wherein the total remaining digital assets of the first i UTXOs are not less than the first digital assets, and i is a positive integer less than M.
Optionally, the total remaining digital asset of the first i-1 UTXOs is less than the first digital asset.
Optionally, a difference between the total remaining digital assets of the first i UTXOs and the first digital asset is equal to 0 or greater than the target threshold.
In one possible implementation, the first transaction data further includes a transaction fee, and the processor 701 is further configured to perform:
when a difference between the total remaining digital assets of the at least one UTXO and the first digital asset is less than the target threshold, treating the difference as a transaction fee for the first transaction data.
In one possible implementation, the roll-out instruction further includes transaction information, and the processor 701 is further configured to perform:
identifying the transaction type of the transaction information according to the transaction information;
and determining the type of the transaction information and determining the target threshold according to the corresponding relation between the transaction type and the threshold.
The input device 802 and the output device 803 are not essential components of the transaction generation device 80, and the transaction generation device 80 may not include the input device 802 and the output device 803, or may include other devices or modules, and the embodiment of the present application is not limited thereto.
It should be understood that the transaction generation devices 60 and 80 described in the embodiments of the present invention may perform the description of the transaction generation method in the embodiment corresponding to fig. 3, and are not described herein again.
Based on the description of the above method embodiment and apparatus item embodiment, an embodiment of the present invention further provides a block creation apparatus; the block creation means may be the user equipment or the detection equipment mentioned above. Referring to fig. 9, the block creation device 90 may at least include a processor 901, an input device 902, an output device 903, a memory 904 and a communication interface 905; the processor 901, the input device 902, the output device 903, the memory 904, and the communication interface 905 may be connected by a bus 906 or other connection means. The memory 904 is used to store a computer program comprising program instructions, and the memory 904 may include a volatile memory (e.g., dynamic random access memory DRAM) and may also include a non-volatile memory (e.g., an otp rom OTPROM). In some examples, the memory 904 may further include memory located remotely from the processor 901, which may be connected to the apparatus 90 via a network. The input means 902 may include: a keyboard 9021, a microphone 9022, a touch panel 9023, and the like. The output device 903 may include a display panel 9031, a microphone 9032, and the like.
The communication interface 905 is used to implement information interaction between the block creation apparatus 90 and other device apparatuses, such as a blockchain network.
The processor 901 is configured to execute program instructions stored in the memory 904. The processor 901 (or CPU) is a computing core and a control core of the client, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement the corresponding method flow or the corresponding function in the block creation method embodiment.
In some embodiments, the processor 901 according to the embodiments of the present invention may be configured to perform a series of data processing, including:
obtaining first transaction data uploaded into a blockchain network by a first node, the first transaction data indicating a transfer of a first digital asset from a transaction address of the first node to a transaction address of a second node, the first transaction data having at least one UTXO as a transaction input for the first transaction data, a total remaining digital asset of the UTXOs of an output of the first transaction data being equal to 0 or greater than a target threshold, the at least one UTXO being selected from the remaining digital assets of the first node, the remaining digital assets of the first node including M UTXOs, M being a positive integer;
writing first transaction data to a block according to the first transaction data, wherein an input of the block is the at least one UTXO.
It should be noted that the input device 902 and the output device 903 are not essential elements of the block creation device 90, and the block creation device 90 may not include the input device 902 and the output device 903, or may include other devices or modules, which is not limited in the embodiment of the present application.
It should be understood that the block creating devices 70 and 90 described in the embodiments of the present invention may perform the description of the block creating method in the corresponding embodiment of fig. 5, and are not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium (Memory), which is a Memory device in the client and is used for storing programs and data. It is understood that the computer readable storage medium herein may include both the built-in storage medium in the client and, of course, the extended storage medium supported by the client. The computer-readable storage medium provides a storage space that stores an operating system of the client. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space for loading and execution by the processor. It should be noted that the computer-readable storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer readable storage medium located remotely from the aforementioned processor.
In one embodiment, one or more first instructions stored in a computer-readable storage medium may be loaded and executed by a processor to perform the corresponding steps performed by the first client in the data processing embodiments described above; in a specific implementation, when one or more first instructions in the computer-readable storage medium are loaded and executed by a computer device, the method described in fig. 3 or fig. 5 may be implemented, which may specifically refer to the related description in the above method, and is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A transaction generation method, the method comprising:
receiving a roll-out instruction for instructing transfer of a first digital asset from a transaction address of the first node to a transaction address of the second node;
selecting at least one unspent transaction output, UTXO, from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer;
generating first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data having the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXOs equal to 0 or greater than a target threshold;
and uploading the first transaction data to a blockchain network.
2. The method of claim 1, wherein the total remaining digital asset of the at least one UTXO is equal to the first digital asset or a difference between the total remaining digital asset of the at least one UTXO and the first digital asset is greater than the target threshold.
3. The method of claim 2, wherein selecting at least one UTXO from the remaining digital assets of the first node comprises:
adding one UTXO obtained from the residual UXTO set into the UTXO set, wherein the residual UXTO set is the UTXO except the UTXO set in the M UXTOs;
determining that the set of UTXOs is the at least one UTXO when the total remaining digital asset of all UTXOs in the set of UTXOs is equal to the first digital asset;
determining the UTXO set as the at least one UTXO when the total remaining digital assets of all UTXOs in the UTXO set is greater than the first digital asset and the difference between the total remaining digital assets of all UTXOs in the UTXO set and the first digital asset is greater than the target threshold;
when the total residual digital assets of all the UTXOs in the UTXO set are smaller than the first digital assets, the step of adding one UTXO obtained from the residual UXTO set into the UTXO set is repeatedly executed.
4. The method of claim 1, wherein said selecting at least one UTXO from the remaining digital assets of the first node comprises:
according to the residual digital assets of each UTXO in the M UTXOs, sequencing the M UTXOs from large to small of the residual digital assets;
determining the first i UTXOs of the M UTXOs as the at least one UTXO, wherein the total remaining digital assets of the first i UTXOs are not less than the first digital assets, and i is a positive integer less than M.
5. The method of claim 1, wherein the first transaction data further comprises a transaction fee, the method further comprising:
when a difference between the total remaining digital assets of the at least one UTXO and the first digital asset is less than the target threshold, treating the difference as a transaction fee for the first transaction data.
6. The method of any of claims 1-5, wherein the roll-out instruction further comprises transaction information, the method further comprising:
identifying the transaction type of the transaction information according to the transaction information;
and determining the type of the transaction information and determining the target threshold according to the corresponding relation between the transaction type and the threshold.
7. A method for block creation, the method comprising:
obtaining first transaction data uploaded into a blockchain network by a first node, the first transaction data indicating a transfer of a first digital asset from a transaction address of the first node to a transaction address of a second node, the first transaction data having at least one unspent transaction output, UTXO, as a transaction input for the first transaction data, a total remaining digital asset of the UTXO for the output of the first transaction data being equal to 0 or greater than a target threshold, the at least one UTXO selected from remaining digital assets of the first node, the remaining digital asset of the first node comprising M UTXOs, M being a positive integer;
writing first transaction data to a block according to the first transaction data, wherein an input of the block is the at least one UTXO.
8. A transaction generation apparatus, comprising:
a receiving unit, configured to receive a roll-out instruction, where the roll-out instruction is used to instruct to transfer a first digital asset from a transaction address of the first node to a transaction address of the second node;
a selecting unit for selecting at least one Unspent Transaction Output (UTXO) from remaining digital assets of the first node, wherein the remaining digital assets include M UTXOs, M being a positive integer;
a generating unit for generating first transaction data according to the at least one UTXO and the roll-out instruction; the first transaction data has the at least one UTXO as a transaction input for the first transaction data, the output of the first transaction data having a total remaining digital asset of UTXO equal to 0 or greater than a target threshold.
9. A block creation apparatus, comprising:
an obtaining unit, configured to obtain first transaction data uploaded into a blockchain network by a first node, where the first transaction data is used to indicate that a first digital asset is transferred from a transaction address of the first node to a transaction address of a second node, the first transaction data uses at least one UTXO as a transaction input of the first transaction data, a total remaining digital asset of the UTXOs of an output of the first transaction data is equal to 0 or greater than a target threshold, the at least one UTXO is selected from remaining digital assets of the first node, the remaining digital asset of the first node includes M UTXOs, and M is a positive integer;
a creating unit, configured to create a block from the first transaction data according to the first transaction data, wherein the input of the block is the at least one UTXO.
10. A computer-readable storage medium having stored thereon one or more computer instructions which, when invoked by a computer, cause the computer to perform the method of any of claims 1-9.
CN202010076933.4A 2020-01-23 2020-01-23 Transaction generation method, block creation method, related device and equipment Pending CN111292190A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010076933.4A CN111292190A (en) 2020-01-23 2020-01-23 Transaction generation method, block creation method, related device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010076933.4A CN111292190A (en) 2020-01-23 2020-01-23 Transaction generation method, block creation method, related device and equipment

Publications (1)

Publication Number Publication Date
CN111292190A true CN111292190A (en) 2020-06-16

Family

ID=71023470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010076933.4A Pending CN111292190A (en) 2020-01-23 2020-01-23 Transaction generation method, block creation method, related device and equipment

Country Status (1)

Country Link
CN (1) CN111292190A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598571A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Transaction processing method, device, equipment and storage medium of block chain
CN113127908A (en) * 2021-04-29 2021-07-16 郑杰骞 Chain structure address generation method, chain structure address generation device, transaction data processing method, transaction data processing device and storage medium
CN113409140A (en) * 2021-05-27 2021-09-17 卓尔智联(武汉)研究院有限公司 Block chain data processing method and device, computer equipment and storage medium
WO2022227694A1 (en) * 2021-04-29 2022-11-03 郑杰骞 Chain structure address generation method, transaction data processing method, apparatus, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190057382A1 (en) * 2016-02-23 2019-02-21 nChain Holdings Limited Registry and automated management method for blockchain-enforced smart contracts
CN110166237A (en) * 2019-05-31 2019-08-23 杭州时戳信息科技有限公司 A kind of cryptographic key distribution method and system based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190057382A1 (en) * 2016-02-23 2019-02-21 nChain Holdings Limited Registry and automated management method for blockchain-enforced smart contracts
CN110166237A (en) * 2019-05-31 2019-08-23 杭州时戳信息科技有限公司 A kind of cryptographic key distribution method and system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MIND: ""粉尘交易的定义与处理"", Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/43203734> *
周亮: ""区块链中灰尘量与热力学问题分析"", Retrieved from the Internet <URL:https://www.elecfans.com/blockchain/1054804.html> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598571A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Transaction processing method, device, equipment and storage medium of block chain
CN113127908A (en) * 2021-04-29 2021-07-16 郑杰骞 Chain structure address generation method, chain structure address generation device, transaction data processing method, transaction data processing device and storage medium
WO2022227694A1 (en) * 2021-04-29 2022-11-03 郑杰骞 Chain structure address generation method, transaction data processing method, apparatus, and storage medium
CN113127908B (en) * 2021-04-29 2024-04-26 郑杰骞 Chained address generation and transaction data processing method and device and storage medium
CN113409140A (en) * 2021-05-27 2021-09-17 卓尔智联(武汉)研究院有限公司 Block chain data processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109936457B (en) Block chain multi-party witness method, device, equipment and computer readable storage medium
US11451400B2 (en) Blockchain transaction method and apparatus
CN107438002B (en) Block chain based system and electronic device and method in system
Zamani et al. Rapidchain: Scaling blockchain via full sharding
Yeow et al. Decentralized consensus for edge-centric internet of things: A review, taxonomy, and research issues
CN109075964B (en) Block chaining supporting multiple one-way functions for block verification
US11871485B2 (en) Verification of interactions system and method
Burkhardt et al. Distributed ledger
WO2020063820A1 (en) Asset transaction method, storage medium and computer device
CN111292190A (en) Transaction generation method, block creation method, related device and equipment
CN109493204B (en) Service accounting method based on block chain and terminal equipment
Ismail et al. Towards a blockchain deployment at uae university: Performance evaluation and blockchain taxonomy
Komalavalli et al. Overview of blockchain technology concepts
CN108269072A (en) For the transaction processing method and network node of block chain
Singh et al. Public blockchains scalability: An examination of sharding and segregated witness
CN111476572B (en) Block chain-based data processing method, device, storage medium and equipment
US20230291566A1 (en) Blockchain identities
CN112287034A (en) Data synchronization method, equipment and computer readable storage medium
CN110599331A (en) Debt charging system, method, device and storage medium based on block chain
CN110597922A (en) Data processing method, device, terminal and storage medium
CN109840769B (en) Block chain based evidence storing method, device, system and storage medium
Guo et al. Improved proofs of retrievability and replication for data availability in cloud storage
CN113508570B (en) Method for sharing and verifying blocks and electronic documents among nodes in block chain
CN111597264A (en) Block chain accounting method and device
Gao et al. Security analysis and improvement of a redactable consortium blockchain for industrial Internet-of-Things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024704

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination