CN109064171A - A kind of method, apparatus and electronic system of block chain parallel transaction - Google Patents

A kind of method, apparatus and electronic system of block chain parallel transaction Download PDF

Info

Publication number
CN109064171A
CN109064171A CN201810831979.5A CN201810831979A CN109064171A CN 109064171 A CN109064171 A CN 109064171A CN 201810831979 A CN201810831979 A CN 201810831979A CN 109064171 A CN109064171 A CN 109064171A
Authority
CN
China
Prior art keywords
transaction
generation unit
validity period
block chain
cryptographic hash
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
CN201810831979.5A
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.)
Hangzhou Rivtower Technology Co Ltd
Original Assignee
Cryptape 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 Cryptape Co ltd filed Critical Cryptape Co ltd
Priority to CN201810831979.5A priority Critical patent/CN109064171A/en
Publication of CN109064171A publication Critical patent/CN109064171A/en
Pending legal-status Critical Current

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash

Landscapes

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

Abstract

The embodiment of the present application discloses the method, apparatus and electronic system of a kind of block chain parallel transaction, it trades at least one Client-initiated two or more, described two above transaction include at least the first transaction and the second transaction, comprising: transaction verification unit and transaction generation unit independent parallel execute respective step.Generation unit of trading is used to generate respective unique identification for each transaction, and wherein unique identification includes the corresponding transaction random number of each transaction and transaction validity period, while generation unit of trading the unique identification of each transaction is written in the transaction data of each transaction.Whether transaction verification unit is effective for verifying the transaction within the validity period of each transaction.To not only ensure that transaction uniqueness, but also it is able to achieve transaction concurrency, improves the performance of block chain transaction.

Description

A kind of method, apparatus and electronic system of block chain parallel transaction
Technical field
This application involves the method, apparatus and Department of Electronics of network technique field more particularly to a kind of block chain parallel transaction System.
Background technique
Block chain is substantially the database of a decentralization, be it is a succession of using cryptography method generate it is associated Data block contains the information that the whole network is traded in a period of time in each data block.Bit coin (BitCoin, BTC) is to be based on P2P (Peerto Peer, abbreviation P2P, peer-to-peer network or point-to-point) electronic money of block chain technology is based on not consuming friendship The easily account of output (Unspent Transaction Output, UTXO, TX represent transaction) is traded by UTXO group At.Because UTXO fails after being consumed, transaction may be considered unique, have a uniqueness, but it can not will be same Transmitted in parallel gives two target account numbers to fund simultaneously in UTXO account number.
Guarantee transaction uniqueness and improve transaction concurrency to be all the critical issue to be solved in block chain network technology.By In both of these problems, there are correlations, in existing system, often for anti-replay-attack, guarantee the uniqueness of transaction, and The concurrency dropped the business.
Need to find the uniqueness that not only guarantees to trade in a kind of block chain as a result, and the scheme for concurrency of trading be provided again, with gram Take the above problem.
Summary of the invention
The embodiment of the present application provides the method, apparatus and electronic system of a kind of block chain parallel transaction, existing to solve Technology for anti-replay-attack, the problem of guaranteeing the uniqueness of transaction and parallel transaction can not be carried out.
In order to solve the above-mentioned technical problem, the embodiment of the present application adopts the following technical solutions:
In a first aspect, providing a kind of method of block chain parallel transaction, initiated at least one user more than two Transaction, described two above transaction include the first transaction and the second transaction, comprising:
At least one user initiates the first transaction;
Generation unit of trading is the unique identification that first transaction generates the first transaction, unique mark of first transaction Know includes the first transaction random number and the first transaction validity period;
The unique identification that the transaction generation unit is traded described first is written in the first transaction data;
First transaction data is sent block chain network by the transaction generation unit;
Transaction verification unit receives first transaction data from the block chain network, and will have in first transaction By the first transaction random number cache to locally in the effect phase;
The transaction verification unit verifies the uniqueness of first transaction within the first transaction validity period;
After first transaction data is sent the block chain network by the transaction generation unit, the method Further include:
At least one described user initiates second transaction;
The transaction generation unit is the unique identification that second transaction generates the second transaction, and second transaction is only One mark includes the second transaction random number and the second transaction validity period;
The unique identification that the transaction generation unit is traded described second is written in the second transaction data;
Second transaction data is sent the block chain network by the transaction generation unit;
Wherein, the behaviour that the transaction generation unit trades to the operation of the second transaction with the transaction verification unit to first Work executes parallel.
Optionally, the transaction generation unit is according to the first transaction first cryptographic Hash of generating random number, and inquires It whether there is transaction cryptographic Hash identical with the first cryptographic Hash in first transaction validity period;If it is present regenerating one New cryptographic Hash is identified if there is no then verifying first cryptographic Hash as the uniqueness of the first transaction;
First cryptographic Hash is written in first transaction data transaction generation unit.
Optionally, after second transaction data is sent the block chain network by the transaction generation unit, The method also includes:
The transaction verification unit receives second transaction data from the block chain network, and will hand over described second The second transaction random number cache in easy validity period is to locally;
The transaction verification unit verifies the uniqueness of second transaction within the second transaction validity period.
In one possible implementation, the transaction generation unit is according to the second transaction generating random number second Cryptographic Hash, and inquire and whether there is transaction cryptographic Hash identical with the second cryptographic Hash within the second transaction validity period;If it does, A new cryptographic Hash is then regenerated, if there is no then using second cryptographic Hash as the uniqueness verifying of the second transaction Mark;
Second cryptographic Hash is written in second transaction data transaction generation unit.
Optionally, the first transaction validity period and/or the second transaction validity period are less than first threshold.
Optionally, the first threshold is 100.
Second aspect provides a kind of device of block chain parallel transaction, initiates at least one user more than two Transaction, described two above transaction include the first transaction and the second transaction, comprising:
Transaction generation unit, for trading for described first and generating first after at least one user initiates the first transaction The unique identification of transaction, the unique identification of first transaction include the first transaction random number and the first transaction validity period;By institute The unique identification for stating the first transaction is written in the first transaction data;Block chain network is sent by first transaction data;
Transaction verification unit, for receiving first transaction data from the block chain network, and will be described first By the first transaction random number cache to locally in transaction validity period;And within the first transaction validity period described in verifying The uniqueness of first transaction;
The transaction generation unit is also used to send first transaction data in the transaction generation unit described After block chain network, the unique identification of the second transaction is generated at least one Client-initiated second transaction, described the The unique identification of two transaction includes the second transaction random number and the second transaction validity period;The unique identification that described second trades is write Enter in the second transaction data;And the block chain network is sent by second transaction data;
Wherein, the behaviour that the transaction generation unit trades to the operation of the second transaction with the transaction verification unit to first Work executes parallel.
The third aspect, the application provide a kind of electronic system, comprising: memory, processor and are stored in the memory Computer program that is upper and can running on the processor, the computer program execute first aspect institute by the processor The method stated.
Fourth aspect, the application provide a kind of computer readable storage medium, deposit in the computer readable storage medium Instruction is contained, when run on a computer, so that computer executes method described in first aspect.
5th aspect, the application provide a kind of chip, and the chip is connected with memory, for reading and executing described deposit The software program stored in reservoir, to realize method described in first aspect.
The embodiment of the present application use at least one above-mentioned technical solution can reach it is following the utility model has the advantages that
On the one hand the technical solution provided in the embodiment of the present application can reduce the difficulty of transaction generating random number, transaction Generation unit need to only examine transaction random number generated within transaction validity period whether uniquely, if there is repeating then again It generates;On the other hand the difficulty of transaction verification unit verifying transaction uniqueness can be reduced, because being more than the trade fair of validity period It is dropped, has no effect on the logical transaction of whole system.
Meanwhile by technical solution provided by the embodiments of the present application, block chain user can initiate more transactions parallel, and And it can run succeeded under conditions of remaining sum meets.While ensure that the uniqueness of every transaction, realize in block The concurrently execution traded in catenary system, substantially improves the transaction performance of block chain.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment are not paying creative labor for those of ordinary skill in the art Under the premise of dynamic property, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the method for block chain parallel transaction provided by the embodiments of the present application;
Fig. 2 is the flow chart of the method for another block chain parallel transaction provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of block chain parallel transaction provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of electronic system provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of the device of block chain parallel transaction provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of this specification embodiment clearer, have below in conjunction with this specification The technical solution of this specification embodiment is clearly and completely described in body embodiment and corresponding attached drawing.Obviously, described Embodiment be only this specification a part of the embodiment, instead of all the embodiments.The embodiment of base in this manual, this Field those of ordinary skill every other embodiment obtained without making creative work, belongs to this explanation The range of book embodiment protection.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.
For the transaction that the account model based on state machine, user are sent, exists and obtained and retransmitted by other users Possibility onto block chain, thus will cause being performed a plurality of times for transaction, and this attack is known as Replay Attack.In order to avoid weight Attack is put, needs to take certain strategy.For example, ether mill (Ethereum) is the public affairs for having intelligent contract function of an open source Block platform chain altogether handles ether mill intelligence by providing ether virtual machine (Ethereum Virtual Machine, EVM) It can contract.In ether mill, each transaction that user sends must all be handed over comprising one from random number (nonce) value increased Easily once being identified, the legal nonce value of the user can be from increasing, and the transaction containing same nonce is then considered as illegal transaction, It prevents from resetting with this.
But there is a very big defect for this design in ether mill, that is, latter transaction has to wait for previous Transaction just can be with into trading pit, that is to say, that transaction can only sequential processes, limit the concurrency of transaction in this way.For example, After user M sends transaction T0 to same node, after the completion of T0 to be transacted can only be waited to be packaged block and handle, can just it be sent in Transaction afterwards.It, also cannot be parallel before the untreated completion of T0 even if posterior transaction T1 and T0 do not have any dependence Processing transaction T1, otherwise may cause transaction T0 be packaged into block failure, transaction T1 be successfully packaged, but verify nonce value failure The case where generation.It can be seen that the design in ether mill is also the uniqueness to drop the business parallel cost to guarantee transaction 's.
In view of the above problems, the embodiment of the present application provides method, apparatus and the Department of Electronics of a kind of block chain parallel transaction System can not only guarantee uniqueness of trading, but also be able to achieve transaction concurrency, to improve the performance of block chain transaction.
Embodiment one
Fig. 1 is a kind of flow chart of the method for block chain parallel transaction provided by the embodiments of the present application, is used at least one User initiates more than two transaction, and described two above transaction include the first transaction and the second transaction, as shown in Figure 1, packet Include following steps:
S101, at least one user initiate the first transaction.
Wherein, embodiments herein is especially suitable for the scene of the more transactions of user.
S102, transaction generation unit are that first transaction generates the first transaction random number, and is arranged for the first transaction validity period.
Transaction generation unit is added to two data fields in transaction data, for storing unique mark of first transaction Know: the first transaction random number and the first transaction validity period.Wherein, transaction generation unit generates the first transaction of random string write-in In random number, which is arranged using data field valid_until_block.Data field valid_until_ It is also effective that block indicates which block this currently transmitted transaction continues up to.For example the current block height of block chain is 100, the A that trades sets 120 for valid_until_block, then it represents that after the A that trades is sent to block chain network, directly To block height be 120 before all effectively.That is, transaction A can be packaged into the block between 101~120;If worked as Block height has been over 120, and the A that trades is packaged out block by block chain network not yet, then it represents that A is by block chain for transaction Network is abandoned, and transaction A can will be never recognized.It can thus be seen that in block catenary system, using data field valid_ Until_block is very convenient rationally transaction validity period is arranged.
S103, transaction generation unit are inquired according to first transaction the first Hash of generating random number (hash) value first It whether there is transaction cryptographic Hash identical with the first cryptographic Hash in transaction validity period;If there is (in fact, probability is very small), A new cryptographic Hash is then regenerated, is identified if there is no then verifying this cryptographic Hash as the uniqueness of the first transaction.
S104, transaction generation unit trade the first transaction corresponding first transaction random number validity period, first with first The information such as cryptographic Hash are written in the first transaction data.
First transaction data is sent block chain network by S105, transaction generation unit.
S106, transaction verification unit receive the first transaction data from block chain network, and will be within the first transaction validity period It is described first transaction random number cache to local.
The uniqueness of S107, transaction verification unit the first transaction of verifying within the first transaction validity period.
Wherein, whether transaction verification unit first transaction of verifying within the first transaction validity period is uniquely to trade.
When there is more than two transaction, after step S105, method provided by the embodiments of the present application also executes such as Fig. 2 Shown in method and step:
S201, at least one user initiate the second transaction.
Wherein, the first transaction is different from the second transaction.
S202, transaction generation unit are that second transaction generates the second transaction random number, and is arranged for the second transaction validity period.
Similar with step S102, the second transaction random number and the second transaction validity period are similarly the unique of the second transaction Mark.Wherein, transaction generation unit generates in random string write-in the second transaction random number, using data field valid_ The second transaction validity period is arranged in until_block.
Optionally, the first transaction validity period and/or the second transaction validity period are less than first threshold.Wherein first threshold For maximum value as defined in system.In the embodiment of the application, transaction validity period valid_until_block can be user It is arranged, and valid_until_block is less than maximum value max_valid_until_block as defined in system.One In the possible implementation of kind, maximum value max_valid_until_block as defined in system is set as 100, if user sets The valid_until_block set is greater than or equal to 100, then prompts the valid_until_block of user setting unsuccessful.It is logical The threshold value for crossing setting valid_until_block, can be to avoid the excessive influence system performance of random number buffer pool, to improve The overall performance of region catenary system.
S203, transaction generation unit are inquired according to second transaction the second Hash of generating random number (hash) value second It whether there is transaction cryptographic Hash identical with the second cryptographic Hash in transaction validity period;If it is present regenerate one it is new Cryptographic Hash is identified if there is no then verifying second cryptographic Hash as the uniqueness of the second transaction.
S204, transaction generation unit breathe out the corresponding second transaction random number of the second transaction, the second transaction validity period, second The information such as uncommon value are written in the second transaction data.
Second transaction data is sent block chain network by S205, transaction generation unit.
It should be noted that step S201-S205 and step S106-S107 be it is parallel, do not need waiting step It is executed again after the completion of S106-S107, i.e., operation and the transaction verification unit pair of the described transaction generation unit to the second transaction The operation of first transaction executes parallel.Likewise, block chain user can initiate multiple transaction parallel, it can reference Step S101-S105 executes similar step to execute parallel with transaction verification unit, to improve the transaction of block chain Performance.
Meanwhile as shown in Fig. 2, also executing following step after step S205:
S206, transaction verification unit receive the second transaction data from block chain network, and will be within the second transaction validity period It is described second transaction random number cache to local.
The uniqueness of S207, transaction verification unit the second transaction of verifying within the second transaction validity period.
Wherein, whether transaction verification unit second transaction of verifying within the second transaction validity period is uniquely to trade.
The method and step of Fig. 1 and Fig. 2 is concluded, the method for the offer of the embodiment of the present application can be as shown in Figure 3.Wherein, it hands over Easy authentication unit and transaction generation unit independent parallel execute respective step.Generation unit of trading is used to generate for each transaction Respective unique identification, wherein unique identification includes the corresponding transaction random number of each transaction and transaction validity period, is traded simultaneously Generation unit the unique identification of each transaction is written in the transaction data of each transaction.Transaction verification unit is used in each friendship It is whether effective that the transaction is verified in easy validity period.
The method provided in the embodiment of the present application, on the one hand can reduce the difficulty of transaction generating random number, and transaction generates Unit need to only examine transaction random number generated transaction validity period in whether uniquely, if there is repeat then give birth to again At;On the other hand the difficulty of transaction verification unit verifying transaction uniqueness can be reduced, because being more than the trade fair quilt of validity period It abandons, has no effect on the logical transaction of whole system.
Meanwhile by method provided by the embodiments of the present application, block chain user can initiate more transactions parallel, and Remaining sum can run succeeded under conditions of meeting.While ensure that the uniqueness of every transaction, realize in block linkwork The concurrently execution traded in system, substantially improves the transaction performance of block chain.
Embodiment two
The electronic system of this specification embodiment is discussed in detail referring to Fig. 4.Referring to FIG. 4, in hardware view, the electricity Subsystem includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may be comprising interior It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories Device (Non-Volatile Memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, which can be industry Standard architecture (Industry Standard Architecture, ISA) bus, Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The bus can be divided into address bus, data/address bus, Control bus etc..Only to be indicated with a four-headed arrow in Fig. 4, it is not intended that an only bus or one kind convenient for indicating The bus of type.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer Content recommendation device is formed on face.Processor executes the program that memory is stored, and is specifically used for executing service described previously Performed method operation when device is as executing subject.
Method disclosed in the above-mentioned implementation example figure 1- embodiment illustrated in fig. 2 such as this specification can be applied in processor, or Person is realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.During realization, Each step of the above method can be completed by the integrated logic circuit of the hardware in processor or the instruction of software form.On The processor stated can be at general processor, including central processing unit (Central Processing Unit, CPU), network Manage device (Network Processor, NP) etc.;Can also be digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate Array (Field-Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or crystalline substance Body pipe logical device, discrete hardware components.It may be implemented or execute disclosed each method, the step in this specification embodiment And logic diagram.General processor can be microprocessor or the processor is also possible to any conventional processor etc..Knot The step of closing method disclosed in this specification embodiment can be embodied directly in hardware decoding processor and execute completion, Huo Zheyong Hardware and software module combination in decoding processor execute completion.Software module can be located at random access memory, flash memory, read-only The storage medium of this fields such as memory, programmable read only memory or electrically erasable programmable memory, register maturation In.The storage medium is located at memory, and processor reads the information in memory, and the step of the above method is completed in conjunction with its hardware Suddenly.
The method that the electronic system can also carry out Fig. 1-Fig. 2, and realize block chain parallel transaction device shown in Fig. 1-Fig. 2 The function of embodiment, details are not described herein for this specification embodiment.
Certainly, other than software realization mode, other realization sides are not precluded in the electronic system of this specification embodiment Formula, such as logical device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is simultaneously unlimited Due to each logic unit, it is also possible to hardware or logical device.
Embodiment three
This specification embodiment also provides a kind of computer readable storage medium, the computer-readable recording medium storage One or more programs, one or more of programs are when the electronic system for being included multiple application programs executes, so that institute It states electronic system and executes method described in embodiment one.Details are not described herein.
Wherein, the computer readable storage medium, such as read-only memory (Read-Only Memory, ROM), at random Access memory (Random Access Memory, RAM), magnetic or disk etc..
Example IV
Referring to Figure 5, the structural schematic diagram of the block chain parallel transaction device 500 provided for this specification embodiment, The device mainly includes:
It trades generation unit 501, for generating for first transaction after at least one user initiates the first transaction The first transaction validity period is arranged in one transaction random number;By the first transaction random number and the first transaction validity period It is written in the first transaction data;Block chain network is sent by first transaction data.
Transaction verification unit 502, for receiving first transaction data from the block chain network, and will be described the By the first transaction random number cache to locally in one transaction validity period;And institute is verified within the first transaction validity period State the uniqueness of the first transaction.
Optionally, transaction generation unit 501 is also used to according to the first transaction first cryptographic Hash of generating random number, and Inquiry whether there is transaction cryptographic Hash identical with the first cryptographic Hash within the first transaction validity period;If it is present giving birth to again At a new cryptographic Hash, identified if there is no then verifying first cryptographic Hash as the uniqueness of the first transaction.
Optionally, transaction generation unit 501 is also used to first cryptographic Hash be written in first transaction data.
In one possible implementation, it sends first transaction data in the transaction generation unit 501 The block chain network, after at least one user initiates the second transaction, the transaction generation unit 501 is also used to be described the Two transaction generate the second transaction random number, and the second transaction validity period is arranged;By the second transaction random number and described Second transaction validity period was written in the second transaction data;The block chain network is sent by second transaction data;Wherein, The transaction generation unit is to execute parallel to the operation and operation of the transaction verification unit to the first transaction of the second transaction 's.
In one possible implementation, transaction verification unit 502, being also used to will be described in transaction generation unit 501 Second transaction data is sent to after the block chain network, receives second transaction data from the block chain network, and By the second transaction random number cache within the second transaction validity period to locally;And it is effective in second transaction The uniqueness of verifying second transaction in phase.
Optionally, transaction generation unit 501 is also used to according to the second transaction second cryptographic Hash of generating random number, and is looked into It askes and whether there is transaction cryptographic Hash identical with the second cryptographic Hash within the second transaction validity period;If it is present regenerating One new cryptographic Hash is identified if there is no then verifying second cryptographic Hash as the uniqueness of the second transaction;And Second cryptographic Hash is written in second transaction data.
In one possible implementation, the first transaction validity period and/or the second transaction validity period are less than First threshold.
Optionally, the first threshold is 100.
The device provided in the embodiment of the present application, on the one hand can reduce the difficulty of transaction generating random number, and transaction generates Unit need to only examine transaction random number generated transaction validity period in whether uniquely, if there is repeat then give birth to again At;On the other hand the difficulty of transaction verification unit verifying transaction uniqueness can be reduced, because being more than the trade fair quilt of validity period It abandons, has no effect on the logical transaction of whole system.
Meanwhile by device provided by the embodiments of the present application, block chain user can initiate more transactions parallel, and Remaining sum can run succeeded under conditions of meeting.While ensure that the uniqueness of every transaction, realize in block linkwork The concurrently execution traded in system, substantially improves the transaction performance of block chain.
In short, being not intended to limit this specification the foregoing is merely the preferred embodiment of this specification embodiment The protection scope of embodiment.It is all this specification embodiment spirit and principle within, made any modification, equivalent replacement, Improve etc., it should be included within the protection scope of this specification embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
Various embodiments are described in a progressive manner in this specification embodiment, identical phase between each embodiment As partially may refer to each other, each embodiment focuses on the differences from other embodiments.Especially for For system embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method The part of embodiment illustrates.

Claims (10)

1. a kind of method of block chain parallel transaction is used for the more than two transaction of at least one Client-initiated, described two Above transaction includes the first transaction and the second transaction, which is characterized in that the described method includes:
At least one described user initiates first transaction;
Generation unit of trading is the unique identification that first transaction generates the first transaction, the unique identification packet of first transaction Include the first transaction random number and the first transaction validity period;
The unique identification that the transaction generation unit is traded described first is written in the first transaction data;
First transaction data is sent block chain network by the transaction generation unit;
Transaction verification unit receives first transaction data from the block chain network, and will be in the first transaction validity period It is interior to trade random number cache to locally for described first;
The transaction verification unit verifies the uniqueness of first transaction within the first transaction validity period;
After first transaction data is sent the block chain network by the transaction generation unit, the method is also wrapped It includes:
At least one described user initiates second transaction;
The transaction generation unit is the unique identification that second transaction generates the second transaction, unique mark of second transaction Know includes the second transaction random number and the second transaction validity period;
The unique identification that the transaction generation unit is traded described second is written in the second transaction data;
Second transaction data is sent the block chain network by the transaction generation unit;
Wherein, the transaction generation unit is with operation of the transaction verification unit to the first transaction to the operation of the second transaction It executes parallel.
2. the method according to claim 1, wherein the method also includes:
The transaction generation unit is inquired effective in the first transaction according to the first transaction first cryptographic Hash of generating random number It whether there is transaction cryptographic Hash identical with first cryptographic Hash in phase;If it is present regenerating a new Hash Value is identified if there is no then verifying first cryptographic Hash as the uniqueness of the first transaction;
First cryptographic Hash is written in first transaction data transaction generation unit.
3. the method according to claim 1, wherein in the transaction generation unit by second transaction data It is sent to after the block chain network, the method also includes:
The transaction verification unit receives second transaction data from the block chain network, and will have in second transaction The second transaction random number cache in the effect phase is to locally;
The transaction verification unit verifies the uniqueness of second transaction within the second transaction validity period.
4. the method according to claim 1, wherein the method also includes:
The transaction generation unit is inquired effective in the second transaction according to the second transaction second cryptographic Hash of generating random number It whether there is transaction cryptographic Hash identical with the second cryptographic Hash in phase;If it is present regenerating a new cryptographic Hash, such as There is no then verify mark for second cryptographic Hash as the uniqueness of the second transaction for fruit;
Second cryptographic Hash is written in second transaction data transaction generation unit.
5. the method according to claim 1, wherein the first transaction validity period and/or second transaction Validity period is less than first threshold.
6. a kind of device of block chain parallel transaction is used for the more than two transaction of at least one Client-initiated, described two Above transaction includes the first transaction and the second transaction, which is characterized in that described device includes:
Transaction generation unit, for trading for described first and generating first after at least one described user initiates the first transaction The unique identification of transaction, the unique identification of first transaction include the first transaction random number and the first transaction validity period;By institute The unique identification for stating the first transaction is written in the first transaction data;Block chain network is sent by first transaction data;
Transaction verification unit, for receiving first transaction data from the block chain network, and will be in first transaction By the first transaction random number cache to locally in validity period;And described first is verified within the first transaction validity period The uniqueness of transaction;
The transaction generation unit is also used to send the block for first transaction data in the transaction generation unit After chain network, the unique identification of the second transaction is generated at least one Client-initiated second transaction, described second hands over Easy unique identification includes the second transaction random number and the second transaction validity period;The unique identification write-in that described second is traded In two transaction data;And the block chain network is sent by second transaction data;
Wherein, the transaction generation unit is with operation of the transaction verification unit to the first transaction to the operation of the second transaction It executes parallel.
7. device according to claim 6, which is characterized in that
The transaction generation unit is also used to according to the first transaction first cryptographic Hash of generating random number, and inquires first It whether there is transaction cryptographic Hash identical with first cryptographic Hash in transaction validity period;If it is present regenerating one New cryptographic Hash is identified if there is no then verifying first cryptographic Hash as the uniqueness of the first transaction;And by institute The first cryptographic Hash is stated to be written in first transaction data.
8. device according to claim 6, which is characterized in that
The transaction verification unit is also used to send the block for second transaction data in the transaction generation unit After chain network, second transaction data is received from the block chain network, and will be within the second transaction validity period The second transaction random number cache is to locally;And the unique of second transaction is verified within the second transaction validity period Property.
9. a kind of electronic system, comprising: memory, processor and be stored on the memory and can transport on the processor Capable computer program, the computer program execute such as method of any of claims 1-6 by the processor.
10. a kind of computer storage medium, including instruction, for executing computer as described in any one of claim 1-6 Method.
CN201810831979.5A 2018-07-26 2018-07-26 A kind of method, apparatus and electronic system of block chain parallel transaction Pending CN109064171A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810831979.5A CN109064171A (en) 2018-07-26 2018-07-26 A kind of method, apparatus and electronic system of block chain parallel transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810831979.5A CN109064171A (en) 2018-07-26 2018-07-26 A kind of method, apparatus and electronic system of block chain parallel transaction

Publications (1)

Publication Number Publication Date
CN109064171A true CN109064171A (en) 2018-12-21

Family

ID=64836479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810831979.5A Pending CN109064171A (en) 2018-07-26 2018-07-26 A kind of method, apparatus and electronic system of block chain parallel transaction

Country Status (1)

Country Link
CN (1) CN109064171A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109784930A (en) * 2019-02-18 2019-05-21 深圳市网心科技有限公司 A kind of processing method, device, electronic equipment and the medium of block chain transaction data
CN110276688A (en) * 2019-06-14 2019-09-24 深圳前海微众银行股份有限公司 The method and device of trading processing in a kind of block chain
CN110648125A (en) * 2019-09-10 2020-01-03 杭州秘猿科技有限公司 Packaging transaction method and device and electronic equipment
CN110648234A (en) * 2019-09-12 2020-01-03 广州蚁比特区块链科技有限公司 Block generation method and device
CN110866828A (en) * 2019-10-15 2020-03-06 北京海益同展信息科技有限公司 Method, apparatus, computer device and storage medium for processing blockchain data
CN111066046A (en) * 2019-04-26 2020-04-24 阿里巴巴集团控股有限公司 Replay attack resistant authentication protocol
RU2738826C1 (en) * 2018-12-28 2020-12-17 Алибаба Груп Холдинг Лимитед Concurrent execution of transactions in a network of blockchains
US10911461B2 (en) 2018-12-28 2021-02-02 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network based on smart contract whitelists
CN113222596A (en) * 2021-04-23 2021-08-06 上海和数软件有限公司 Electric power data storage method and system based on block chain intelligent contract
CN113570460A (en) * 2019-08-30 2021-10-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
US11283634B2 (en) 2018-12-29 2022-03-22 Advanced New Technologies Co., Ltd. System and method for detecting replay attack
US11323475B2 (en) 2018-12-29 2022-05-03 Advanced New Technologies Co., Ltd. System and method for detecting replay attack

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN106815722A (en) * 2016-12-22 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 Information processing method and device based on block chain
CN106991607A (en) * 2017-03-29 2017-07-28 杭州秘猿科技有限公司 A kind of unordered transaction control method based on block chain account model

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN106815722A (en) * 2016-12-22 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 Information processing method and device based on block chain
CN106991607A (en) * 2017-03-29 2017-07-28 杭州秘猿科技有限公司 A kind of unordered transaction control method based on block chain account model

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2738826C1 (en) * 2018-12-28 2020-12-17 Алибаба Груп Холдинг Лимитед Concurrent execution of transactions in a network of blockchains
US11381573B2 (en) 2018-12-28 2022-07-05 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network based on smart contract whitelists
US11132676B2 (en) 2018-12-28 2021-09-28 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network
US10911461B2 (en) 2018-12-28 2021-02-02 Advanced New Technologies Co., Ltd. Parallel execution of transactions in a blockchain network based on smart contract whitelists
US11283634B2 (en) 2018-12-29 2022-03-22 Advanced New Technologies Co., Ltd. System and method for detecting replay attack
US11323475B2 (en) 2018-12-29 2022-05-03 Advanced New Technologies Co., Ltd. System and method for detecting replay attack
CN109784930A (en) * 2019-02-18 2019-05-21 深圳市网心科技有限公司 A kind of processing method, device, electronic equipment and the medium of block chain transaction data
CN111066046B (en) * 2019-04-26 2023-11-21 创新先进技术有限公司 Replay attack resistant authentication protocol
CN111066046A (en) * 2019-04-26 2020-04-24 阿里巴巴集团控股有限公司 Replay attack resistant authentication protocol
CN110276688B (en) * 2019-06-14 2024-02-06 深圳前海微众银行股份有限公司 Method and device for processing transactions in blockchain
WO2020248982A1 (en) * 2019-06-14 2020-12-17 深圳前海微众银行股份有限公司 Method and device for transaction processing in blockchain
CN110276688A (en) * 2019-06-14 2019-09-24 深圳前海微众银行股份有限公司 The method and device of trading processing in a kind of block chain
CN113570460A (en) * 2019-08-30 2021-10-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110648125A (en) * 2019-09-10 2020-01-03 杭州秘猿科技有限公司 Packaging transaction method and device and electronic equipment
CN110648125B (en) * 2019-09-10 2022-08-02 杭州秘猿科技有限公司 Packaging transaction method and device, electronic equipment and storage medium
CN110648234A (en) * 2019-09-12 2020-01-03 广州蚁比特区块链科技有限公司 Block generation method and device
CN110866828A (en) * 2019-10-15 2020-03-06 北京海益同展信息科技有限公司 Method, apparatus, computer device and storage medium for processing blockchain data
CN113222596A (en) * 2021-04-23 2021-08-06 上海和数软件有限公司 Electric power data storage method and system based on block chain intelligent contract

Similar Documents

Publication Publication Date Title
CN109064171A (en) A kind of method, apparatus and electronic system of block chain parallel transaction
EP3591510B1 (en) Method and device for writing service data in block chain system
CN108009441B (en) Method and apparatus for resource transfer and funds transfer
US11321783B2 (en) Method and device for data processing based on blockchain
CN110765200B (en) Asset procurement method and device based on block chain and electronic equipment
CN110148017B (en) Rights issuing method and device based on blockchain, electronic equipment and storage medium
US11544794B2 (en) Claim settlement method and apparatus employing blockchain technology
Buterin A next-generation smart contract and decentralized application platform
EP3678079A1 (en) Data processing method and apparatus
CN108364223A (en) A kind of method and device of Data Audit
CN110163590A (en) Payment based on block chain withholds method and device, electronic equipment, storage medium
CN109785132A (en) A kind of anti-fake source tracing method, device and storage medium based on block chain
US20220067831A1 (en) Blockchain-based cross-currency settlement methods, apparatuses, and devices
CN109359973A (en) Data based on block chain deposit card method and apparatus
CN109474682A (en) A kind of block chain network transmission method, device and electronic equipment
CN108550038A (en) A kind of data dissemination system and method applied to block chain
CN110020542A (en) Data read-write method and device, electronic equipment
CN110505311A (en) A kind of across the chain exchange method of isomorphism block chain and system
CN111738724B (en) Cross-border resource transfer authenticity auditing method and device, and electronic equipment
CN108846748A (en) A kind of independent process executes the method and device of contract
WO2020037623A1 (en) Capacity expansion method, device, and system for quantum-resistant blockchain account system
CN111552991A (en) Block chain transaction method and device
CN111639125A (en) Resource circulation method and device based on block chain
CN109389377A (en) A kind of contactless static signature method, apparatus, electronic equipment and system
CN110443612B (en) Block chain-based reimbursement expense segmentation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200312

Address after: 310012 no.1001, 10 / F, block a, Huaxing Times Square, No.478, Wensan Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Xita Technology Co.,Ltd.

Address before: 310013 A 1301, Huaxing Times Square, 478 Wensanlu Road, Xihu District, Hangzhou, Zhejiang.

Applicant before: CRYPTAPE Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20181221