CN109685657A - The method and node device and storage medium of transaction are handled in block chain network - Google Patents

The method and node device and storage medium of transaction are handled in block chain network Download PDF

Info

Publication number
CN109685657A
CN109685657A CN201811586343.5A CN201811586343A CN109685657A CN 109685657 A CN109685657 A CN 109685657A CN 201811586343 A CN201811586343 A CN 201811586343A CN 109685657 A CN109685657 A CN 109685657A
Authority
CN
China
Prior art keywords
block
transaction
node equipment
output
node
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.)
Granted
Application number
CN201811586343.5A
Other languages
Chinese (zh)
Other versions
CN109685657B (en
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.)
Zhongan Information Technology Service Co Ltd
Original Assignee
Zhongan Information Technology Service 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 Zhongan Information Technology Service Co Ltd filed Critical Zhongan Information Technology Service Co Ltd
Priority to CN201811586343.5A priority Critical patent/CN109685657B/en
Publication of CN109685657A publication Critical patent/CN109685657A/en
Application granted granted Critical
Publication of CN109685657B publication Critical patent/CN109685657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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

Abstract

The present invention relates to a kind of methods of processing money transfer transactions based on block chain and node device and storage medium.This method comprises: at first node equipment, when initiating to be related to the New Transaction for transferring accounts to second node equipment, the first block associated with the New Transaction is created in the first block chain associated with the first node equipment, wherein the first block chain only records the Transaction Information of transaction associated with the first node equipment;First block is sent to the second node equipment;Wherein, it includes: one or more transaction inputs that the New Transaction is generated in first block that the first block associated with the New Transaction is created in the first block chain associated with the first node equipment, wherein one or more of transaction inputs are corresponding with the previous transaction output not spent of the one or more selected from the first block chain;Multiple transaction output of the New Transaction is generated in first block.

Description

The method and node device and storage medium of transaction are handled in block chain network
Technical field
The present invention relates to block chain technical field, relate more specifically to handle in block chain network transaction method and Node device and storage medium.
Background technique
For narrow sense, block chain is that data block is combined by one kind in such a way that sequence is connected sequentially in time A kind of linked data structure, and the distributed account book that can not be distorted He can not forge guaranteed in a manner of cryptography.Broad sense is come It says, block chain technology is to verify to know together algorithm next life with storing data, using distributed node using block linked data structure At guarantee with more new data, in the way of cryptography data transmission and access safety, using by automatized script code-group At intelligent contract program the completely new distributed basis framework and calculation of one kind with operation data.
In current block catenary system, usually all same account books of block chain node maintenance are (for example, with bit Coin is the distributed account book of representative), therefore all transaction to carry out in block catenary system all must be executed serially.This Outside, this distributed account book is easy to be limited by network transfer speeds, the whole network common recognition algorithm etc., and trade confirmation time length, Handling capacity of trading is low, to be unable to satisfy large-scale commercial applications application.Therefore, it is necessary to one kind can be improved trade confirmation speed with And the method for commerce of the amount of gulping down is spat in transaction, and this method should not by integral node number increase and reduce the friendships of local nodes Easy speed.
Summary of the invention
Against the above technical problems and other potential technical problems, the embodiment provides one kind to be used for The method and node device and storage medium that transaction is handled in block chain network, can be improved the transaction of block catenary system Handling capacity, especially when the number of the node device in block catenary system is more, the transaction handling capacity in block catenary system is got over Height, and then can realize the unlimited horizontal extension of transaction.
The first aspect of the present invention provides a kind of method of processing money transfer transactions based on block chain, the method packet It includes: at first node equipment, when initiating to be related to the New Transaction for transferring accounts to second node equipment, with described first The first block associated with the New Transaction is created in the associated first block chain of node device, wherein firstth area Block chain only records the Transaction Information of transaction associated with the first node equipment;First block is sent to described Second node equipment;Wherein, creation and the New Transaction phase in the first block chain associated with the first node equipment Associated first block includes: one or more transaction inputs that the New Transaction is generated in first block, wherein The transaction output phase that one or more of transaction inputs are not spent with the one or more selected from the first block chain It corresponds to, and the summation of the remaining sums of wherein selected one or more transaction outputs not spent is new more than or equal to described The total amount of transaction;Multiple transaction output of the New Transaction is generated in first block, the multiple transaction output is extremely It less include the first transaction output and the second transaction output, wherein the first transaction output is related to the first node equipment Connection, the second transaction output are associated with the second node equipment.
In one implementation, the method also includes first block is being sent to the second node equipment Meanwhile the public key of the first node equipment is sent to the second node equipment.
In one implementation, creation and the new friendship in the first block chain associated with the first node equipment Easy associated first block further include: be used to indicate first block in firstth area for first block distribution The block hashed value of address in block chain, and addition is used to indicate first block described in first block The father's block hashed value for the father's block quoted in first block chain.
In one implementation, each transaction input in one or more of transaction inputs includes: block hashed value, The block hashed value is used to indicate the previous block including inputting the corresponding transaction output not spent with the transaction in institute State the address in the first block chain;Output serial number is not spent, it is described that output serial number is not spent to be used to indicate the transaction not spent Export the serial number in the previous block;And digital signature, the digital signature are the label of the first node equipment Name to indicate transaction input is generated by the first node equipment.
In one implementation, the first transaction output includes the first address of the first node equipment and described First node equipment the first remaining sum associated with the New Transaction, first remaining sum are by will be one or more of The total amount that the summation of the remaining sum for the transaction output not spent subtracts the New Transaction is come calculated;Second transaction is defeated The second address including the second node equipment and the second node equipment associated with the New Transaction second out Remaining sum, second remaining sum are equal to the amount of money transferred accounts in the New Transaction to the second node equipment.
In one implementation, the public key is curve public key.
In one implementation, the digital signature is that the private key based on the first node equipment generates.
In one implementation, the private key is elliptic curve private key.
The second aspect of the present invention provides a kind of method of processing money transfer transactions based on block chain, the method packet It includes: at second node equipment, being related to transferring accounts to the second node with what is initiated by first node equipment receiving Associated first block of New Transaction after, create second in the second block chain associated with the second node equipment Block, wherein the second block chain only records the Transaction Information of transaction associated with the second node equipment;To described One or more transaction inputs of second block carry out validation verification;In the case where the validation verification passes through, to institute It states first node equipment and sends the successful message of New Transaction;Wherein, associated with the second node equipment It includes: that the transaction input of one or more included by first block is added to institute that the second block is created in two block chains State one or more transaction inputs in the second block as second block;It will be multiple included by first block Transaction output is added in second block to be exported as multiple transaction of second block, the multiple transaction output Including at least the first transaction output and the second transaction output, wherein the first transaction output and the first node equipment phase Association, the second transaction output are associated with the second node equipment.
In one implementation, the second block is created also in the second block chain associated with the second node equipment It include: that the block for being used to indicate address of second block in the second block chain for second block distribution dissipates Train value, and addition is used to indicate the father that second block is quoted in the second block chain in second block Father's block hashed value of block.
In one implementation, each transaction input in one or more transaction inputs of second block includes: area Block hashed value, the block hashed value are used to indicate the elder generation including inputting the corresponding transaction output not spent with the transaction Address of the preceding block in the first block chain associated with the first node equipment;Output serial number is not spent, it is described not spend Expense output serial number is used to indicate the serial number of the transaction output not spent in the previous block;And digital signature, institute The signature that digital signature is the first node equipment is stated to indicate that transaction input is generated by the first node equipment 's.
In one implementation, the first transaction output of second block includes the first ground of the first node equipment Location and the first node equipment the first remaining sum associated with the New Transaction, first remaining sum are by will be described The total amount that the summation of the remaining sum for the transaction output that one or more is not spent subtracts the New Transaction is come calculated;It is described Second address and the second node equipment and institute of the second transaction output of the second block including the second node equipment Associated second remaining sum of New Transaction is stated, second remaining sum is equal in the New Transaction transfers accounts to the second node equipment The amount of money.
In one implementation, the method also includes: while receiving first block receive come from described first The public key of node device, and before creating second block in the second block chain, using the public key to described first Block carries out sign test, whether to verify first block actually from the first node equipment.
In one implementation, it includes: logical for carrying out validation verification to one or more transaction inputs of second block The one or more of second block is verified after the mode for up tracing wound generation block related with the New Transaction always The validity of transaction input, and in the case where any wound generation block related with the New Transaction can not be traced back to, instruction One or more of transaction inputs are invalid.
The third aspect of the present invention provides a kind of node device of processing transaction based on block chain, comprising: processing Device;Memory, the memory are coupled to the processor and are stored with instruction, make when described instruction executes described Processor executes according to the first aspect of the invention or method described in second aspect.
The fourth aspect of the present invention provides a kind of computer readable storage medium, has the calculating being stored thereon Machine executable instruction, it is according to the present invention that the computer executable instructions execute the equipment Method described in first aspect or second aspect.
Detailed description of the invention
It is shown with reference to attached drawing and illustrates various embodiments of the present invention.These attached drawings are only used for illustrating basic principle, and show For understanding aspect necessary to the basic principle, it is not intended to limit the invention range claimed.In the accompanying drawings, Identical appended drawing reference indicates similar feature.
Fig. 1 instantiates the signal that can be used for implementing the framework of block chain network system 100 of example embodiments of the present invention Figure.
Fig. 2 instantiates the structural schematic diagram of the example block 200 of embodiment according to the present invention.
Fig. 3 instantiates the flow chart of the method 300 of the processing transaction based on block chain.
Specific embodiment
Below in conjunction with attached drawing each exemplary embodiment that the present invention will be described in more detail.Although flow chart in attached drawing Some embodiments of the present invention are shown with schematic diagram, it should be understood that, the present invention can be by various forms come real It is existing, and should not be construed as limited to embodiments set forth here, providing these embodiments on the contrary is in order to more thorough and complete Site preparation understands the present invention.It should be understood that being merely to illustrate property of accompanying drawings and embodiments of the invention acts on, it is not intended to limit Protection scope of the present invention processed.
Fig. 1 instantiates the signal that can be used for implementing the framework of block chain network system 100 of example embodiments of the present invention Figure.Block catenary system 100 includes multiple block chain node devices (also referred herein as node), such as node 121,122 With 123.Although block catenary system 100 shown in Fig. 1 includes three nodes, but it should be appreciated that in practical applications, block chain System 100 may include more or fewer block chain nodes.In an embodiment of the present invention, every in these block chain nodes A node can be to calculate equipment, and calculating equipment can be server or user equipment (for example, mobile device or fixation are set It is standby).In an embodiment of the present invention, in each node in block catenary system 100 (for example, storage equipment of each node) All it is stored with only block chain associated with the node, such as (block chain 1211 associated with node 121 and node 122 Associated block chain 1221, block chain 1231 associated with node 123).Each block chain all only record with it is associated The associated transaction of node device Transaction Information.For example, the transaction of each historical trading associated with some node Information can be stored in a block, and multiple blocks associated with the node be connected with each other in a manner of chain to Form block chain associated with the node.In an embodiment of the present invention, each block chain is based on that transaction is not spent to export (Unspent Transaction Output, referred to as UTXO) model is associated with associated node device to record The Transaction Information of each transaction (note that and be primarily upon money transfer transactions in this application).In an embodiment of the present invention, area Each block in block chain includes one or more transaction inputs and one or more transaction outputs, wherein each transaction inputs It is all related to the transaction output that one does not spend, wherein do not spend transaction output refer to do not appeared in the block chain and other Trade other associated blocks transaction input in transaction output.In an embodiment of the present invention, include in each block One or more transaction inputs be all the tissue in the form of array in corresponding block, therefore each transaction inputs and exists All there is a corresponding serial number in corresponding block.The transaction for including in each block is exported is also in corresponding block The tissue in the form of array, therefore each transaction output also all has a corresponding serial number in corresponding block.
Fig. 2 instantiates the structural schematic diagram of the example block 200 of embodiment according to the present invention.As shown in Fig. 2, block 200 include transaction importation 201 and transaction output par, c 202, wherein transaction importation 201 includes transaction input 0, hands over Easily input 1, transaction output par, c 202 include transaction output 0 and transaction output 1.Although it is noted that for letter is illustrated The purpose wanted shows in Fig. 2 in block 200 and includes that two transaction inputs and two transaction export, but in practical applications, Block 200 may include more or fewer transaction inputs, may also comprise more or fewer transaction outputs, and input of trading With the number of transaction output may it is identical may also be different, this depends on specific service condition.
Under normal circumstances, each transaction input (for example, transaction input 0 and transaction input 1) includes: block hashed value, The block hashed value is used to indicate the previous block including inputting the corresponding transaction output not spent to the transaction corresponding Address in block chain;Output serial number is not spent, this does not spend output serial number to be used to indicate the transaction not spent output at this Serial number in previous block;Digital signature, the digital signature are to generate the signature of the node device of transaction input (for example, such as Fruit, which inputs relevant transaction to the transaction, to be initiated by first node equipment, then the digital signature is then the first node The digital signature of equipment).The digital signature can be generated based on the private key for the node device for generating transaction input.In a kind of reality In existing, which is elliptic curve private key.Each transaction output (for example, transaction output 0 and transaction output 1) includes corresponding Recipient address and remaining sum, the transaction so as to indicate the recipient non-cost newly-increased after trade accordingly are defeated Out.
In addition, each transaction input and each transaction output in block 200 all have corresponding serial number, such as in Fig. 2 The input 0 that shows, input 1, output 0, output 1 etc..
Block 200 may also include father's block hashed value 203, be used to indicate what block 200 was quoted in corresponding block chain Father's block hashed value of father's block.Block 200 may also include the area for being used to indicate address of the block 200 in corresponding block chain Block hashed value 204.
In an embodiment of the present invention, the transaction input of generation block (that is, the block for being used to issue additional currency in block chain) is created Do not have it is corresponding do not spend transaction output, therefore do not include above-mentioned block hashed value, do not spend output serial number and Digital signature, and the specific amount of money of the currency of additional issue is only indicated in its transaction output.For example, if in block catenary system Node 121 into Fig. 1 has been issued additional 12.5 yuan of currency, is placed in the transaction output of wound generation block.Then for node 121 For, have the right of eminent domain of this 12.5 yuan of currency, the output of this 12.5 yuan of currency can be used as the friendship of next transaction Easily input, as its name suggests, this transaction output are just referred to as to be that node 121 does not spend output, that is, node 121A The meaning of UTXO.In an embodiment of the present invention, wound generation block is usually and each money transfer transactions in the embodiment of the present invention The source of associated block.But since wound generation block is a kind of special block, herein mainly for General block is described.
Fig. 3 instantiates the flow chart of the method 300 of the processing money transfer transactions based on block chain.
In step 301, at first node equipment, in the New Transaction that initiation only transfers accounts to second node equipment When, the first block associated with the New Transaction is created in the first block chain associated with first node equipment, wherein should First block chain only record it is associated with the first node equipment transaction (including by the first node equipment initiation transfer accounts Transaction or the transaction transferred accounts to first node equipment) Transaction Information.
The first block packet associated with the New Transaction is created in the first block chain associated with first node equipment Include: generating one or more transaction inputs of the New Transaction in first block, wherein one or more transaction input and The transaction output that the one or more selected from the first block chain is not spent corresponding and wherein selected one or The summation of the remaining sum of multiple transaction outputs not spent is greater than or equal to the amount of money of the New Transaction;It is raw in first block At the first transaction output and the second transaction output of the New Transaction, wherein the first transaction output is related to first node equipment Connection, the second transaction output are associated with second node equipment.Each transaction in one or more transaction input inputs packet Include: block hashed value, the block hashed value are used to indicate including inputting the corresponding transaction output not spent with the transaction Address of the previous block in the first block chain;Output serial number is not spent, and it is previous that this does not spend output serial number to be used to indicate this Serial number of the transaction output not spent in the previous block;And digital signature, the digital signature are first node equipment Signature to indicate that transaction input is generated by first node equipment.First transaction output and the second transaction output are all wrapped Recipient address and remaining sum are included, wherein the recipient address of the first transaction output is the first address of first node equipment, and And its remaining sum is first node equipment the first remaining sum associated with New Transaction, which is by by this or more The amount of money that the summation of the remaining sum of a transaction output not spent subtracts the New Transaction is next calculated, and wherein second hands over The recipient address easily exported is the second address of second node equipment, and its remaining sum is second node equipment and the new friendship Easy associated second remaining sum, the second remaining sum are equal to the amount of money of the New Transaction.In an embodiment of the present invention, this or Multiple transaction inputs are all the tissue in the form of array in the first block, therefore each transaction input is in first block In all have a corresponding serial number, in addition first transaction output and second transaction output in first block be also with number The form tissue of group, thus the first transaction output and the second transaction output also all have in the first block one it is corresponding Serial number.
For example, when first node equipment transfer accounts to second node equipment the transaction of 55 yuans, first node equipment The firstth area associated with the money transfer transactions of 55 yuan can be created in the first block chain associated with first node equipment Block.For the transaction, first node equipment, which for example has selected from the first block chain, can be used for two of the transaction and does not spend Transaction output, for example, the transaction that does not spend of first with 50 yuan of remaining sums in third block export and the 4th block in Second with the 10 yuan of remaining sums transaction output not spent.Therefore, first node equipment can generate the friendship of transferring accounts in new block Easy two transaction input, wherein first transaction input includes the area of address of the instruction third block in the first block chain Serial number of the transaction output that block hashed value, instruction first are not spent in third block does not spend output serial number and instruction The digital signature of the signature of the first node equipment.The block hashed value of second transaction input includes that the 4th block of instruction exists Serial number of the transaction output that the block hashed value of address in first block chain, instruction second are not spent in the 4th block Output serial number is not spent and indicates the digital signature of the signature of the first node equipment.
In this example, first node equipment can also generate two transaction output of the money transfer transactions in new block, In first transaction output recipient address be first node equipment the first address, and remaining sum be 5 yuan of (i.e. two aboves 60 yuan of summation of the remaining sum for the transaction output not spent subtract 55 yuan of the total amount of the money transfer transactions), the second transaction output connects Debit address is second node equipment, and remaining sum is 55 yuan of (amount of money transferred accounts in the money transfer transactions to second node equipment 55 yuan).
In addition, it is noted that when such as first node equipment needs to transfer accounts to second node equipment, if with In the presence of the multiple and different friendships not spent that can meet the amount of money transferred accounts in the associated first block chain of first node equipment Easily output then can be exported optionally in one or more transaction not spent, as long as the transaction output not spent selected The summation of remaining sum is greater than or equal to the amount of money of the money transfer transactions.
The first block associated with the New Transaction is created also in the first block chain associated with first node equipment It include: to be used to indicate the block hashed value of address of first block in the first block chain for the distribution of the first block, and the Addition is used to indicate the father's block hashed value for father's block that the first block is quoted in the first block chain in one block.
In step 302, at first node equipment, the public key of the first block and first node equipment is sent to Second node equipment.In one implementation, which is curve public key.
In step 303, at second node equipment, after receiving first block and public key, the public key is utilized Sign test is carried out to first block, whether to verify the first block actually from the first node equipment.
In step 304, at second node equipment, the first block is being verified actually from the first node equipment In the case where, the second block is created in the second block chain associated with second node equipment.Otherwise, it is set to first node Preparation makes mistake message (not shown).
Creating the second block in the second block chain associated with second node equipment includes: to be wrapped the first block The one or more transaction inputs included are added to one or more transaction inputs in the second block as the second block;By First transaction output and the second transaction output included by one block are added in second block the as the second block One transaction output and the second transaction output.
In step 305, at second node equipment, one or more transaction inputs of the second block are carried out effective Property verifying.In one implementation, carrying out validation verification to one or more transaction inputs of the second block includes: by one Trace the mode of wound generation block related with institute's New Transaction up directly to verify one or more inputs of trading of the second block Validity indicate this or more and in the case where any wound generation block related with the New Transaction can not be traced back to A transaction input is invalid.For example, node device B needs to verify should when node device A carries out money transfer transactions to node device B The legitimacy of money transfer transactions, such as first to trace any transaction input with the money transfer transactions one associated by node device B Or multiple transaction outputs (these transaction not spent output in the block chain of node device A) not spent, it is verified this The transaction that do not spend export in all effective situations a bit, can it is each do not spend transaction to export on the basis of determine and do not spent with this Take one or more transaction inputs of the transaction output in same block, is then based on one or more transaction input retrospect One or more associated with each transaction input does not spend transaction output (for example, the transaction that the one or more is not spent Output can for example in the block chain of node device C, but may also be again in the block chain of two or more node devices), It, can similar method as described above and in the case where each transaction that does not spend traced back to exports all effective situation It further up traces, all original blocks related with the transaction until tracing back to the source as transfer amounts are Only.In the case where the original block as source can be traced back to, show that the transaction is effective.
Within step 306, at second node equipment, in the effective of one or more transaction inputs to the second block In the case that property is verified, the successful message of the New Transaction is sent to first node equipment.Otherwise, to first node equipment Send the New Transaction failure news (not shown).
Although in the fig. 3 embodiment, to occur over just the friendship of transferring accounts between first node equipment and second node equipment Easily for the present invention is described, but should be appreciated that the embodiment of the present invention be also applied for a node device to two or The case where other more than two node devices carry out money transfer transactions.Only in these cases, such as when being related to first node it sets It is standby when being transferred accounts to second node equipment and third node device, first node equipment at the block that creates will include Three transaction outputs, i.e., a transaction associated with first node equipment are exported and are set respectively with second and third node Standby associated two transaction export.Also, the block created at first node equipment will be sent to second and third Both node devices, and the transaction input of two other to this respectively node devices is needed to verify.For example, When one node device transfer accounts 55 yuans to second node equipment and transfer accounts 20 yuan of transaction to third node device, first Node device can create the firstth area associated with the money transfer transactions in the first block chain associated with first node equipment Block.For the transaction, first node equipment, which for example has selected from the first block chain, can be used for two of the transaction and does not spend Transaction output, for example, the transaction that does not spend of first with 50 yuan of remaining sums in third block export and the 4th block in Second with the 30 yuan of remaining sums transaction output not spent.Therefore, first node equipment can generate the friendship of transferring accounts in new block Easy two transaction input, wherein first transaction input includes the area of address of the instruction third block in the first block chain Serial number of the transaction output that block hashed value, instruction first are not spent in third block does not spend output serial number and instruction The digital signature of the signature of the first node equipment.The block hashed value of second transaction input includes that the 4th block of instruction exists Serial number of the transaction output that the block hashed value of address in first block chain, instruction second are not spent in the 4th block Output serial number is not spent and indicates the digital signature of the signature of the first node equipment.In this example, first node equipment Three transaction output of the money transfer transactions can be also generated in new block, wherein the recipient address of the first transaction output is the First address of one node device, and remaining sum is 5 yuan of (summations 80 for the remaining sum that the transaction that i.e. two above is not spent exports Member subtracts 75 yuan of the total amount of the money transfer transactions), the recipient address of the second transaction output is second node equipment, and remaining Volume is 55 yuan (55 yuan of the amount of money transferred accounts in the money transfer transactions to second node equipment), the recipient of third transaction output Location is third node device, and remaining sum is 20 yuan (20 yuan of the amount of money transferred accounts in the money transfer transactions to third node device).
The case where money transfer transactions are carried out to other more than two node devices for a node device can and so on.
In an embodiment of the present invention, since each node device only maintains block associated with the node device Chain, incoherent node for the record based on transaction associated with the node device, therefore in block catenary system it Between the incoherent transaction that occurs can concurrently execute, to improve the transaction handling capacity of block catenary system, especially work as area When the number of node device in block catenary system is more, the transaction handling capacity in block catenary system is higher, so that transaction can be realized Unlimited horizontal extension.
The process of method in Fig. 3 also represents machine readable instructions, which includes being executed by processor Program.The program can be by hypostazation in the software for being stored in visible computer readable medium, readable Jie of the tangible computer Matter such as CD-ROM, floppy disk, hard disk, digital versatile disc (DVD), Blu-ray Disc or other forms memory.Substitution, Fig. 3 In exemplary method in some steps or all steps can utilize specific integrated circuit (ASIC), programmable logic device (PLD), any combination of field programmable logic device (EPLD), discrete logic, hardware, firmware etc. is implemented.Though in addition, Right flow chart shown in Fig. 3 describes the data processing method, but can modify, delete to the step in the processing method Or merge.
As described above, using the instantiation procedure of coded command (such as computer-readable instruction) Lai Shixian Fig. 3, the programming Instruction is stored in visible computer readable medium, such as hard disk, flash memory, read-only memory (ROM), CD (CD), digital universal CD (DVD), Cache, random access storage device (RAM) and/or any other storage medium, on the storage medium Information can store any time (for example, for a long time, for good and all, of short duration situation, interim buffering and/or information it is slow It deposits).As used herein, the term visible computer readable medium be expressly defined to include any type of computer can Read the information of storage.Additionally or alternatively, the example mistake of Fig. 3 is realized using coded command (such as computer-readable instruction) Journey, the coded command are stored in non-transitory computer-readable medium, such as hard disk, flash memory, read-only memory, CD, and number is logical With CD, Cache, random access storage device and/or any other storage medium, can be deposited in the storage-medium information Storage any time (for example, for a long time, for good and all, of short duration situation, the caching of interim buffering and/or information).It is understood that , which can also be stored in network server, on the platform of cloud, in order to user's use.
In addition, although operation is depicted with particular order, this simultaneously should not be construed and require this generic operation to show Particular order is completed with sequential order, or executes the operation of all diagrams to obtain expected result.In some cases, Multitask or parallel processing can be beneficial.Similarly, although discussed above contain certain specific implementation details, this And should not be construed as limiting any invention or the scope of the claims, and should be interpreted that the specific of specific invention can be directed to The description of embodiment.Certain features described in the context of separated embodiment can also be with combined implementation in this specification In a single embodiment.Conversely, the various features described in the context of single embodiment can also be discretely multiple Embodiment is implemented in any suitable sub-portfolio.
Therefore, although describing the present invention referring to specific example, wherein these specific examples are merely intended to be to show Example property, rather than limit the invention, but it will be apparent to those skilled in the art that not It is detached from the basis of spirit and scope of the invention, the embodiment invented can be changed, increased or be deleted It removes.

Claims (16)

1. a kind of method of the processing money transfer transactions based on block chain, which comprises
At first node equipment, when initiating to be related to the New Transaction for transferring accounts to second node equipment, with described first The first block associated with the New Transaction is created in the associated first block chain of node device, wherein first block Chain only records the Transaction Information of transaction associated with the first node equipment;
First block is sent to the second node equipment;
Wherein, associated with the New Transaction first is created in the first block chain associated with the first node equipment Block includes:
One or more transaction inputs that the New Transaction is generated in first block, wherein one or more of transaction It is corresponding to input the transaction output not spent with the one or more selected from the first block chain, and wherein selected One or more do not spend transaction output remaining sums summation be greater than or equal to the New Transaction total amount;
Multiple transaction output of the New Transaction is generated in first block, the multiple transaction output includes at least first Transaction output and the second transaction output, wherein the first transaction output is associated with the first node equipment, described second Transaction output is associated with the second node equipment.
2. the method according to claim 1, wherein further including that first block is being sent to described second While node device, the public key of the first node equipment is sent to the second node equipment.
3. the method according to claim 1, wherein in the first block associated with the first node equipment The first block associated with the New Transaction is created in chain further include:
The block hash of address of first block in the first block chain is used to indicate for first block distribution Value, and
Addition is used to indicate father's block that first block is quoted in the first block chain in first block Father's block hashed value.
4. according to the method described in claim 3, it is characterized in that, each transaction in one or more of transaction inputs is defeated Entering includes: block hashed value, and the block hashed value is used to indicate including inputting the corresponding transaction not spent with the transaction Address of the previous block of output in the first block chain;Output serial number is not spent, it is described that output serial number is not spent to be used for Indicate the serial number of the transaction output not spent in the previous block;And digital signature, the digital signature are described The signature of first node equipment to indicate transaction input is generated by the first node equipment.
5. according to the method described in claim 1, it is characterized by:
It is described first transaction output include the first node equipment the first address and the first node equipment with it is described Associated first remaining sum of New Transaction, first remaining sum are by more than the transaction output that does not spend one or more of The total amount that the summation of volume subtracts the New Transaction is come calculated;
It is described second transaction output include the second node equipment the second address and the second node equipment with it is described Associated second remaining sum of New Transaction, second remaining sum are equal to the gold transferred accounts in the New Transaction to the second node equipment Volume.
6. according to the method described in claim 2, it is characterized in that, the public key is curve public key.
7. according to the method described in claim 4, it is characterized in that, the digital signature is based on the first node equipment What private key generated.
8. the method according to the description of claim 7 is characterized in that the private key is elliptic curve private key.
9. a kind of method of the processing money transfer transactions based on block chain, which comprises
At second node equipment, it is related to transferring accounts to the second node with what is initiated by first node equipment receiving Associated first block of New Transaction after, create the secondth area in the second block chain associated with the second node equipment Block, wherein the second block chain only records the Transaction Information of transaction associated with the second node equipment;
Validation verification is carried out to one or more transaction inputs of second block;
In the case where the validation verification passes through, Xiang Suoshu first node equipment sends the successful message of New Transaction;
Wherein, creating the second block in the second block chain associated with the second node equipment includes:
The transaction input of one or more included by first block is added in second block as described second One or more transaction inputs of block;
The output of multiple transaction included by first block is added in second block as second block Multiple transaction outputs, the multiple transaction output includes at least the first transaction output and the second transaction output, wherein described first Transaction output is associated with the first node equipment, and the second transaction output is associated with the second node equipment.
10. according to the method described in claim 9, it is characterized in that, in the secondth area associated with the second node equipment The second block is created in block chain further include:
The block hash of address of second block in the second block chain is used to indicate for second block distribution Value, and
Addition is used to indicate father's block that second block is quoted in the second block chain in second block Father's block hashed value.
11. according to the method described in claim 9, it is characterized in that, in one or more transaction inputs of second block Each transaction input include: block hashed value, the block hashed value is used to indicate including corresponding with transaction input Address of the previous block for the transaction output not spent in the first block chain associated with the first node equipment;It does not spend Take output serial number, it is described that output serial number is not spent to be used to indicate the sequence of the transaction output not spent in the previous block Number;And digital signature, the digital signature are by described to indicate transaction input for the signature of the first node equipment What first node equipment generated.
12. according to the method described in claim 9, it is characterized by:
First address and the first node of the first transaction output of second block including the first node equipment Equipment the first remaining sum associated with the New Transaction, first remaining sum are by by one or more of friendships not spent The total amount that the summation of the remaining sum easily exported subtracts the New Transaction is come calculated;
Second address and the second node of the second transaction output of second block including the second node equipment Equipment the second remaining sum associated with the New Transaction, second remaining sum is equal in the New Transaction to be set to the second node The standby amount of money transferred accounts.
13. according to the method described in claim 9, it is characterized in that, the method also includes:
The public key from the first node equipment is received while receiving first block, and
Before creating second block in the second block chain, sign test is carried out to first block using the public key, with First block is verified whether actually from the first node equipment.
14. according to the method for claim 11, which is characterized in that one or more transaction inputs to second block It includes: described to verify by way of up tracing wound generation block related with the New Transaction always for carrying out validation verification The validity of one or more transaction inputs of second block, and any wound related with the New Transaction can not traced back to In the case where generation block, indicate that one or more of transaction inputs are invalid.
15. a kind of node device of the processing transaction based on block chain, comprising:
Processor;
Memory, the memory are coupled to the processor and are stored with instruction, make when described instruction executes described Processor executes method described in any one of -14 according to claim 1.
16. a kind of computer readable storage medium has the computer executable instructions being stored thereon, the computer can The equipment is made to execute method described in any one of -14 according to claim 1 when executing instruction operation in a device.
CN201811586343.5A 2018-12-25 2018-12-25 Method and node device for processing transactions in a blockchain network and storage medium Active CN109685657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811586343.5A CN109685657B (en) 2018-12-25 2018-12-25 Method and node device for processing transactions in a blockchain network and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811586343.5A CN109685657B (en) 2018-12-25 2018-12-25 Method and node device for processing transactions in a blockchain network and storage medium

Publications (2)

Publication Number Publication Date
CN109685657A true CN109685657A (en) 2019-04-26
CN109685657B CN109685657B (en) 2023-07-21

Family

ID=66189116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811586343.5A Active CN109685657B (en) 2018-12-25 2018-12-25 Method and node device for processing transactions in a blockchain network and storage medium

Country Status (1)

Country Link
CN (1) CN109685657B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161071A (en) * 2019-12-30 2020-05-15 致信互链(北京)科技有限公司 Data processing method, device, equipment and storage medium based on block chain
CN112883068A (en) * 2021-04-30 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN113064730A (en) * 2021-04-30 2021-07-02 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292672A1 (en) * 2015-03-31 2016-10-06 Nasdaq, Inc. Systems and methods of blockchain transaction recordation
US20170005804A1 (en) * 2015-07-02 2017-01-05 Nasdaq, Inc. Systems and methods of secure provenance for distributed transaction databases
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
EP3376452A1 (en) * 2017-03-15 2018-09-19 Nokia Technologies Oy Blockchain-based electronic transfer method and network
WO2018189667A1 (en) * 2017-04-11 2018-10-18 nChain Holdings Limited System and method for distributing data records using a blockchain
WO2018207064A1 (en) * 2017-05-08 2018-11-15 nChain Holdings Limited Systems and Methods For Parallel Verification of Blockchain Transactions
CN108985927A (en) * 2017-06-05 2018-12-11 万事达卡国际公司 For making the method and system of the electronic transaction anonymization via block chain
US20210042747A1 (en) * 2018-02-08 2021-02-11 nChain Holdings Limited System and method for transferring resources using a blockchain
US20210090072A1 (en) * 2017-04-07 2021-03-25 nChain Holdings Limited Method and system for secure data record distribution using a blockchain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292672A1 (en) * 2015-03-31 2016-10-06 Nasdaq, Inc. Systems and methods of blockchain transaction recordation
US20170005804A1 (en) * 2015-07-02 2017-01-05 Nasdaq, Inc. Systems and methods of secure provenance for distributed transaction databases
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
EP3376452A1 (en) * 2017-03-15 2018-09-19 Nokia Technologies Oy Blockchain-based electronic transfer method and network
US20210090072A1 (en) * 2017-04-07 2021-03-25 nChain Holdings Limited Method and system for secure data record distribution using a blockchain
WO2018189667A1 (en) * 2017-04-11 2018-10-18 nChain Holdings Limited System and method for distributing data records using a blockchain
WO2018207064A1 (en) * 2017-05-08 2018-11-15 nChain Holdings Limited Systems and Methods For Parallel Verification of Blockchain Transactions
CN108985927A (en) * 2017-06-05 2018-12-11 万事达卡国际公司 For making the method and system of the electronic transaction anonymization via block chain
US20210042747A1 (en) * 2018-02-08 2021-02-11 nChain Holdings Limited System and method for transferring resources using a blockchain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111161071A (en) * 2019-12-30 2020-05-15 致信互链(北京)科技有限公司 Data processing method, device, equipment and storage medium based on block chain
CN112883068A (en) * 2021-04-30 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN113064730A (en) * 2021-04-30 2021-07-02 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device

Also Published As

Publication number Publication date
CN109685657B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN107147735B (en) Distributed account book system based on hierarchical structure
CN110363665B (en) Credit right data processing method, device, equipment and medium
CN107464112B (en) Transaction management method and system based on block chain
CN109242685A (en) Common recognition and verification method and device based on block chain
CN107491948B (en) Transfer payment method based on block chain technology
CN109325762A (en) Across the chain method of commerce of parallel chain, equipment and storage medium
CN109154885A (en) Business processing on block platform chain executes
CN109685657A (en) The method and node device and storage medium of transaction are handled in block chain network
CN107480990A (en) Block chain bookkeeping methods and device
CN108959621A (en) A kind of implementation method, device, equipment and the storage medium of block chain network
CN107846278A (en) Intelligent contract processing method and processing device
CN107294729A (en) Communication means and device in block chain between different nodes
CN109118230A (en) Information processing method and device based on block chain
CN108681900A (en) The method of light node verification transaction
CN109146490A (en) block generation method, device and system
CN110930152B (en) Data processing method based on block chain and related equipment
CN111369257B (en) Method and device for realizing asset withholding on block chain through intelligent contract
CN109710695A (en) The identification of transactions requests validity and initiating method, device, equipment and medium
CN110084594A (en) A kind of block chain method of commerce and device by lightning network
CN113570479B (en) Block chain transmission method, system and storage medium for real estate transaction data
CN109493057A (en) A kind of method of commerce and device based on UTXO model
CN109492049A (en) Data processing, block generation and synchronous method for block chain network
CN111640018B (en) Block chain transaction existence verification method and device
CN110351297A (en) A kind of verification method and device applied to block chain
CN105991282B (en) Password generated method and device

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
GR01 Patent grant
GR01 Patent grant