Embodiment seven
It, can also be further by institute after target transaction to be identified to corresponding transaction and is hidden based on embodiment six
State target transaction identify corresponding exchange the label of block be determined as specified label.
In the present specification, at least partly block in block chain can have label, exist extremely for marking in the block
A few transaction being concealed.
Specifically, can arranging specified label, there are the transaction that at least one is concealed for characterizing in block.Will be right
The transaction of the mark of target transaction described in Ying Yu is substituted for after the concealmentization data, it can be determined that the target transaction mark pair
The exchange answered the label of block (target block) whether have label, if just referred to without label for target block distribution
Calibration label.If there is label, further determine whether to specify label.If it is specified label, illustrate in the target block
Other than the target transaction identifies corresponding transaction, there is also the sensitive transactions that other have been concealed, then do not need pair
The label of target block is changed;If not specified label, illustrating target block does not include concealmentization data, then need by
The tag modification of target block is specified label.
In this way, it is exactly 0 that the label of the block in block chain, which is not 1,.If the specified label is 1, when block includes hidden
When hideing data, label is 1, and when block does not include concealmentization data, label is 0.If the specified label is 0,
Then when block includes concealmentization data, label is 0, and when block does not include concealmentization data, label is 1.
By the target transaction identify corresponding exchange the label of block be determined as the effect of specified label and be,
Mitigate the computation burden of block chain node or centralization equipment.If specifically, not to the block comprising concealmentization data into
Rower note, then, method as shown in figure 11, when need for target block building Mei Keer tree when, block chain node or in
Whether heart equipment does not include concealmentization data in hard objectives block, then, would have to successively be directed to the target area
Each transaction storage location in block, judge to store in the transaction storage location is transaction or concealmentization data, to adopt
The corresponding transaction Hash of the transaction storage location is obtained with different strategies.When there are many block for needing to construct Mei Keer tree, and
When the sensitive transactions being concealed are seldom, if being carried out method as shown in figure 11 for each block, it can waste very much
Computing resource.
And in embodiment seven, it can be before starting to construct the corresponding Mei Keer tree of either block, first according to the area
The label of block judges whether the block includes concealmentization data, in this way, can be when there is no the sensitivities being concealed in target block
When transaction, using the corresponding Merkel tree of default behavior building target block (rather than using mode shown in Figure 11), save
Computing resource.
Figure 12 is that the process for the method that the transaction for a kind of pair of write-in block chain that this specification embodiment provides is hidden is shown
It is intended to, includes the following steps:
S1200: hide instruction is received.
S1202: according to the hide instruction, concealmentization data are determined.
S1204: the transaction for corresponding to target transaction mark in block chain is substituted for the concealmentization data.
S1206: by the target transaction identify corresponding exchange the label of block be determined as specified label.
Figure 13 is that the process of the method for the corresponding Mei Keer tree of another building block that this specification embodiment provides is shown
It is intended to, includes the following steps:
S1300: for the target block in block chain, the label of the target block is obtained.
S1302: it if the label of the target block refers to calibration label, is deposited for each transaction in the target block
Storage space is set, and reads data from the transaction storage location.
S1304: if it is determined that the data read from the transaction storage location include transaction, then included by the data to reading
Transaction carries out Hash calculation, obtains the corresponding transaction Hash of the transaction storage location.
S1306: if it is determined that the data read from the transaction storage location include concealmentization data, then from the data institute of reading
Including concealment data in extract transaction Hash, as the corresponding transaction Hash of the transaction storage location.
S1308: based on the corresponding transaction Hash of storage location of respectively trading in the target block, the target is constructed
The corresponding Mei Keer tree of block.
Further, for each transaction storage location in the target block, if what the transaction storage location was read
Data do not include the preceding tab character, it is determined that the data read from the transaction storage location include transaction;If from the transaction
The data that storage location is read include the preceding tab character, it is determined that the data read from the transaction storage location include concealment
Change data.
Alternatively, if including that first identifier accords with from the identification field in the data that the transaction storage location is read, it is determined that from
The data that the transaction storage location is read include transaction;If including from the identification field in the data that the transaction storage location is read
Second identifier symbol, it is determined that the data read from the transaction storage location include concealmentization data.
The mode that transaction Hash is extracted in embodiment seven, in concealmentization data included by the data from reading specifically may be used
To be, the data in concealmentization data included by the data by reading after the preceding tab character are determined as transaction and breathe out
It wishes and extracts;Or, being located at the designated length after the preceding tab character in concealmentization data included by data by reading
Data be determined as trading and Hash and extract.
Wherein, the designated length is the regular length of transaction Hash.
In embodiment seven, the preceding tab character can also be located in concealment data included by the data by reading
Data between the rear tab character are determined as transaction Hash and extract.
In embodiment seven, if the label of the target block does not refer to calibration label, using described in default behavior building
The corresponding Mei Keer tree of target block.
In embodiment seven, it is possible to further which a binary string is pre-created, it is assumed that block chain includes N number of block,
The so described at least N number of binary digit of binary string, the value of i-th of binary digit of binary string are the in block chain
The label of i block, i ∈ [1, N].
In this way, obtaining the tagged manner of the target block can be, the serial number M of the target block is determined;From described
The value of m-th binary digit, the label as the target block are read in binary string.
Figure 14 is a kind of flow diagram for simple payment verification method that this specification embodiment provides, including walks as follows
It is rapid:
S1400: checking request is received;The checking request is identified comprising target transaction;
S1402: according to the checking request, determine that the target transaction identifies corresponding transaction in the block chain of itself
The block at place, and the corresponding Mei Keer tree of the block is constructed based on method shown in Figure 11 or Figure 13;
S1404: the Mei Keer tree based on building identifies the corresponding simple payment of transaction progress for the target transaction and tests
Card.
Figure 15 is that the structure for the device that the transaction for a kind of pair of write-in block chain that this specification embodiment provides is hidden is shown
It is intended to, for each transaction storage location in block chain, which is stored with content field and identification field, if
The content field includes transaction, then the identification field is accorded with comprising first identifier, and described device includes:
Receiving module 1501 receives and identifies hide instruction comprising target transaction, and determines and store the target transaction mark
The transaction storage location of corresponding transaction, as target transaction storage location;
Determining module 1502 determines concealmentization data according to the hide instruction;The concealmentization data include the mesh
Mark the transaction Hash of the corresponding transaction of transaction ID;
Transaction in the content field of the target transaction storage location is substituted for the concealmentization by processing module 1503
Data, and, the first identifier symbol in the identification field of the target transaction storage location is substituted for second identifier symbol.
The hide instruction further includes concealment condition, for determining that the target transaction identifies the sensitivity in corresponding transaction
Content;
The determining module 1502 obtains the transaction Hash that the target transaction identifies corresponding transaction, and according to described
The concealment condition that hide instruction includes identifies in corresponding transaction from the target transaction and extracts non-sensitive content;According to described
Transaction Hash and the non-sensitive content determine concealmentization data.
The concealment condition is sensitive position information, identifies corresponding friendship in the target transaction for characterizing sensitive content
The location of in easily.
The determining module 1502, will it is preset after tab character be spliced to it is described transaction Hash tail portion;It will be described non-
Sensitive content is spliced to the tail portion of the rear tab character;By the transaction Hash, it is described after tab character with it is described non-sensitive
The data that content is spliced into are determined as concealmentization data.
The determining module 1502 adjusts model based on preset form of presentation, adjusts the statement of the non-sensitive content
Mode;According to the transaction Hash and the non-sensitive content adjusted, concealmentization data are determined.
The determining module 1502, obtains the signature of the hide instruction, and it is specified to judge whether the signature obtained meets
Condition;If so, determining concealmentization data according to the hide instruction;If it is not, then refusing the hide instruction.
If it is that the transaction of block chain is written that the target transaction, which identifies corresponding transaction, the signature of the hide instruction is
The signature of block chain node, also, the specified requirements is the quantity of the signature obtained greater than specified quantity.
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
Signature include at least two permission sides signature.
The signature of each permission side is assigned weight;
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
The sum of the corresponding weight of each signature be greater than specified weight.
Described device further include:
Transaction writing module 1504 will be packaged with the concealment transaction write-in block chain of the hide instruction.
The transaction writing module 1504 will be packaged with the data Hash of the hide instruction and the concealmentization data
Concealment transaction write-in block chain.
Described device further include:
Label determining module 1505, by the target transaction identify corresponding exchange the label of block be determined as referring to
Calibration label.
For the either block in block chain, if the block does not include concealmentization data, the label of the block is not described
Specified label.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N].
Figure 16 is that this illustrates that the structure for the device that the transaction for a kind of pair of write-in block chain that Soviet Union's embodiment provides is hidden is shown
It is intended to, comprising:
Receiving module 1601 receives hide instruction;The hide instruction includes that target transaction identifies and hide condition, described
Concealment condition is for determining that the target transaction identifies the sensitive content in corresponding transaction;
Extraction module 1602 is obtained, obtains the transaction Hash that the target transaction identifies corresponding transaction, and according to described
The concealment condition that hide instruction includes identifies in corresponding transaction from the target transaction and extracts non-sensitive content;
Determining module 1603 determines concealmentization data according to the transaction Hash and the non-sensitive content;
The transaction for corresponding to target transaction mark in block chain is substituted for the concealmentization number by processing module 1604
According to.
For each transaction storage location in block chain, which is stored with content field and identifier word
Section, the content field include transaction or the concealment data based on the transaction generation;
Wherein, when the content field includes transaction, the identification field includes first identifier symbol, when the content word
When section includes the concealment data generated based on the transaction, the identification field includes second identifier symbol.
The concealment condition is sensitive position information, identifies corresponding friendship in the target transaction for characterizing sensitive content
The location of in easily.
The determining module 1603, will it is preset after tab character be spliced to it is described transaction Hash tail portion;It will be described non-
Sensitive content is spliced to the tail portion of the rear tab character;By the transaction Hash, it is described after tab character with it is described non-sensitive
The data that content is spliced into are determined as concealmentization data.
The determining module 1603 adjusts model based on preset form of presentation, adjusts the statement of the non-sensitive content
Mode;According to the transaction Hash and the non-sensitive content adjusted, concealmentization data are determined.
The determining module 1603, obtains the signature of the hide instruction, and it is specified to judge whether the signature obtained meets
Condition;If so, determining concealmentization data according to the hide instruction;If it is not, then refusing the hide instruction.
If it is that the transaction of block chain is written that the target transaction, which identifies corresponding transaction, the signature of the hide instruction is
The signature of block chain node, also, the specified requirements is the quantity of the signature obtained greater than specified quantity.
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
Signature include at least two permission sides signature.
The signature of each permission side is assigned weight;
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
The sum of the corresponding weight of each signature be greater than specified weight.
Described device further include:
Label determining module 1605, by the target transaction identify corresponding exchange the label of block be determined as referring to
Calibration label.
For the either block in block chain, if the block does not include concealmentization data, the label of the block is not described
Specified label.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N].
Described device further include:
Transaction writing module 1606 will be packaged with the concealment transaction write-in block chain of the hide instruction.
The transaction writing module 1606 will be packaged with the data Hash of the hide instruction and the concealmentization data
Concealment transaction write-in block chain.
Figure 17 is that this illustrates that the structure for the device that the transaction for a kind of pair of write-in block chain that Soviet Union's embodiment provides is hidden is shown
It is intended to, comprising:
Receiving module 1701 receives hide instruction;The hide instruction includes that target transaction identifies and hide condition, described
Concealment condition is for determining that the target transaction identifies the sensitive content in corresponding transaction;
Extraction module 1702 is obtained, obtains the transaction Hash that the target transaction identifies corresponding transaction, and according to described
The concealment condition that hide instruction includes identifies in corresponding transaction from the target transaction and extracts non-sensitive content;
Determining module 1703 is adjusted, model is adjusted based on preset form of presentation, adjusts the statement of the non-sensitive content
Mode, and according to the transaction Hash and the non-sensitive content adjusted, determine concealmentization data;
The transaction for corresponding to target transaction mark in block chain is substituted for the concealmentization number by processing module 1704
According to.
For each transaction storage location in block chain, which is stored with content field and identifier word
Section, the content field include transaction or the concealment data based on the transaction generation;
Wherein, when the content field includes transaction, the identification field includes first identifier symbol, when the content word
When section includes the concealment data generated based on the transaction, the identification field includes second identifier symbol.
The concealment condition is sensitive position information, identifies corresponding friendship in the target transaction for characterizing sensitive content
The location of in easily.
The adjustment determining module 1703, will it is preset after tab character be spliced to it is described transaction Hash tail portion;It will adjust
The non-sensitive content after whole is spliced to the tail portion of the rear tab character;By the transaction Hash, the rear tab character
The data being spliced into the non-sensitive content adjusted are determined as concealmentization data.
The adjustment determining module 1703, obtains the signature of the hide instruction, and judges whether the signature obtained meets
Specified requirements;If so, determining concealmentization data according to the hide instruction;If it is not, then refusing the hide instruction.
If it is that the transaction of block chain is written that the target transaction, which identifies corresponding transaction, the signature of the hide instruction is
The signature of block chain node, also, the specified requirements is the quantity of the signature obtained greater than specified quantity.
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
Signature include at least two permission sides signature.
The signature of each permission side is assigned weight;
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
The sum of the corresponding weight of each signature be greater than specified weight.
Described device further include:
Label determining module 1705, by the target transaction identify corresponding exchange the label of block be determined as referring to
Calibration label.
For the either block in block chain, if the block does not include concealmentization data, the label of the block is not described
Specified label.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N].
Described device further include:
Transaction writing module 1706 will be packaged with the concealment transaction write-in block chain of the hide instruction.
The transaction writing module 1706 will be packaged with the data Hash of the hide instruction and the concealmentization data
Concealment transaction write-in block chain.
Figure 18 is that this illustrates that the structure for the device that the transaction for a kind of pair of write-in block chain that Soviet Union's embodiment provides is hidden is shown
It is intended to, comprising:
Receiving module 1801 receives hide instruction;The hide instruction is identified comprising target transaction;
Judgment module 1802 is obtained, the signature of the hide instruction is obtained, and it is specified to judge whether the signature obtained meets
Condition;
First processing module 1803, if so, determining to include that target transaction mark corresponds to according to the hide instruction
Transaction transaction Hash concealment data, and, by block chain correspond to the target transaction mark transaction be substituted for
The concealmentization data;
Second processing module 1804, if it is not, then refusing the hide instruction.
If it is that the transaction of block chain is written that the target transaction, which identifies corresponding transaction, the signature of the hide instruction is
The signature of block chain node, also, the specified requirements is the quantity of the signature obtained greater than specified quantity.
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
Signature include at least two permission sides signature.
The signature of each permission side is assigned weight;
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
The sum of the corresponding weight of each signature be greater than specified weight.
The first processing module 1803 obtains the transaction Hash that the target transaction identifies corresponding transaction;It will preset
Preceding tab character be spliced to it is described transaction Hash stem;It is spliced into according to the preceding tab character and the transaction Hash
Data determine concealmentization data.
The first processing module 1803, will it is preset after tab character be spliced to it is described transaction Hash tail portion, also,
Remark information is spliced to the tail portion of the rear tab character;By the preceding tab character, the transaction Hash, the rear label
The data that character and the remark information are spliced into are determined as concealmentization data.
For each transaction storage location in block chain, which is stored with content field and identifier word
Section, the content field include transaction or the concealment data based on the transaction generation;
Wherein, when the content field includes transaction, the identification field includes first identifier symbol, when the content word
When section includes the concealment data generated based on the transaction, the identification field includes second identifier symbol.
The hide instruction further includes concealment condition, for determining that the target transaction identifies the sensitivity in corresponding transaction
Content;
The first processing module 1803, obtains the transaction Hash that the target transaction identifies corresponding transaction, and according to
The concealment condition that the hide instruction includes identifies in corresponding transaction from the target transaction and extracts non-sensitive content;According to
The transaction Hash and the non-sensitive content determine concealmentization data.
The concealment condition is sensitive position information, identifies corresponding friendship in the target transaction for characterizing sensitive content
The location of in easily.
The first processing module 1803, will it is preset after tab character be spliced to it is described transaction Hash tail portion;By institute
State the tail portion that non-sensitive content is spliced to the rear tab character;By the transaction Hash, it is described after tab character with it is described non-
The data that sensitive content is spliced into are determined as concealmentization data.
The first processing module 1803 adjusts model based on preset form of presentation, adjusts the non-sensitive content
Form of presentation;According to the transaction Hash and the non-sensitive content adjusted, concealmentization data are determined.
Described device further include:
Label determining module 1805, by the target transaction identify corresponding exchange the label of block be determined as referring to
Calibration label.
For the either block in block chain, if the block does not include concealmentization data, the label of the block is not described
Specified label.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N].
Described device further include:
Transaction writing module 1806 will be packaged with the concealment transaction write-in block chain of the hide instruction.
The transaction writing module 1806 will be packaged with the data Hash of the hide instruction and the concealmentization data
Concealment transaction write-in block chain.
Figure 19 is that this illustrates that the structure for the device that the transaction for a kind of pair of write-in block chain that Soviet Union's embodiment provides is hidden is shown
It is intended to, comprising:
Receiving module 1901 receives hide instruction;The hide instruction is identified comprising target transaction;
Determining module 1902 determines concealmentization data according to the hide instruction;The concealmentization data include the mesh
Mark the transaction Hash of the corresponding transaction of transaction ID;
The transaction for corresponding to target transaction mark in block chain is substituted for the concealmentization number by processing module 1903
According to, and, by the target transaction identify corresponding exchange the label of block be determined as specified label.
The determining module 1902 obtains the transaction Hash that the target transaction identifies corresponding transaction;Before preset
Tab character is spliced to the stem of the transaction Hash;The number being spliced into according to the preceding tab character and the transaction Hash
According to determining concealmentization data.
The determining module 1902, will it is preset after tab character be spliced to the tail portion of the transaction Hash, also, will be standby
Note information is spliced to the tail portion of the rear tab character;By the preceding tab character, the transaction Hash, the rear tab character
And the data that the remark information is spliced into are determined as concealmentization data.
For each transaction storage location in block chain, which is stored with content field and identifier word
Section, the content field include transaction or the concealment data based on the transaction generation;
Wherein, when the content field includes transaction, the identification field includes first identifier symbol, when the content word
When section includes the concealment data generated based on the transaction, the identification field includes second identifier symbol.
The hide instruction further includes concealment condition, for determining that the target transaction identifies the sensitivity in corresponding transaction
Content;
The determining module 1902 obtains the transaction Hash that the target transaction identifies corresponding transaction, and according to described
The concealment condition that hide instruction includes identifies in corresponding transaction from the target transaction and extracts non-sensitive content;According to described
Transaction Hash and the non-sensitive content determine concealmentization data.
The concealment condition is sensitive position information, identifies corresponding friendship in the target transaction for characterizing sensitive content
The location of in easily.
The determining module 1902, will it is preset after tab character be spliced to it is described transaction Hash tail portion;It will be described non-
Sensitive content is spliced to the tail portion of the rear tab character;By the transaction Hash, it is described after tab character with it is described non-sensitive
The data that content is spliced into are determined as concealmentization data.
The determining module 1902 adjusts model based on preset form of presentation, adjusts the statement of the non-sensitive content
Mode;According to the transaction Hash and the non-sensitive content adjusted, concealmentization data are determined.
The determining module 1902, obtains the signature of the hide instruction, and it is specified to judge whether the signature obtained meets
Condition;If so, determining concealmentization data according to the hide instruction;If it is not, then refusing the hide instruction.
If the target transaction identifies the transaction that corresponding transaction is write-in block chain, the signature of the hide instruction is block
The signature of chain node, also, the specified requirements is the quantity of the signature obtained greater than specified quantity.
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
Signature include at least two permission sides signature.
The signature of each permission side is assigned weight;
If it is that the transaction of class block chain is written that the target transaction, which identifies corresponding transaction, the specified requirements is to obtain
The sum of the corresponding weight of each signature be greater than specified weight.
For the either block in block chain, if the block does not include concealmentization data, the label of the block is not described
Specified label.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N].
Described device further include:
Transaction writing module 1904 will be packaged with the concealment transaction write-in block chain of the hide instruction.
The transaction writing module 1904 will be packaged with the data Hash of the hide instruction and the concealmentization data
Concealment transaction write-in block chain.
Figure 20 is a kind of structural representation of the device for the corresponding Mei Keer tree of building block that this specification embodiment provides
Figure, comprising:
It obtains module 2001 and obtains the label of the target block for the target block in block chain;
Read module 2002, if the label of the target block refers to calibration label, for every in the target block
A transaction storage location reads data from the transaction storage location;Wherein, it is deposited in target block described in the specified tag characterization
At least one sensitive transactions was stored up, for each sensitive transactions, which has been replaced by the friendship comprising the sensitive transactions
The concealment data of easy Hash;
First processing module 2003, however, it is determined that the data read from the transaction storage location include transaction, then to reading
Transaction included by data carries out Hash calculation, obtains the corresponding transaction Hash of the transaction storage location;
Second processing module 2004, however, it is determined that from the transaction storage location read data include concealmentization data, then from
Transaction Hash is extracted in concealment data included by the data of reading, as the corresponding transaction Hash of the transaction storage location;
Module 2005 is constructed, based on the corresponding transaction Hash of storage location of respectively trading in the target block, building
The corresponding Mei Keer tree of the target block.
The operation that the sensitive transactions stored in the target block are substituted for concealmentization data is as follows:
Determine the transaction Hash of the sensitive transactions;
Preset preceding tab character is spliced to the stem of the transaction Hash;
According to the data that the preceding tab character and the transaction Hash are spliced into, concealmentization data are determined;
The sensitive transactions are substituted for determining concealment data.
According to the data that the preceding tab character and the transaction Hash are spliced into, determines concealmentization data, specifically includes:
Will it is preset after tab character be spliced to the tail portion of the transaction Hash, also, remark information is spliced to described
The tail portion of tab character afterwards;
The preceding tab character, the transaction Hash, the rear tab character and the remark information are spliced into
Data are determined as concealmentization data.
The first processing module 2003, if the data from transaction storage location reading do not include the preceding marker word
Symbol, it is determined that the data read from the transaction storage location include transaction;
The Second processing module 2004, if the data from transaction storage location reading include the preceding tab character,
Then determine that the data read from the transaction storage location include concealmentization data.
The Second processing module 2004 is located at the preceding marker word in concealment data included by the data by reading
Data after symbol are determined as transaction Hash and extract;Or, being located in concealment data included by data by reading described
The data of designated length after preceding tab character are determined as transaction Hash and extract.
The Second processing module 2004 is located at the preceding marker word in concealment data included by the data by reading
Data between symbol and the rear tab character are determined as transaction Hash and extract.
For each transaction storage location in block chain, which is stored with content field and identifier word
Section, the content field include transaction or the concealment data based on the transaction generation;
Wherein, when the content field includes transaction, the identification field includes first identifier symbol, when the content word
When section includes the concealment data generated based on the transaction, the identification field includes second identifier symbol;
The first processing module 2003, if including first from the identification field in the data that the transaction storage location is read
Identifier, it is determined that the data read from the transaction storage location include transaction;
The Second processing module 2004, if including second from the identification field in the data that the transaction storage location is read
Identifier, it is determined that the data read from the transaction storage location include concealmentization data.
The building module 2005 is constructed if the label of the target block does not refer to calibration label using default behavior
The corresponding Mei Keer tree of the target block.
If block chain includes N number of block, the value of i-th of binary digit of the binary string being pre-created is the in block chain
The label of i block, i ∈ [1, N];
The acquisition module 2001, determines the serial number M of the target block;M-th is read from the binary string
The value of binary digit, the label as the target block.
Figure 21 is a kind of structural schematic diagram for simple payment verification device that this specification embodiment provides, comprising:
Receiving module 2101 receives checking request;The checking request is identified comprising target transaction;
Module 2102 is constructed, according to the checking request, the target transaction mark pair is determined in the block chain of itself
The exchange answered block, and the corresponding Mei Keer tree of the block is constructed based on method shown in Figure 11 or Figure 13;
Authentication module 2103, the Mei Keer tree based on building identify corresponding transaction for the target transaction and carry out letter
Single payment verification.
A kind of centralization storage scheme based on class block chain is as follows:
S1 receives data record to be stored, and determines the cryptographic Hash of each data record.
The data record of to be stored can be the various consumer records of client personal user, is also possible to answer herein
Instruction with server based on user, business result, intermediate state and the operation note etc. generated when executing service logic
Deng.Specific business scenario may include consumer record, audit log, supply chain, government regulation record, medical records etc.
Deng.
S2 determines each data record in block to be written when reaching preset blocking condition, generates comprising block
The n-th block of cryptographic Hash and data record.
The preset blocking condition includes: that data record quantity to be stored reaches amount threshold, for example, often receiving
When 1000 datas record, a new block is generated, 1,000 datas are recorded in write-in block;Alternatively, apart from last blocking
The time interval at moment reaches time threshold, for example, generating a new block every 5 minutes, will receive in this 5 minutes
Data record write-in block in.
N herein refers to the serial number of block, in other words, in this specification embodiment, block be in the form of block chain,
Sequence based on Chunky Time successively arranges, and has very strong temporal aspect.Wherein, the block height of block is based on the elder generation of Chunky Time
Sequence monotonic increase afterwards.Block height can be serial number, and the block height of n-th block is N at this time;Block height can also give birth in other ways
At.
As N=1, i.e., block at this time is original block.The cryptographic Hash and block height of original block are based on predetermined manner
It is given.For example, not including data record in original block, cryptographic Hash is then any given cryptographic Hash, the high blknum=0 of block;
In another example the generation trigger condition of original block is consistent with the trigger condition of other blocks, but the cryptographic Hash of original block by
Hash is taken to determine all the elements in original block.
As N > 1, since content and the cryptographic Hash of previous block are it has been determined that then at this point it is possible to (i.e. based on previous block
The N-1 block) cryptographic Hash generate current block (n-th block) cryptographic Hash, for example, a kind of feasible mode is, really
The cryptographic Hash for determining the data record that each will be written in n-th block generates a Merck according to putting in order in block
You set, and the cryptographic Hash of the root cryptographic Hash of Merkel tree and previous block is stitched together, and use hash algorithm again, and generation is worked as
Preceding piece of cryptographic Hash.In another example can also be spliced according to the sequence of data record in block and Hash is taken to obtain overall data
The cryptographic Hash of record, splices the cryptographic Hash of previous block and the cryptographic Hash of overall data record, and to the obtained word string of splicing into
Row Hash operation generates the cryptographic Hash of block.
By the generating mode of block above-mentioned, each block determines that the cryptographic Hash of block is by block by cryptographic Hash
In the content of data record, the cryptographic Hash of sequence and previous block determines.User can be at any time based on the cryptographic Hash of block
Initiate verifying, for content any in block (including the modification for data record content or sequence in block) modification all
The cryptographic Hash when cryptographic Hash and block that will cause the block being calculated in verifying generate is inconsistent, and verifying is caused to be lost
It loses, thus can not distort under realizing centralization.
By generating the block including a certain number of data records, and cryptographic Hash when block generates is recorded, from
And realize the storage for carrying out centralization to data record in a manner of block chain.Under this data storage method, each block
Cryptographic Hash dependent on previous block cryptographic Hash and the data record for itself being included content.User can be based on above-mentioned
Storage form inquires the data record of oneself at any time, and can be according to the cryptographic Hash to specified block or specified number
Cryptographic Hash verifying is carried out according to record, ensure that the integrality of user data, improves user experience.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realized when executing described program Fig. 2,5,7,9~
The function of method shown in 14.
Figure 22 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 2210, memory 2220, input/output interface 2230, communication interface 2240 and bus
2250.Wherein processor 2210, memory 2220, input/output interface 2230 and communication interface 2240 are real by bus 2250
The now communication connection inside equipment each other.
Processor 2210 can use general CPU (Central Processing Unit, central processing unit), micro- place
Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one
Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment
Case.
Memory 2220 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 2220 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 2220, and execution is called by processor 2210.
Input/output interface 2230 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 2240 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 2250 include an access, equipment various components (such as processor 2210, memory 2220, input/it is defeated
Outgoing interface 2230 and communication interface 2240) between transmit information.
It should be noted that although above equipment illustrates only processor 2210, memory 2220, input/output interface
2230, communication interface 2240 and bus 2250, but in the specific implementation process, which can also include realizing normal fortune
Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment
Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
The function of method shown in Fig. 2,5,7,9~14 is realized when sequence is executed by processor.
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.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, method, 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.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method and
For apparatus embodiments, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method
The part of embodiment illustrates.Embodiment of the method described above is only schematical, wherein described be used as separation unit
The module that part illustrates may or may not be physically separated, can be when implementing this specification example scheme
The function of each module is realized in the same or multiple software and or hardware.It can also select according to the actual needs therein
Some or all of the modules achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not making the creative labor
In the case where, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.