Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase
Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for generating information of the disclosure or the implementation of the device for generating information
The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 may include electronic equipment 101,102,103 and network 104.Network 104 to
The medium of communication link is provided between electronic equipment 101,102,103.Network 104 may include various connection types, such as
Wired, wireless communication link or fiber optic cables etc..
The electronic equipment interaction that electronic equipment 101,102,103 connect network 104 with other can be used in user, to receive
Or send message etc..Various telecommunication customer end applications, such as the book keeping operation of block chain can be installed on electronic equipment 101,102,103
Class application, the application of digital cash wallet class, web browser applications, shopping class application, searching class application, instant messaging tools,
Mailbox client, social platform software etc..
Electronic equipment 101,102,103 can be hardware, be also possible to software.When electronic equipment 101,102,103 is hard
When part, it can be the various electronic equipments with information processing capability, including but not limited to smart phone, tablet computer, above-knee
Type portable computer and desktop computer etc..When electronic equipment 101,102,103 is software, may be mounted at above-mentioned listed
In the electronic equipment of act.Its may be implemented into multiple softwares or software module (such as provide block chain billed services or
For providing the service of digital cash wallet), single software or software module also may be implemented into.It is not specifically limited herein.
Each electronic equipment in system architecture 100 forms block catenary system, and each electronics in system architecture 100 is set
It is standby to use distributed data block chain storing data.
It should be noted that provided by the embodiment of the present application for generate the method for information generally by electronic equipment 101,
102, it 103 executes, correspondingly, the device for generating information is generally positioned in electronic equipment 101,102,103.
It should be understood that the number of electronic equipment and network in Fig. 1 is only schematical.It, can be with according to needs are realized
With any number of electronic equipment and network.
With continued reference to Fig. 2, the process of one embodiment of the method for generating information according to the disclosure is shown
200.The method for being used to generate information, comprising the following steps:
Step 201, target transaction cluster sequence is obtained.
In the present embodiment, for generate the method for information executing subject (such as electronic equipment shown in FIG. 1 101,
102,103) target transaction cluster sequence can be obtained by wired connection mode or radio connection.Wherein, target transaction
Cluster sequence is to handle it, to generate the transaction cluster sequence of block.Target transaction cluster sequence may include at least two
Transaction cluster.Each transaction cluster is for generating a block.Transaction cluster may include destination number transaction.Destination number can be
The predetermined quantity of technical staff, or determined based on predetermined block capacity and the data volume of each transaction
Quantity out (the sum of the data volume of each transaction in transaction cluster is less than or equal to block capacity).
In practice, the transaction in block chain field refers to fund going to another user from a user, in turn, transaction
Two attributes are generally included, are respectively output and input.Input refers to the input side of fund, and output refers to the reception of fund
Side.
It should be noted that in order to express easily, the disclosure will trade and the generated transaction data of transaction is referred to as handing over
Easily.It can be appreciated that actual transaction instruction is movement, and during being packaged transaction to generate block, the reality that is packaged
It is transaction data caused by this movement of transaction in matter.
In the present embodiment, the transaction cluster in target transaction cluster sequence is arranged according to target sequences.Target sequences can be
(such as user digs mine bonus based on the transaction in transaction cluster is corresponding to the sequence specified using the user of above-mentioned executing subject
How many and specified sequences), or the sequence of determination according to the time of origin of the transaction in transaction cluster.
As an example, transaction cluster A includes transaction a1 and transaction a2 for transaction cluster A and transaction cluster B;The cluster B that trades includes handing over
Easy b1 and transaction b2.Wherein, trade a1, transaction a2, transaction b1 and trade b2 time of origin be respectively on May 6th, 2019,
On May 7th, 2019, on May 8th, 2019 and on May 9th, 2019.The time of origin for the transaction then traded in cluster A is earlier than transaction cluster
Transaction cluster A can be arranged in front of transaction cluster B by the time of origin of the transaction in B in turn.Thus, it is possible to obtain target transaction
Cluster sequence " transaction cluster A;Trade cluster B ".
In practice, the transaction of not confirmed will be generally stored in the local memory of each block chain node in block chain network
In, in turn, above-mentioned executing subject can be obtained from local memory and be traded as a block chain node, and then be based on number of targets
Amount, is divided at least two transaction clusters for acquired transaction, then according to target sequences at least two transaction obtained
Cluster is arranged, to obtain target transaction cluster sequence;Alternatively, transaction cluster sequence can be stored in advance in local memory, it is in turn, above-mentioned
Executing subject directly can obtain transaction cluster sequence as target transaction cluster sequence from local memory.
Step 202, it for the transaction in target transaction cluster sequence, executes step identified below: determining target transaction cluster sequence
Whether the preposition dependence including the transaction is traded in column, in response to not including that preposition dependence is traded, determines the encryption knot of the transaction
Fruit.
In the present embodiment, for the transaction in target transaction cluster sequence obtained in step 201, above-mentioned executing subject can
To execute above-mentioned determining step.Wherein, the preposition affiliated transaction cluster of transaction that relies on is arranged in front of transaction cluster belonging to the transaction,
Also, preposition dependence transaction has dependence with the transaction.Specifically, the preposition dependence for relying on transaction and the transaction refers to
Be the transaction execution, dependent on it is preposition rely on transaction execution.
As an example, transaction cluster A includes transaction a " first is given to the fund that the second amount of money is 10 ";The B that trades includes that " second turns transaction b
The fund for being 10 to the fourth amount of money ".If the original state of second is no fund, the execution for the b that trades depends on the execution of transaction a,
I.e. transaction a needs execute before the b that trades, and otherwise, transaction b will be unable to execute.Here, transaction a is both the preposition dependence of transaction b
Transaction.
In practice, for preposition dependence transaction and the transaction with dependence, the preposition output for relying on transaction is usual
For the input of the transaction.Referring to above-mentioned example, transaction a is that the preposition dependence of transaction b is traded, and exporting for a that trades is defeated with transaction b
Enter identical, is all second.
In general, block chain node can calculate encrypted result for effective transaction, and then it is wrapped into time zone block.Existing skill
In art, in order to reduce a possibility that invalid transaction is packed into block, for belonging to the transaction of different transaction clusters, usually press
Sequence calculates encrypted result.Such as target transaction cluster sequence is " transaction cluster A;Trade cluster B ", then general first to calculate in transaction cluster A
Then the encrypted result of transaction calculates the encrypted result of the transaction in transaction cluster B again.And in practicing, in adjacent transaction cluster
Dependence is not present in transaction mostly.For the transaction of dependence is not present, and there is no the need for sequentially calculating encrypted result
It asks.Therefore, for, there is no the preposition transaction for relying on transaction, the disclosure can directly determine the friendship in target transaction cluster sequence
The encrypted result computational efficiency of the transaction in target transaction cluster sequence can be improved with this in easy encrypted result, in turn, can be with
The efficiency that block generates is improved, the performance of block chain is helped to improve.
It is appreciated that present disclose provides the encryptions for the transaction for not having dependence in a kind of pair of target transaction cluster sequence
As a result the method for parallel computation is carried out.Specifically, above-mentioned executing subject can be for whole transaction in target transaction cluster sequence
Or part is traded, and it is synchronous to execute above-mentioned determining step, with this, the encryption knot for the transaction without dependence may be implemented
The parallel computation of fruit.
In the present embodiment, the encrypted result of transaction can be to be calculated transaction and obtained using various Encryption Algorithm
Result.
In some optional implementations of the present embodiment, encrypted result can be cryptographic Hash.
Herein, above-mentioned executing subject can use the cryptographic Hash that hash algorithm calculates transaction.In practice, hash algorithm is
The binary value of random length is mapped as to the method for the smaller binary value of regular length, wherein lesser binary value is
For cryptographic Hash.
Particularly, if including being corresponding with the preposition transaction for relying on transaction, above-mentioned executing subject in target transaction cluster sequence
The encrypted result for determining the transaction in various manners can be adopted, such as the encrypted result of the transaction can be directly determined;Alternatively, can
After the completion of determination with the encrypted result traded in preposition dependence, then determine the encrypted result of the transaction.
Step 203, in response to obtaining target transaction cluster, target is determined based on the encrypted result of the transaction in target transaction cluster
The encrypted result of the corresponding block of transaction cluster.
In the present embodiment, above-mentioned executing subject can be in response to obtaining target transaction cluster, based in target transaction cluster
The encrypted result of transaction determines the encrypted result of the corresponding block of target transaction cluster.Wherein, target transaction cluster is to have confirmed
The transaction cluster of the encrypted result of included each transaction.The corresponding block of target transaction cluster is can give birth to using target transaction cluster
At block.
Specifically, above-mentioned executing subject can combine the encrypted result of the transaction in target transaction cluster two-by-two, Jin Erjia
Close calculating, encrypted result of the encrypted result as the corresponding block of target transaction cluster after one combination of final acquisition.
As an example, target transaction cluster includes " transaction A;Trade B;Trade C;Trade D ", and the encrypted result for the A that trades is a;
The encrypted result of transaction B is b;The encrypted result of transaction C is c;The encrypted result of transaction D is d.Then above-mentioned executing subject can be first
Encrypted result a and encrypted result b are first combined and carried out computations, obtains encrypted result e.Then, by encrypted result c and plus
Close result d combines and carries out computations, obtains encrypted result f.Finally, above-mentioned executing subject can by encrypted result e and plus
Close result f combines and carries out computations, obtains encrypted result of the encrypted result g as the corresponding block of target transaction cluster.
It should be noted that due to being directed to the transaction without dependence in step 202 knot can be encrypted with parallel computation
Fruit, so, the encrypted result of the transaction in the transaction cluster of the disclosure is not sequentially (according to affiliated transaction cluster in target transaction cluster
Putting in order in sequence) completion is calculated, in turn, it is understood that there may be the encrypted result of the transaction in the posterior transaction cluster of sequence is excellent
First calculate the case where completing.Therefore, above-mentioned executing subject can carry out the transaction cluster in target transaction cluster sequence continuing detection,
Detect that the encrypted result of included each transaction calculates the transaction cluster (i.e. target transaction cluster) of completion every time, it can base
The encrypted result of the transaction included by the transaction cluster generates the encrypted result of the corresponding block of transaction cluster.
Step 204, for determining the target transaction cluster of the encrypted result of corresponding block, in response to the target transaction cluster
The encrypted result of the preposition block of corresponding block has determined completion, the encryption knot based on the corresponding block of target transaction cluster
The encrypted result of fruit and preposition block generates the corresponding block of target transaction cluster.
In the present embodiment, for determining the target transaction cluster of the encrypted result of corresponding block based on step 203, on
Completion, base can be had determined in response to the encrypted result of the preposition block of the corresponding block of target transaction cluster by stating executing subject
In the encrypted result of the corresponding block of target transaction cluster and the encrypted result of preposition block, it is corresponding to generate the target transaction cluster
Block.Wherein, preposition block be arranged in target block chain before the corresponding block of target transaction cluster and with the target
The adjacent block of the corresponding block of transaction cluster cluster.Target block chain is the block chain for adding block generated.
Specifically, above-mentioned executing subject can encrypted result based on the corresponding block of target transaction cluster and preposition block
Encrypted result generates the block head of the corresponding block of target transaction cluster, based on the transaction in target transaction cluster, generates target transaction
The block body of the corresponding block of cluster, and then generate the block including block head and block body generated.
It is appreciated that can be with parallel computation encrypted result, institute due to being directed to the transaction without dependence in step 202
It is not sequentially to obtain, and then the encrypted result of the corresponding block of target transaction cluster is not yet with, the target transaction cluster of the disclosure
It is sequentially determining completion, accordingly, it is possible to which the encrypted result that there is the corresponding block of posterior transaction cluster that sorts preferentially has determined
At the case where.In turn, during the encrypted result based on block generates block, above-mentioned execution is main to be needed to determine block first
The encrypted result of preposition block whether determine completion, can be direct if the encrypted result of preposition block has determined completion
The encrypted result of encrypted result and preposition block based on block generates block.
In some optional implementations of the present embodiment, the target of the encrypted result for determining corresponding block
Transaction cluster, the encrypted result that above-mentioned executing subject may also respond to the preposition block of the corresponding block of target transaction cluster be not true
It is fixed to complete, after the completion of the encrypted result of the preposition block of the corresponding block of target transaction cluster determines, it is based on the target transaction
The encrypted result of the preposition block of the encrypted result of the corresponding block of cluster block corresponding with the target transaction cluster, generates the target
The corresponding block of transaction cluster.
This implementation can have determined completion, but preposition block in the encrypted result of the corresponding block of target transaction cluster
Encrypted result do not determine complete in the case where, wait the determination of the encrypted result of preposition block, in turn, preposition block plus
After the completion of close result determines, the encrypted result of encrypted result and preposition block based on the corresponding block of target transaction cluster is generated
The corresponding block of target transaction cluster.With this, it can ensure while improving the formation efficiency of block and be directed to block generated
Father-son information record.It should be noted that, for two blocks being connected, preceding block is father in block chain
Block, posterior block are sub-block, and sub-block can recorde the information of father's block, and with this, the connection that can recorde block is suitable
Sequence helps that block is prevented to be tampered.
It is understood that sorting for target transaction cluster sequence in the primary transaction of target transaction cluster sequence
The preposition block of the corresponding block of cluster be currently located at the end of target block chain block (it is i.e. on target block chain, can
The block being connect with newly-generated block), and for other transaction clusters in target transaction cluster sequence (except sequence is primary
Transaction cluster other than transaction cluster), the preposition block of the corresponding block of transaction cluster can be to arrange in target transaction cluster sequence
The corresponding block of transaction cluster before the transaction cluster.
As an example, target transaction cluster sequence is " transaction cluster A;Trade cluster B ", then the preposition of the corresponding block of cluster A of trading
Block is the block for being currently located at the end of target block chain;The preposition block of the corresponding block of transaction cluster B is that transaction cluster A is corresponding
Block.
In some optional implementations of the present embodiment, after generating block, above-mentioned executing subject can be according to institute
Transaction cluster putting in order in target transaction cluster sequence, is added to target for block generated corresponding to the block of generation
In block chain.
As an example, target transaction cluster sequence is " transaction cluster A;Trade cluster B ", and transaction cluster A corresponds to block A generated;
Transaction cluster B corresponds to block B generated.Original target block chain can be " block 1- block 2 ".Then according to the row of transaction cluster
Column sequence, the target block chain for being added to block generated can be " block 1- block 2- block A- block B ".
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for generating information of the present embodiment
Figure.In the application scenarios of Fig. 3, the target transaction cluster sequence 302 available first of electronic equipment 301, wherein target transaction cluster
It include transaction cluster 3021 and 3022 in sequence 302, transaction cluster 3021 is arranged in front of transaction cluster 3022, cluster 3021 and 3022 of trading
It is respectively used to generate different blocks.
Then, electronic equipment 301 can be for transaction (i.e. the transaction cluster 3021 and transaction in target transaction cluster sequence 302
Transaction in cluster 3022), it executes step identified below: determining in target transaction cluster sequence 302 whether include the preposition of the transaction
Transaction is relied on, in response to not including that preposition dependence is traded, determines the cryptographic Hash of the transaction.
Then, electronic equipment 301 can be in response to obtaining target transaction cluster 303, based on the transaction in target transaction cluster 303
Cryptographic Hash determine the cryptographic Hash 304 of the corresponding block of target transaction cluster 303, wherein target transaction cluster 303 is to have confirmed
The transaction cluster 3021 of the cryptographic Hash of included transaction.In turn, for target transaction cluster 303, electronic equipment 301 can be in response to
The cryptographic Hash of the preposition block (being currently located at the block at the end of target block chain) of the corresponding block of target transaction cluster 303
Have determined completion, the cryptographic Hash of cryptographic Hash 304 and preposition block based on the corresponding block of target transaction cluster 303 generates
The corresponding block 305 of target transaction cluster 303.
At the same time, electronic equipment 301 may also respond to obtain target transaction cluster 306, based in target transaction cluster 306
The cryptographic Hash of transaction determine the cryptographic Hash 307 of the corresponding block of target transaction cluster 306, wherein target transaction cluster 306 is
Determine the transaction cluster 3022 of the cryptographic Hash of included transaction.In turn, for target transaction cluster 306, electronic equipment 301 can be with
In response to the corresponding block of target transaction cluster 306 preposition block (i.e. transaction the corresponding block of cluster 3021) cryptographic Hash
It determines and completes, the cryptographic Hash of cryptographic Hash 307 and preposition block based on the corresponding block of target transaction cluster 306 generates the mesh
The mark transaction corresponding block 308 of cluster 306.
The method provided by the above embodiment of the disclosure can be during block generates, in target transaction cluster sequence
The encrypted result of transaction (i.e. there is no the preposition transaction for relying on transaction) without dependence carries out parallel computation, compared to
In the prior art for the serial computing mode for the transaction for belonging to different blocks, the efficiency of block generation, Jin Eryou can be improved
Help be promoted the overall performance of block chain.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for generating information.The use
In the process 400 for the method for generating information, comprising the following steps:
Step 401, target transaction cluster sequence is obtained.
In the present embodiment, for generate the method for information executing subject (such as electronic equipment shown in FIG. 1 101,
102,103) target transaction cluster sequence can be obtained by wired connection mode or radio connection.Wherein, target transaction
Cluster sequence is to handle it, to generate the transaction cluster sequence of block.Target transaction cluster sequence may include at least two
Transaction cluster.Each transaction cluster is for generating a block.Transaction cluster may include destination number transaction.Destination number can be
The predetermined quantity of technical staff, or determined based on predetermined block capacity and the data volume of each transaction
Quantity out.Transaction cluster in target transaction cluster sequence is arranged according to target sequences.
Step 402, it for the transaction in target transaction cluster sequence, executes step identified below: determining target transaction cluster sequence
Whether the preposition dependence including the transaction is traded in column;In response to not including preposition dependence transaction, the encryption knot of the transaction is determined
Fruit;In response to including that preposition dependence is traded, determine whether the encrypted result of the preposition dependence transaction of the transaction has determined completion;
Completion is had determined in response to the encrypted result of the preposition dependence transaction of the transaction, determines the encrypted result of the transaction.
In the present embodiment, for the transaction in target transaction cluster sequence obtained in step 401, above-mentioned executing subject can
To execute above-mentioned determining step.Wherein, the preposition affiliated transaction cluster of transaction that relies on is arranged in front of transaction cluster belonging to the transaction,
Also, preposition dependence transaction has dependence with the transaction.Specifically, the preposition dependence for relying on transaction and the transaction refers to
Be the transaction execution, dependent on it is preposition rely on transaction execution.
It is appreciated that herein, above-mentioned executing subject can trade to preposition dependence is not present in target transaction cluster sequence
Transaction encrypted result carry out parallel computation, and for there are it is preposition rely on transaction transaction, can trade in preposition dependence
Encrypted result determine complete in the case where, the encrypted result of the transaction is calculated, with this, can be improved and carry out encryption knot
The validity for the transaction that fruit calculates, and then help to improve the validity of block generated.
In some optional implementations of the present embodiment, for the transaction in target transaction cluster sequence, above-mentioned execution
The encrypted result that main body can trade in response to the preposition dependence of the transaction, which does not determine, to be completed, and the preposition dependence for the transaction is handed over
Easily, above-mentioned determining step is executed.
It is appreciated that this implementation can be in the preposition dependence of the transaction for the transaction in target transaction cluster sequence
The encrypted result of transaction do not determine complete in the case where, first based on above-mentioned determining step to it is preposition rely on transaction encrypted result into
Row determines, then determines the encrypted result of the transaction again.
Step 403, in response to obtaining target transaction cluster, target is determined based on the encrypted result of the transaction in target transaction cluster
The encrypted result of the corresponding block of transaction cluster.
In the present embodiment, above-mentioned executing subject can be in response to obtaining target transaction cluster, based in target transaction cluster
The encrypted result of transaction determines the encrypted result of the corresponding block of target transaction cluster.Wherein, target transaction cluster is to have confirmed
The transaction cluster of the encrypted result of included each transaction.The corresponding block of target transaction cluster is can give birth to using target transaction cluster
At block.
Step 404, for determining the target transaction cluster of the encrypted result of corresponding block, in response to the target transaction cluster
The encrypted result of the preposition block of corresponding block has determined completion, the encryption knot based on the corresponding block of target transaction cluster
The encrypted result of fruit and preposition block generates the corresponding block of target transaction cluster.
In the present embodiment, for determining the target transaction cluster of the encrypted result of corresponding block based on step 403, on
Completion, base can be had determined in response to the encrypted result of the preposition block of the corresponding block of target transaction cluster by stating executing subject
In the encrypted result of the corresponding block of target transaction cluster and the encrypted result of preposition block, it is corresponding to generate the target transaction cluster
Block.Wherein, preposition block be arranged in target block chain before the corresponding block of target transaction cluster and with the target
The adjacent block of the corresponding block of transaction cluster cluster.Target block chain is the block chain for adding block generated.
Above-mentioned steps 401, step 403, step 404 can be respectively adopted and step 201, the step in previous embodiment
203 modes similar with step 204 execute, and the description above with respect to step 201, step 203 and step 204 is also applied for step
401, step 403 and step 404, details are not described herein again.
Figure 4, it is seen that the method for generating information compared with the corresponding embodiment of Fig. 2, in the present embodiment
Process 400 highlight for the transaction in target transaction cluster sequence, it is preposition including the transaction in target transaction cluster sequence
In the case where relying on transaction, it is first determined whether the encrypted result of the preposition dependence transaction of the transaction has determined completion, in turn
The step of encrypted result that preposition dependence in response to the transaction is traded has determined completion, determines the encrypted result of the transaction.
The scheme of the present embodiment description can not have the encrypted result of the transaction of dependence in target transaction cluster sequence as a result,
While carrying out parallel computation, carrying out serial computing to the encrypted result of the transaction with dependence can improved with this
While the computational efficiency of the encrypted result of block, the accuracy of the encrypted result of block is improved, is helped to improve generated
The validity of block.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides one kind for generating letter
One embodiment of the device of breath, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer
For in various electronic equipments.
As shown in figure 5, the device 500 for generating information of the present embodiment includes: that acquiring unit 501, first determines list
First 502, second determination unit 503 and the first generation unit 504.Wherein, acquiring unit 501 is configured to obtain target transaction cluster
Sequence, wherein the transaction cluster in target transaction cluster sequence is arranged according to target sequences, and transaction cluster is for generating block;First really
Order member 502 is configured to execute step identified below for the transaction in target transaction cluster sequence: determining target transaction cluster sequence
Whether the preposition dependence including the transaction is traded in column, in response to not including that preposition dependence is traded, determines the encryption knot of the transaction
Fruit;Second determination unit 503 is configured in response to obtain target transaction cluster, the encryption knot based on the transaction in target transaction cluster
Fruit determines the encrypted result of the corresponding block of target transaction cluster, wherein target transaction cluster is to have confirmed included transaction
Encrypted result transaction cluster;First generation unit 504 is configured to the mesh for determining the encrypted result of corresponding block
Mark transaction cluster, has determined completion in response to the encrypted result of the preposition block of the corresponding block of target transaction cluster, and being based on should
The encrypted result of the corresponding block of target transaction cluster and the encrypted result of preposition block generate the corresponding area of target transaction cluster
Block.
In the present embodiment, for generate information device 500 acquiring unit 501 can by wired connection mode or
Person's radio connection obtains target transaction cluster sequence.Wherein, target transaction cluster sequence is to handle it, with generation area
The transaction cluster sequence of block.Target transaction cluster sequence may include at least two transaction clusters.Each transaction cluster is for generating an area
Block.Transaction cluster may include destination number transaction.Destination number can be the predetermined quantity of technical staff, or
Data volume based on predetermined block capacity and each transaction and the quantity determined.Transaction in target transaction cluster sequence
Cluster is arranged according to target sequences.
In the present embodiment, list is determined for the transaction in target transaction cluster sequence obtained in acquiring unit 501, first
Member 502 can execute step identified below: determine that whether the preposition dependence including the transaction is traded in target transaction cluster sequence, is rung
Ying Yu does not include preposition dependence transaction, determines the encrypted result of the transaction.Wherein, preposition to rely on transaction cluster arrangement belonging to transaction
Before the transaction cluster belonging to the transaction, also, preposition dependence transaction has dependence with the transaction.Specifically, it is preposition according to
The dependence of transaction and the transaction is relied to refer to the execution of the transaction, dependent on the preposition execution for relying on transaction.
In the present embodiment, the second determination unit 503 can be in response to obtaining target transaction cluster, based in target transaction cluster
The encrypted result of transaction determine the encrypted result of the corresponding block of target transaction cluster.Wherein, target transaction cluster is to have determined
The transaction cluster of the encrypted result of included each transaction out.The corresponding block of target transaction cluster is utilizes target transaction cluster institute energy
The block of generation.
In the present embodiment, for determining the target of the encrypted result of corresponding block based on the second determination unit 503
Trade cluster, the first generation unit 504 can in response to the preposition block of the corresponding block of target transaction cluster encrypted result
It is completed through determining, the encrypted result of encrypted result and preposition block based on the corresponding block of target transaction cluster generates the mesh
The corresponding block of mark transaction cluster.Wherein, preposition block is that the corresponding block of target transaction cluster is arranged in target block chain
Before and the adjacent block of block corresponding with the target transaction cluster cluster.Target block chain is for adding block generated
Block chain.
In some optional implementations of the present embodiment, the first determination unit 502 can be further configured to: be rung
It should trade in determining the preposition dependence in target transaction cluster sequence including the transaction, determine adding for the preposition dependence transaction of the transaction
Whether close result has determined completion;Completion is had determined in response to the encrypted result of the preposition dependence transaction of the transaction, is determined
The encrypted result of the transaction.
In some optional implementations of the present embodiment, device 500 can also include: third determination unit (in figure
It is not shown), the encrypted result for being configured in response to the preposition dependence transaction of the transaction, which does not determine, to be completed, before the transaction
Dependence transaction is set, executes and determines step.
In some optional implementations of the present embodiment, device 500 can also include: the second generation unit (in figure
It is not shown), the encrypted result for being configured in response to the preposition block of the corresponding block of target transaction cluster, which does not determine, to be completed, In
After the completion of the encrypted result of the preposition block of the corresponding block of target transaction cluster determines, it is based on the corresponding area of target transaction cluster
It is corresponding to generate the target transaction cluster for the encrypted result of the preposition block of the encrypted result of block block corresponding with the target transaction cluster
Block.
In some optional implementations of the present embodiment, encrypted result is cryptographic Hash.
In some optional implementations of the present embodiment, the first generation unit 504 is further configured to: being based on should
The encrypted result of the corresponding block of target transaction cluster and the encrypted result of preposition block generate the corresponding block of target transaction cluster
Block head;Based on the encrypted result of the transaction in the target transaction cluster, the block of the corresponding block of target transaction cluster is generated
Body;Block including block head generated and block body is determined as the corresponding block of target transaction cluster.
In some optional implementations of the present embodiment, device 600 can also include: that adding unit (is not shown in figure
Out), it is configured to give birth to according to cluster putting in order in target transaction cluster sequence of trading corresponding to block generated
At block be added in target block chain.
It is understood that each step in the method that all units recorded in the device 500 and Fig. 2 or Fig. 4 are described
It is corresponding.As a result, above with respect to the operation of method description, the beneficial effect of feature and generation be equally applicable to device 500 and
Unit wherein included, details are not described herein.
The device provided by the above embodiment 500 of the disclosure can be during block generates, to target transaction cluster sequence
The encrypted result of transaction (i.e. there is no the preposition transaction for relying on transaction) in column without dependence carries out parallel computation, phase
Compared with the serial computing mode for belonging to the transaction of different blocks is directed in the prior art, the efficiency of block generation can be improved, into
And help to be promoted the overall performance of block chain.
Below with reference to Fig. 6, it illustrates the electronic equipment (electricity of example as shown in figure 1 for being suitable for being used to realize the embodiment of the present disclosure
The structural schematic diagram of sub- equipment 101,102,103) 600.Electronic equipment in the embodiment of the present disclosure can include but is not limited to all
As mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP are (portable
Formula multimedia player), the mobile electronic device and such as number TV, platform of car-mounted terminal (such as vehicle mounted guidance terminal) etc.
The stationary electronic devices of formula computer etc..Electronic equipment shown in Fig. 6 is only an example, should not be to the embodiment of the present disclosure
Function and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.)
601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608
Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment
Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM 603 pass through the phase each other of bus 604
Even.Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device
609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool
There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608
It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that computer-readable medium described in the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more
When a program is executed by the electronic equipment, so that the electronic equipment: obtaining target transaction cluster sequence, wherein target transaction cluster sequence
Transaction cluster in column is arranged according to target sequences, and transaction cluster is for generating block;For the transaction in target transaction cluster sequence, hold
Row step identified below: determine whether the preposition dependence including the transaction is traded in target transaction cluster sequence, in response to not including
Preposition dependence transaction, determines the encrypted result of the transaction;In response to obtaining target transaction cluster, based on the transaction in target transaction cluster
Encrypted result determine the encrypted result of the corresponding block of target transaction cluster, wherein target transaction cluster is wrapped to have confirmed
The transaction cluster of the encrypted result of the transaction included;For determining the target transaction cluster of the encrypted result of corresponding block, in response to
The encrypted result of the preposition block of the corresponding block of target transaction cluster has determined completion, corresponding based on the target transaction cluster
The encrypted result of the encrypted result of block and preposition block generates the corresponding block of target transaction cluster.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, described program design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, obtaining
Unit is taken to be also described as " obtaining the unit of target transaction cluster sequence ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.