Summary of the invention
In view of the part drawbacks described above of the prior art, technical problem to be solved by the invention is to provide a kind of parallel chains
The account book bookkeeping methods for the block chain network periodically converged, it is intended to construct a plurality of parallel chain, block in a block chain network
Chain project can be added to this block chain network as a parallel chain, reduce the hardware cost at block chain project build initial stage,
Meanwhile periodically intersect to form by a plurality of block chain and converging block, improve the offensive and defensive energy of calculation power of whole block chain network
Power enhances parallel chain confidence level.
To achieve the above object, the present invention provides a kind of account book book keeping operation side of block chain network that parallel chain periodically converges
Method, the block chain network include at least two parallel chains, exist between the parallel chain and converge block, the block that converges is
Coincidence block between the parallel chain, the business block converged between block including each parallel chain;The side
Method includes business billing step and converges step;The business billing step is for each parallel chain to respective business number
According to progress block chain book keeping operation, and generate the business block;It is described to converge step and described converge block for generating;It is described to converge
Step includes:
Current block number in response to each parallel chain is to converge block number, stops the business book keeping operation of the parallel chain
Step;
Obtain the respective upper block cryptographic Hash of each parallel chain;The upper block cryptographic Hash is each described flat
The block cryptographic Hash of the respective upper block of row chain;
According to each upper block cryptographic Hash and it is default converge block create-rule, generate and newly-increased converge block;
By it is described it is newly-increased converge block and increase on each parallel chain on this node, and newly-increased converge area for described
Block is sent to the block chain network so that other nodes are known together.
In a specific embodiment, the method also includes:
It receives described increase newly that other nodes are sent and converges block, by the newly-increased institute for converging block and increasing to this node
On the parallel chain having.
In a specific embodiment, the method also includes:
At least two described increase newly obtained from other nodes are received in response to this node and converge block, obtain each institute
It states to increase newly and converges the quantity that block is known together by other nodes respectively;
The most newly-increased block that converges of the quantity known together by other nodes is increased into each described flat of this node
On row chain.
In a specific embodiment, described according to each upper block cryptographic Hash and the default block that converges generates
Rule generates to increase newly and converges block, comprising:
According to each upper block cryptographic Hash, generates first and converge root cryptographic Hash;
Converge root cryptographic Hash, random number according to described first, generation converges block cryptographic Hash;Wherein, described to converge block
Cryptographic Hash changes with the adjustment of the random number;
It determines and converges the random number that block cryptographic Hash meets preset condition described in making, obtain described increase newly and converge area
Block.
In a specific embodiment, described to converge root cryptographic Hash, random number according to described first, generation converges block Kazakhstan
Uncommon value, further includes:
According to described first converge root cryptographic Hash, random number, timestamp, it is described converge block number, difficulty value, generation converges
Block cryptographic Hash;The difficulty value is used to adjust the difficulty for determining the random number.
In a specific embodiment, the business block for converging each parallel chain between block is mutually only
It is vertical.
In a specific embodiment, the business billing step, comprising:
At least one for obtaining the current each parallel chain of the block chain network waits for book keeping operation task;Wherein, each
The task to be kept accounts includes relevant at least one business datum of the corresponding parallel chain;
According to the task to be kept accounts, the to match with the task to be kept accounts is obtained in all parallel chains
The current upper block cryptographic Hash of one parallel chain;
According to task, the current upper block cryptographic Hash and the default block create-rule to be kept accounts, generate new
Increasing business block;
The Added Business block is increased on first parallel chain on this node, and by the Added Business area
Block is sent to the block chain network so that other nodes are known together.
In a specific embodiment, in the business billing step, further includes:
It is known together in response to the Added Business block, receives account book management node and/or the block chain network is sent
First excitation.
In a specific embodiment, the numerical value of the first excitation of each parallel chain is by each account book management section
The operator of point or the block chain network is default.
It is in a specific embodiment, described to converge step, further includes:
It executes excitation and adjusts intelligent contract;The excitation adjust intelligent contract be used for each parallel chain described the
The numerical value of one excitation is adjusted.
In second aspect of the present invention, a kind of account book accounting system of block chain network that parallel chain periodically converges, institute are provided
It states block chain network and includes at least two parallel chains, exist between the parallel chain and converge block, the block that converges is described
Coincidence block between parallel chain, the business block converged between block including each parallel chain;The system packet
It includes business billing step execution module and converges step execution module;The business billing step execution module is used for each institute
It states parallel chain and the book keeping operation of block chain is carried out to respective business datum, and generate the business block;The step of converging executes mould
Block described converges block for generating;
The step execution module of converging includes:
Converge start unit, is to converge block number for the current block number in response to each parallel chain, stops institute
State the business billing step of parallel chain;
A block Hash acquiring unit on first, for obtaining the respective upper block cryptographic Hash of each parallel chain;
The upper block cryptographic Hash is the block cryptographic Hash of each respective upper block of parallel chain;
It is newly-increased to converge block generation unit, for being given birth to according to each upper block cryptographic Hash and the default block that converges
At rule, generates to increase newly and converge block;
It is newly-increased to converge block release unit, for the newly-increased block that converges to be increased to each described flat on this node
On row chain, and newly-increased converge block by described and be sent to the block chain network so that other nodes are known together.
It is in a specific embodiment, described to converge step execution module, further includes:
It is newly-increased to converge block reception unit, converge block for receiving described increase newly that other nodes are sent, it will be described new
Increasing converges block and increases on all parallel chains of this node.
It is in a specific embodiment, described to converge step execution module, further includes:
Consensus information acquiring unit is described new for receiving obtain from other nodes at least two in response to this node
Increasing converges block, obtains each described increase newly and converges the quantity that block is known together by other nodes respectively;
Common recognition confirmation converges unit, for increasing the most newly-increased block that converges of the quantity known together by other nodes
To each parallel chain of this node.
In a specific embodiment, described increase newly converges block generation unit, is configured as:
According to each upper block cryptographic Hash, generates first and converge root cryptographic Hash;
Converge root cryptographic Hash, random number according to described first, generation converges block cryptographic Hash;Wherein, described to converge block
Cryptographic Hash changes with the adjustment of the random number;
It determines and converges the random number that block cryptographic Hash meets preset condition described in making, obtain described increase newly and converge area
Block.
In a specific embodiment, described increase newly converges block generation unit, is also used to converge root according to described first
Cryptographic Hash, random number, timestamp, it is described converge block number, difficulty value, generation converges block cryptographic Hash;The difficulty value is used for
Adjustment determines the difficulty of the random number.
In a specific embodiment, the business block for converging each parallel chain between block is mutually only
It is vertical.
In a specific embodiment, the business billing step execution module, comprising:
Book keeping operation task acquiring unit, for obtain the current each parallel chain of the block chain network at least one
Task to be kept accounts;Wherein, each task to be kept accounts includes relevant at least one business of the corresponding parallel chain
Data;
A block Hash acquiring unit on second, for the task to be kept accounts according to, in all parallel chains
Obtain the current upper block cryptographic Hash of the first parallel chain to match with the task to be kept accounts;
Added Business block generation unit, for according to the task to be kept accounts, the current upper block cryptographic Hash with
And default block create-rule, generate Added Business block;
Added Business block release unit, for the Added Business block to be increased to described first flat on this node
On row chain, and the Added Business block is sent to the block chain network so that other nodes are known together.
In a specific embodiment, the business billing step execution module, further includes:
First excitation receiving unit, for being known together in response to the Added Business block, receive account book management node and/
Or the first excitation that the block chain network is sent.
In a specific embodiment, the numerical value of the first excitation of each parallel chain is by each account book management section
The operator of point or the block chain network is default.
It is in a specific embodiment, described to converge step execution module, further includes:
Excitation adjustment execution unit adjusts intelligent contract for executing excitation;The excitation adjust intelligent contract for pair
The numerical value of first excitation of each parallel chain is adjusted.
The beneficial effects of the present invention are: including a plurality of parallel chain, single block chain item in block chain network in the present invention
Mesh can be added to this block chain network as a parallel chain and construct block chain network without independent, reduce block chain project
The hardware cost at building initial stage, meanwhile, periodically a plurality of block chain intersect to form and converge block, improves whole block link network
The offensive and defensive ability of calculation power of network enhances parallel chain confidence level.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples:
As shown in Figs 1-4, in the first embodiment of the invention, a kind of block chain network that parallel chain periodically converges is provided
Account book bookkeeping methods, the block chain network includes at least two parallel chains, exists between the parallel chain and converge block, described
Converge coincidence block of the block between the parallel chain, the service area converged between block including each parallel chain
Block;The method includes business billing step and converge step;The business billing step is for each parallel chain to each
From business datum carry out the book keeping operation of block chain, and generate the business block;It is described to converge step and described converge area for generating
Block;The step of converging includes:
Current block number in response to each parallel chain is to converge block number, stops the business book keeping operation of the parallel chain
Step;
Obtain the respective upper block cryptographic Hash of each parallel chain;The upper block cryptographic Hash is each described flat
The block cryptographic Hash of the respective upper block of row chain;
According to each upper block cryptographic Hash and it is default converge block create-rule, generate and newly-increased converge block;
By it is described it is newly-increased converge block and increase on each parallel chain on this node, and newly-increased converge area for described
Block is sent to the block chain network so that other nodes are known together.
This block chain network provides calculations a power shared platform, in the operational process of this block chain network, mainly including industry
Business and converges step at billing step, corresponding, and the block of this block chain includes the business book keeping operation area being independent of each other and converges
Block.
In business billing step, different block chain operators or different block chain business modules are with the mode of parallel chain
The calculation power for sharing this block chain network, the calculation power for obtaining the absence from work without reason of this block chain network are supported.On the one hand absence from work without reason can be in local area
Suan Li party in request is obtained in block chain network, and is serviced for it to obtain income, and another aspect block Lian Suan power party in request is not necessarily to
The absence from work without reason for establishing the block chain network of itself and increasing the initial construction cost of block chain network, and relying on platform meets itself calculation
Power demand;Independence between business billing step, different blocks chain is stronger, and crosstalk does not occur for data.
Converging step, all parallel chains merge into same block, at this point, the block before converging block is calculated
Power aid, the data that raising converges the block before block can not tamper, raising Information Security and confidence level.It is worth mentioning
, during business billing step, the calculation power of actually each parallel chain be by each parallel chain to divide equally, integral net
Network is calculated power and is weakened, and by converging block, enhance whole power of calculating and maintains ability.
As shown in figure 4, it includes 4 parallel chains between block 300 that two, which are converged, there is business book keeping operation block on parallel chain
400;It is noted that block number can be indicated with the block number of each parallel chain for converging block 300.
By converging block 300, effectively enhance the calculation power defence capability of business block, reduces the risk that business datum is tampered.
In the present embodiment, the method also includes:
It receives described increase newly that other nodes are sent and converges block, by the newly-increased institute for converging block and increasing to this node
On the parallel chain having.
It is further alternative, the method also includes:
At least two described increase newly obtained from other nodes are received in response to this node and converge block, obtain each institute
It states to increase newly and converges the quantity that block is known together by other nodes respectively;
The most newly-increased block that converges of the quantity known together by other nodes is increased into each described flat of this node
On row chain.
In the present embodiment, it is described according to each upper block cryptographic Hash and it is default converge block create-rule,
It generates to increase newly and converges block, comprising:
According to each upper block cryptographic Hash, generates first and converge root cryptographic Hash;
Converge root cryptographic Hash, random number according to described first, generation converges block cryptographic Hash;Wherein, described to converge block
Cryptographic Hash changes with the adjustment of the random number;
It determines and converges the random number that block cryptographic Hash meets preset condition described in making, obtain described increase newly and converge area
Block.
Further alternative, described to converge root cryptographic Hash, random number according to described first, generation converges block cryptographic Hash,
Further include:
According to described first converge root cryptographic Hash, random number, timestamp, it is described converge block number, difficulty value, generation converges
Block cryptographic Hash;The difficulty value is used to adjust the difficulty for determining the random number.
In the present embodiment, the business block for converging each parallel chain between block is mutually indepedent.
In the present embodiment, the business billing step, comprising:
At least one for obtaining the current each parallel chain of the block chain network waits for book keeping operation task;Wherein, each
The task to be kept accounts includes relevant at least one business datum of the corresponding parallel chain;
According to the task to be kept accounts, the to match with the task to be kept accounts is obtained in all parallel chains
The current upper block cryptographic Hash of one parallel chain;
According to task, the current upper block cryptographic Hash and the default block create-rule to be kept accounts, generate new
Increasing business block;
The Added Business block is increased on first parallel chain on this node, and by the Added Business area
Block is sent to the block chain network so that other nodes are known together.
Furthermore, in the business billing step, further includes:
It is known together in response to the Added Business block, receives account book management node and/or the block chain network is sent
First excitation.
Furthermore, the numerical value of the first excitation of each parallel chain is by each account book management node or described
The operator of block chain network is default.
For intuitive, absence from work without reason can be according to the stimulation level of each parallel chain, to select the parallel chain to be serviced.
It is noted that the node of this block chain network can root when block chain network is when the task of keeping accounts is more
The task to be kept accounts needed to be implemented is selected according to book keeping operation income;At this point, more absences from work without reason can be attracted since number of services is more
This block chain network is participated in, and can also attract more operators to move into as the scale of this block chain network the big;Meanwhile when
When the task of keeping accounts is less, the node of this block chain network can be also lost, so that the number of nodes of this block chain network and business number
Maintain an equal level.Block chain network realization business datum is in harmony certainly with the scale of absence from work without reason, and according to market, absence from work without reason selection to be serviced parallel
Chain.
It is furthermore, described to converge step, further includes:
It executes excitation and adjusts intelligent contract;The excitation adjust intelligent contract be used for each parallel chain described the
The numerical value of one excitation is adjusted.
Optionally, converge in step described, further includes:
In response to it is described it is newly-increased converge block and known together, receive the second excitation that the block chain network is sent.
In practical application scene, since the rule of the selection book keeping operation of network or account book management node is different, this is caused
Node is different in the success rate that different parallel chains are kept accounts, preferential to select in order to improve the book keeping operation success rate, efficiency or income of this node
It selects the higher parallel chain of book keeping operation success rate and executes task to be kept accounts.
Optionally, the business billing step, further includes:
This node is obtained for the history book keeping operation success rate of each parallel chain;
According to history book keeping operation success rate, book keeping operation priority level sequence is carried out to each parallel chain;Wherein, described
History is kept accounts, and success rate is higher, then the book keeping operation priority level is also higher.
Typically, the common recognition of Added Business block can be known together by the node of this block chain network;Such as bit coin network,
All node statuses are identical, shared common recognition task;Optionally, this block chain network also provides a kind of common recognition mode, that is, has
Manager's node of first parallel chain is known together, and each node of this block chain network only provides and calculates power;Above-mentioned side
Case is beneficial in that, in this way, is beneficial to enhance the independence of the first parallel chain manager, so as to according to itself
Demand is enjoyed from this block chain network calculates power service, and then account book pipe is arranged in manager in this block chain network if necessary
Node is managed, to be supported to its business.Certainly, the account book common recognition of parallel chain can also give the section in this block chain network
Point carries out, this block chain network carries out pipe of boarding at the nursery to its business datum.
In a typical case of the invention, block chain network includes that book keeping operation task provides node, book keeping operation task execution
Node, wherein book keeping operation task provides node and respectively includes a block chain project and safeguard a set of account book and correspond to one in parallel
Chain, task execution node of keeping accounts provide calculation power for block chain network, change for a word, and book keeping operation task execution node is each area
Block chain project, which provides, calculates power.
As shown in Figs 1-4, a kind of account of block chain network that parallel chain periodically converges is provided in the second aspect of the present invention
This accounting system, the block chain network include at least two parallel chains, exist between the parallel chain and converge block, the remittance
Close coincidence block of the block between the parallel chain, the service area converged between block including each parallel chain
Block;The system comprises business billing step execution module 200 and converge step execution module 100;The business billing step
Execution module 200 carries out the book keeping operation of block chain to respective business datum for each parallel chain, and generates the service area
Block;It is described to converge step execution module 100, described converge block for generating;
The step execution module 100 of converging includes:
Converge start unit 101, is to converge block number for the current block number in response to each parallel chain, stops
The business billing step of the parallel chain;
A block Hash acquiring unit 102 on first, for obtaining the respective upper block Hash of each parallel chain
Value;The upper block cryptographic Hash is the block cryptographic Hash of each respective upper block of parallel chain;
It is newly-increased to converge block generation unit 103, for according to each upper block cryptographic Hash and presetting and converging area
Block create-rule generates to increase newly and converges block;
It is newly-increased to converge block release unit 104, for increasing each institute for converging block and increasing on this node newly for described
It states on parallel chain, and newly-increased converge block by described and be sent to the block chain network so that other nodes are known together.
This block chain network provides calculations a power shared platform, in the operational process of this block chain network, mainly including industry
Business and converges step at billing step, corresponding, and the block of this block chain includes the business book keeping operation area being independent of each other and converges
Block.
In business billing step, different block chain operators or different block chain business modules are with the mode of parallel chain
The calculation power for sharing this block chain network, the calculation power for obtaining the absence from work without reason of this block chain network are supported.On the one hand absence from work without reason can be in local area
Suan Li party in request is obtained in block chain network, and is serviced for it to obtain income, and another aspect block Lian Suan power party in request is not necessarily to
The absence from work without reason for establishing the block chain network of itself and increasing the initial construction cost of block chain network, and relying on platform meets itself calculation
Power demand;Independence between business billing step, different blocks chain is stronger, and crosstalk does not occur for data.
Converging step, all parallel chains merge into same block, at this point, the block before converging block is calculated
Power aid, the data that raising converges the block before block can not tamper, raising Information Security and confidence level.It is worth mentioning
, during business billing step, the calculation power of actually each parallel chain be by each parallel chain to divide equally, integral net
Network is calculated power and is weakened, and by converging block, enhance whole power of calculating and maintains ability.
As shown in figure 4, it includes 4 parallel chains between block 300 that two, which are converged, there is business book keeping operation block on parallel chain
400;It is noted that block number can be indicated with the block number of each parallel chain for converging block 300.
By converging block 300, effectively enhance the calculation power defence capability of business block, reduces the risk that business datum is tampered.
It is in the present embodiment, described to converge step execution module 100, further includes:
It is newly-increased to converge block reception unit 108, converge block for receiving described increase newly that other nodes are sent, it will be described
It is newly-increased to converge block and increase on all parallel chains of this node.
It is further alternative, it is described to converge step execution module 100, further includes:
Consensus information acquiring unit 106, for receiving at least two institutes obtained from other nodes in response to this node
It states to increase newly and converges block, obtain each described increase newly and converge the quantity that block is known together by other nodes respectively;
Common recognition confirmation converges unit 107, for most described increase newly of the quantity known together by other nodes to be converged block
It increases on each parallel chain of this node.
In the present embodiment, described increase newly converges block generation unit 103, is configured as:
According to each upper block cryptographic Hash, generates first and converge root cryptographic Hash;
Converge root cryptographic Hash, random number according to described first, generation converges block cryptographic Hash;Wherein, described to converge block
Cryptographic Hash changes with the adjustment of the random number;
It determines and converges the random number that block cryptographic Hash meets preset condition described in making, obtain described increase newly and converge area
Block.
Further alternative, described increase newly converges block generation unit 103, is also used to converge root Hash according to described first
Value, random number, timestamp, it is described converge block number, difficulty value, generation converges block cryptographic Hash;The difficulty value is for adjusting
Determine the difficulty of the random number.
In the present embodiment, the business block for converging each parallel chain between block is mutually indepedent.
In the present embodiment, the business billing step execution module 200, comprising:
Book keeping operation task acquiring unit 201, for obtaining the current each parallel chain of the block chain network at least
One task to be kept accounts;Wherein, each task to be kept accounts includes the corresponding parallel chain relevant at least one
Business datum;
A block Hash acquiring unit 202 on second, for the task to be kept accounts according to, in all parallel chains
The current upper block cryptographic Hash for the first parallel chain that middle acquisition matches with the task to be kept accounts;
Added Business block generation unit 203, for the task to be kept accounts according to, the current upper block cryptographic Hash
And default block create-rule, generate Added Business block;
Added Business block release unit 204, described for increasing to the Added Business block on this node
On one parallel chain, and the Added Business block is sent to the block chain network so that other nodes are known together.
It is further alternative, the business billing step execution module 200, further includes:
First excitation receiving unit 205 receives account book management node for being known together in response to the Added Business block
And/or the first excitation that the block chain network is sent.
Further alternative, the numerical value of the first excitation of each parallel chain is by each account book management node or institute
The operator for stating block chain network is default.
For intuitive, absence from work without reason can be according to the stimulation level of each parallel chain, to select the parallel chain to be serviced.
It is noted that the node of this block chain network can root when block chain network is when the task of keeping accounts is more
The task to be kept accounts needed to be implemented is selected according to book keeping operation income;At this point, more absences from work without reason can be attracted since number of services is more
This block chain network is participated in, and can also attract more operators to move into as the scale of this block chain network the big;Meanwhile when
When the task of keeping accounts is less, the node of this block chain network can be also lost, so that the number of nodes of this block chain network and business number
Maintain an equal level.Block chain network realization business datum is in harmony certainly with the scale of absence from work without reason, and according to market, absence from work without reason selection to be serviced parallel
Chain.
It is further alternative, it is described to converge step execution module 100, further includes:
Excitation adjustment execution unit 105 adjusts intelligent contract for executing excitation;The excitation adjusts intelligent contract and is used for
The numerical value of first excitation of each parallel chain is adjusted.
Optionally, converge step execution module 100, further includes:
Second excitation receiving unit, in response to it is described it is newly-increased converge block and known together, receive the block chain network
The second excitation sent.
In practical application scene, since the rule of the selection book keeping operation of network or account book management node is different, this is caused
Node is different in the success rate that different parallel chains are kept accounts, preferential to select in order to improve the book keeping operation success rate, efficiency or income of this node
It selects the higher parallel chain of book keeping operation success rate and executes task to be kept accounts.
Optionally, the business billing step execution module 200, further includes:
Book keeping operation success rate acquiring unit, for obtaining this node for the history book keeping operation success rate of each parallel chain;
Book keeping operation priority level initializing unit, for being remembered to each parallel chain according to history book keeping operation success rate
The sequence of account priority level;Wherein, the history book keeping operation success rate is higher, then the book keeping operation priority level is also higher.
Typically, the common recognition of Added Business block can be known together by the node of this block chain network;Such as bit coin network,
All node statuses are identical, shared common recognition task;Optionally, this block chain network also provides a kind of common recognition mode, that is, has
Manager's node of first parallel chain is known together, and each node of this block chain network only provides and calculates power;Above-mentioned side
Case is beneficial in that, in this way, is beneficial to enhance the independence of the first parallel chain manager, so as to according to itself
Demand is enjoyed from this block chain network calculates power service, and then account book pipe is arranged in manager in this block chain network if necessary
Node is managed, to be supported to its business.Certainly, the account book common recognition of parallel chain can also give the section in this block chain network
Point carries out, this block chain network carries out pipe of boarding at the nursery to its business datum.
In a typical case of the invention, block chain network includes that book keeping operation task provides node, book keeping operation task execution
Node, wherein book keeping operation task provides node and respectively includes a block chain project and safeguard a set of account book and correspond to one in parallel
Chain, task execution node of keeping accounts provide calculation power for block chain network, change for a word, and book keeping operation task execution node is each area
Block chain project, which provides, calculates power.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that those skilled in the art without
It needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the art
Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea
Technical solution, all should be within the scope of protection determined by the claims.