CN108961052A - Verification method, storage method, device, equipment and the medium of block chain data - Google Patents
Verification method, storage method, device, equipment and the medium of block chain data Download PDFInfo
- Publication number
- CN108961052A CN108961052A CN201810662650.0A CN201810662650A CN108961052A CN 108961052 A CN108961052 A CN 108961052A CN 201810662650 A CN201810662650 A CN 201810662650A CN 108961052 A CN108961052 A CN 108961052A
- Authority
- CN
- China
- Prior art keywords
- transaction
- block
- mark
- block chain
- appended
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The embodiment of the invention discloses verification method, storage method, device, equipment and the media of a kind of block chain data.The verification method of the block chain data includes: by initiating Transaction Information acquisition request to block chain network node and receiving the Transaction Information of feedback;According to it is corresponding with Transaction Information it is block-identified send Transaction Identifier array acquisition request to block chain network node, and obtain the Transaction Identifier array in block;Underlying transaction mark and appended transaction mark are extracted from Transaction Identifier array;Transaction Information is verified according to the underlying transaction of extraction mark and appended transaction mark.The embodiment of the present invention is when verifying Transaction Information, it is contemplated that various forms of Transaction Informations, introduce appended transaction mark, so as to verify the Transaction Information content of the multiple portions stored in block chain, be suitble to different form Transaction Information the case where.
Description
Technical field
The present embodiments relate to the verification methods of block chain data processing technique more particularly to block chain data, storage
Method, apparatus, equipment and medium.
Background technique
One typical feature of block chain technology is that block chain network node is needed all to store complete block chain data, this
Obviously very high, unsuitable hardware configuration low equipment is required node hardware storage capacity.Such as be not suitable for user terminal it is direct
As block chain network node.Therefore, when the equipment such as user terminal want to participate in block chain network, it may be desirable to from block chain network section
Point obtains block chain data.
When the problem of being faced based on above scheme, when needing to obtain block data or Transaction Information, need to block chain
Other nodes send the request for obtaining data in network, by other node feeding back block datas or Transaction Information.In the process
A major issue be that it is correct for how verifying the data of feedback.
Transactions requests type handled by block chain network common at present, one is the readable of bit coin (UTXO) form
Field transactions requests, another kind are the intelligent contracts for the code segment form that ether mill (EVM) is representative, and there is also two kinds of form knots
A kind of transactions requests of conjunction, it is desirable to provide data verification method suitable for various forms transactions requests.
Summary of the invention
The embodiment of the invention provides verification method, storage method, device, equipment and the medium of a kind of block chain data,
To realize effective verifying to various forms block chain data.
In a first aspect, the embodiment of the invention provides a kind of verification methods of block chain data, this method comprises:
Transaction Information acquisition request is initiated to block chain network node, and receives the Transaction Information of feedback;
It is corresponding block-identified according to the Transaction Information, the acquisition of Transaction Identifier array, which is initiated, to block chain network node asks
It asks, and obtains the Transaction Identifier array in block;
Underlying transaction mark and appended transaction mark are extracted from the Transaction Identifier array;
The Transaction Information is verified according to underlying transaction mark and appended transaction mark.
Second aspect, the embodiment of the invention also provides a kind of storage methods of block chain data, are applied to block and generate
Node, which comprises
Obtain the transactions requests in block chain network;
Transaction Information is generated according to the transactions requests, and is added in block;
Underlying transaction mark is generated according to the Transaction Information being added in block;
The intelligent contract in the transactions requests is run, operation result is added in block;
Appended transaction mark is generated according to the intelligent contract operation result being added in block;
By underlying transaction mark and appended transaction mark associated storage into the Transaction Identifier array of the block.
The third aspect, the embodiment of the invention also provides a kind of verifying device of block chain data, which includes:
Transaction Information obtains module, for initiating Transaction Information acquisition request to block chain network node, and receives feedback
Transaction Information;
Transaction Identifier array obtains module, for corresponding block-identified according to the Transaction Information, to block chain network
Node initiates Transaction Identifier array acquisition request, and obtains the Transaction Identifier array in block;
Transaction Identifier extraction module, for extracting underlying transaction mark and appended transaction mark from the Transaction Identifier array
Know;
Transaction Information authentication module, for being identified according to underlying transaction mark and appended transaction to the Transaction Information
It is verified.
Fourth aspect, the embodiment of the invention also provides a kind of storage devices of block chain data, are configured at block generation
Node, the device include:
Transactions requests obtain module, for obtaining the transactions requests in block chain network;
Transaction Information generation module for generating Transaction Information according to the transactions requests, and is added in block;
Underlying transaction identifies generation module, for generating underlying transaction mark according to the Transaction Information being added in block;
Operation result is added to area for running the intelligent contract in the transactions requests by operation result generation module
In block;
Appended transaction identifies generation module, for generating additional thing according to the intelligent contract operation result being added in block
Business mark;
Transaction Identifier associated storage module, for underlying transaction mark and appended transaction to be identified associated storage to institute
It states in the Transaction Identifier array of block.
5th aspect, the embodiment of the invention also provides a kind of electronic equipment, which includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes a kind of verification method of block chain data provided by first aspect present invention embodiment.
6th aspect, the embodiment of the invention also provides a kind of electronic equipment, which includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes a kind of storage method of block chain data provided by second aspect of the present invention embodiment.
7th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes a kind of verifying of block chain data provided by first aspect present invention embodiment when the program is executed by processor
Method.
Eighth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes a kind of storage of block chain data provided by second aspect of the present invention embodiment when the program is executed by processor
Method.
The embodiment of the present invention is by initiating Transaction Information acquisition request to block chain network node and receiving the affairs of feedback
Data;According to it is corresponding with Transaction Information it is block-identified to block chain network node send Transaction Identifier array acquisition request, and
Obtain the Transaction Identifier array in block;Underlying transaction mark and appended transaction mark are extracted from Transaction Identifier array;According to
The underlying transaction mark and appended transaction mark of extraction verify Transaction Information.By adopting the above technical scheme in verifying affairs
When data, it is contemplated that various forms of Transaction Informations introduce appended transaction mark, store in block chain so as to verify
Multiple portions Transaction Information content, be suitble to different form Transaction Information the case where being verified.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the verification method for block chain data that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of the verification method of block chain data provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram of the verification method for block chain data that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow diagram of the storage method for block chain data that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram of the verifying device for block chain data that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram of the storage device for block chain data that the embodiment of the present invention six provides;
Fig. 7 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention seven provides.
Specific embodiment
The present invention 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 the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow diagram of the verification method for block chain data that the embodiment of the present invention one provides, this implementation
Example is applicable to electronic equipment and obtains data from block chain network node, and to the feelings that the block chain data of acquisition are verified
Condition, this method can be executed by the verifying device of block chain data, and the device is by software and or hardware realization and concrete configuration
In electronic equipment, which can be regular node or lightweight node in block chain network, be also possible to non-area
Block chain network node.
The embodiment of the present invention is applicable to the Transaction Information verifying of processing diversified forms, especially suitable in Transaction Information
Appearance cannot solely carry out the case where hash signature forms Transaction Identifier.Bit coin (UTXO) illustrated below combines ether mill
(EVM) the Transaction Information form of intelligent forms of contract.
According to the needs of affairs, there are the transactions requests of readable field form in conjunction with the transactions requests of code segment form
Form.For example, being embedded in the intelligent contract code of EVM in the certain field of UTXO.When handling the transactions requests, on the one hand want
Processing field content forms Transaction Information, on the other hand also to run intelligent contract, generates the operation result of intelligent contract.Fortune
Row result is generally stored in block with Transaction Information, but is not stored at together.It and is usually first to generate Transaction Information
It is added in block, Hash calculation is carried out to the Transaction Information and generates Transaction Identifier, then run intelligent contract, operation result
Continue storage within a block.Therefore the content of operation result can not be embodied in Transaction Identifier, so difficult in the prior art
With verifying.
The embodiment of the present invention is various informative for this Transaction Information, cannot unify the feelings verified by single Transaction Identifier
Condition provides solution.The verification method of the block chain data specifically includes:
S110, Transaction Information acquisition request is initiated to block chain network node, and receives the Transaction Information of feedback.
Block chain is a kind of a kind of chain type number for being sequentially in time combined into data block in such a way that sequence is connected
According to structure, and the distributed memory system that can not be distorted He can not forge guaranteed in a manner of cryptography.And it is stored in block
Its generating process of Transaction Information it is to be understood that when have transactions requests be sent to block generate node when, block generate node
Transactions requests can be handled and generate Transaction Information storage into block.
Wherein, block chain network node can be understood as participating in the generation for each block that block chain is included, storage and/
Or the hardware carrier for having certain data-handling capacity of the processes such as verifying.Illustratively block chain network node can be clothes
The electronic equipments such as business device, mobile terminal or server cluster.
For the electronic equipment in block chain network or outside network, or it is carried on the client of electronic equipment, it is possible to meeting
Need to obtain the Transaction Information stored in block chain network node.At this point it is possible to any one or more block chain network sections
Point initiates Transaction Information acquisition request, to receive the Transaction Information of feedback.
Illustratively, initiating Transaction Information acquisition request to block chain network node may is that the trusted node to itself
Transaction Information acquisition request is initiated, to improve the confidence level of acquired Transaction Information.Wherein, trusted node can be credit compared with
High node is also possible to the node that the electronic equipment often contacts.
Illustratively, it may also is that block chain network node initiation Transaction Information acquisition request wide to block chain network
Transaction Information acquisition request is broadcast, after the node for having storage capacity receives the Transaction Information acquisition request, feedback is corresponding
Transaction Information.Certainly, in order to improve the acquisition efficiency of Transaction Information, Internet resources are saved, electronic equipment can also be only to choosing
The node for having storage capacity of the setting quantity taken initiates Transaction Information acquisition request.
It is S120, corresponding block-identified according to the Transaction Information, Transaction Identifier array is initiated to block chain network node
Acquisition request, and obtain the Transaction Identifier array in block.
It should be noted that the data structure of block includes block head and block body.Wherein, block generates node and is based on respectively
Transactions requests Transaction Information generated is stored in block body;The basis being calculated based on Transaction Information by hash signature
Transaction Identifier is stored in the Transaction Identifier array of block head;What the hash signature two-by-two based on each underlying transaction mark was constituted
Block-identified also correspondence determined by the root of Mei Keer tree is stored in block head.
Can be determined according to the Transaction Identifier for the Transaction Information to be obtained it is corresponding block-identified, and then be based on block mark
Know and requires to obtain Transaction Identifier array.Alternatively, Transaction Identifier can also be provided directly, corresponded to be inquired in block chain network
It is block-identified.
When obtaining Transaction Identifier array, block chain network node can directly feed back array, can also be by block head or whole
A block feeds back offer, and then electronic device voluntarily extracts Transaction Identifier array again.
That is, it is corresponding block-identified according to the Transaction Information, block acquisition request is initiated to block chain network node, and
Receive the block of feedback;Transaction Identifier array is extracted from the block.
S130, underlying transaction mark and appended transaction mark are extracted from the Transaction Identifier array.
Wherein, Transaction Identifier of the Transaction Identifier array to store unique characterization Transaction Information.Wherein, Transaction Identifier can be with
It can also include to characterize the additional of the operation result of intelligent contract including the underlying transaction mark to characterize Transaction Information
Transaction Identifier.
It should be noted that the Transaction Information stored in same block can be at least one, therefore corresponding basic thing
Business mark is at least one;It is at least that embedded intelligent contract, which is at least one or operation result, in same Transaction Information
One, therefore corresponding appended transaction mark is also at least one.
In general, the mark address for the Transaction Information that can be inquired, refers to that underlying transaction identifies, therefore, can pass through pass
Join storage location or establish the mode of index, embody the incidence relation of underlying transaction mark and appended transaction mark, thus convenient
It can extract together.
S140, the Transaction Information is verified according to underlying transaction mark and appended transaction mark.
On the one hand pass through processing field content formation Transaction Information when handling transactions requests since block generates node, separately
On the one hand operation result is generated by running intelligent contract.And Transaction Information and operation result are stored in the different memory areas of block
Domain.Therefore, it is necessary to be verified respectively to Transaction Information corresponding with field contents and intelligent contract operation result, just realize
To the integrity authentication of Transaction Information in block.
Wherein, the underlying transaction mark if inquired may is that the verification mode of the corresponding Transaction Information of field contents
Knowledge is identical as the underlying transaction mark that Transaction Information acquisition request is included, or the underlying transaction mark inquired is set with electronics
The standby underlying transaction mark being locally stored is identical, it is determined that Transaction Information acquired in electronic equipment is correct.
Wherein, it may also is that the Transaction Information to feedback to the verification mode of the corresponding Transaction Information of field contents
Hash calculation is carried out with the corresponding Transaction Identifier of determination, verifying is compared with underlying transaction mark in the Transaction Identifier of calculating,
With the correctness of the determination Transaction Information.Specifically, if the Transaction Identifier and consistent, the table of underlying transaction mark that calculate
Transaction Information acquired in bright electronic equipment is correct.
Wherein, being subject to verification mode to intelligent contract operation result may is that if it is determined that there are the appended transaction marks
Know, it is determined where the corresponding intelligent contract operation result of the Transaction Information is present in the Transaction Information in block.At this point,
It can determine that intelligent contract was performed in block chain network, and the successful storage table wisdom energy contract of appended transaction mark
The correctness of operation result obtained the verifying of each network node in block chain network, so electronic equipment can directly determine
The operation result of each intelligence contract is correct.
Wherein, it is subject to verification mode to intelligent contract operation result and may also is that rerun each intelligent contract and obtain
Corresponding operation result;Hash calculation is carried out to operation result and determines corresponding cryptographic Hash;By the cryptographic Hash of calculating and additional thing
Verifying is compared in business mark, to determine the correctness of intelligent contract operation result.Specifically, if identified cryptographic Hash with
The appended transaction mark of extraction is consistent, then shows that each intelligence contract was performed in the Transaction Information and operation result is correct.
Electronic equipment can be according to the verifying degree to block, according to electronic equipment own hardware condition and block chain network
Degree of participation, to determine specifically using which kind of verification mode.Preferably, the executing subject of the embodiment of the present invention is block chain network
Lightweight node.Wherein, block chain network lightweight node is not stored or storage section block data and Transaction Information.Wherein,
The Partial Block Data that block chain network lightweight node is stored may include the Transaction Identifier etc. in block head.
It should be noted that the embodiment of the present invention only in the form of the transactions requests of UTXO combination EVM intelligence forms of contract into
Row exemplary illustration, when Transaction Information generated includes two parts and memory block to transactions requests after block generates node processing
When the difference of domain, Transaction Information can be verified using the verification method of the embodiment of the present invention.Illustratively, when affairs are asked
When the intelligent forms of contract of Seeking Truth EVM code segment form, due to the corresponding Transaction Information of intelligent contract itself and intelligent contract
Operation result storage region it is also different, therefore equally can using the embodiment of the present invention verification method to Transaction Information carry out
Verifying.
Preferably, Transaction Information corresponds to the digital cash transaction bill of readable field form, wraps in the Transaction Information
Include the intelligent contract of code segment form.
The embodiment of the present invention is by initiating Transaction Information acquisition request to block chain network node and receiving the affairs of feedback
Data;According to it is corresponding with Transaction Information it is block-identified to block chain network node send Transaction Identifier array acquisition request, and
Obtain the Transaction Identifier array in block;Underlying transaction mark and appended transaction mark are extracted from Transaction Identifier array;According to
The underlying transaction mark and appended transaction mark of extraction verify Transaction Information.By adopting the above technical scheme in verifying affairs
When data, it is contemplated that various forms of Transaction Informations introduce appended transaction mark, store in block chain so as to verify
Multiple portions Transaction Information content, be suitble to different form Transaction Information the case where being verified.
Embodiment two
Fig. 2 is a kind of flow diagram of the verification method of block chain data provided by the embodiment of the present invention two.This hair
Bright embodiment has carried out additional optimization on the basis of the technical solution of the various embodiments described above.Further, in operation " according to institute
State underlying transaction mark and appended transaction mark verify the Transaction Information " after, it is additional " according to the Transaction Information
It is corresponding block-identified, block acquisition request is initiated to block chain network node;According to locally obtain current block mark and
It is previous block-identified, and feedback block current block mark and it is previous block-identified, the block is verified ", with
Whether block where verifying Transaction Information is effective.
The verification method of block chain data as shown in Figure 2, specifically includes:
S210, Transaction Information acquisition request is initiated to block chain network node, and receives the Transaction Information of feedback.
Electronic equipment directly acquires the underlying transaction mark being locally stored, or directly acquires basic thing from affairs initiator
Business mark, or underlying transaction mark is obtained from other block chain network nodes;It identifies to form Transaction Information based on underlying transaction
Acquisition request simultaneously sends the Transaction Information acquisition request to block chain network node;When block chain network node receives number of transactions
After acquisition request, Transaction Information corresponding with underlying transaction mark is fed back to electronic equipment.
It is S220, corresponding block-identified according to the Transaction Information, Transaction Identifier array is initiated to block chain network node
Acquisition request, and obtain the Transaction Identifier array in block.
S230, underlying transaction mark and appended transaction mark are extracted from the Transaction Identifier array.
S240, the Transaction Information is verified according to underlying transaction mark and appended transaction mark.
It is S250, corresponding block-identified according to the Transaction Information, block acquisition request is initiated to block chain network node.
Electronic equipment can be corresponding block-identified to other block chain network nodes according to the Transaction Information got
Initiate block acquisition request, after corresponding block chain network node receives block acquisition request, to electronic equipment feedback with
Block-identified corresponding block.
This step can execute together with S220, i.e., block acquisition request is equivalent to Transaction Identifier array acquisition request,
Transaction Identifier array can be extracted from the block of acquisition.
S260, according to locally obtain current block mark and it is previous block-identified, and feedback block current block
It identifies and previous block-identified, the block is verified.
The embodiment of the present invention can be determined the verification method of block by mathematical induction:
1) the block-identified blockid [0] for creating generation block block [0] generally acknowledges effectively, therefore defaults each in block chain network
The block data of the wound generation block of network node is effective.
2) the after being connected to wound [0] generation block block from block chain acquired in other block chain network nodes
The previous block-identified blockid [0] that one block block [1] is stored is locally stored previous block-identified with electronic equipment
Blockid [0] is identical, and the first block block [1] acquired in other block chain nodes meets common recognition algorithm and the firstth area
The digital signature of block block [1] is equal to current block mark blockid [1] that electronic equipment is locally stored, then showing electronics
First block block [1] of other block chain network nodes that equipment obtains is effective.
3) assume that the either block block [i] in block chain acquired in electronic equipment is correct and effective, then electronics is set
The previous block-identified blockid [i] that the standby latter block block [i+1] obtained from other block chain network nodes is stored
It is identical as previous block-identified blockid [i] that electronic equipment is locally stored, and acquired in other block chain network nodes
Latter block block [i+1] meets common recognition algorithm and the digital signature of latter block block [i+1] is equal to electronic equipment local
The current block of storage identifies blockid [i+1], then showing the latter of other block chain network nodes that electronic equipment obtains
Block block [i+1] is effective.
It can be concluded based on above content and show that the whether effective step of verifying block may is that area of the electronic equipment from acquisition
In block obtain current block mark be locally stored current block mark compared to pair, acquisition the first comparison result;Electronic equipment
Obtained from the block of acquisition it is previous it is block-identified be locally stored it is previous it is block-identified compared with pair, obtain second compare knot
Fruit;When the first comparison result is identical and the second comparison result is identical, show that acquired block is effective.
It should be noted that needing to follow certain common recognition algorithm, generation is set when block chain network node generates block
Fixed data are as in block, so which the generation node for showing block is.Therefore, it in verifying, not only needs by working as
The correctness of preceding block-identified verifying block data, it is also necessary to whether be based on data verification block data added by common recognition algorithm
It is generated by correct node.
The technical solution of the embodiment of the present invention passes through additional block verification step, block where further verifying Transaction Information
Data validity, the block for preventing the Transaction Information by acquisition from being stored has been rolled back, namely the received number of transactions of institute
According to not actual stored in block chain, the confidence level of Transaction Information verification result is improved.
Embodiment three
Fig. 3 is a kind of flow diagram of the verification method of block chain data provided by the embodiment of the present invention three.This hair
Bright embodiment has carried out subdivision optimization on the basis of the technical solution of the various embodiments described above.The present embodiment is light with electronic equipment
It is illustrated for magnitude node
Further, operation " is extracted underlying transaction mark from the Transaction Identifier array and appended transaction identifies ",
Be refined as " it is identified based on the underlying transaction locally obtained and searches corresponding underlying transaction mark in the Transaction Identifier array,
And it extracts;The appended transaction mark that relative position is in underlying transaction mark is extracted from the Transaction Identifier array
Know ", to improve the extracting mode of underlying transaction mark and appended transaction mark.
The verification method of block chain data as shown in Figure 3, specifically includes:
S310, Transaction Information acquisition request is initiated to block chain network node, and receives the Transaction Information of feedback.
Lightweight node directly acquires the underlying transaction mark being locally stored, and generates affairs based on underlying transaction mark
Data acquisition request;Lightweight node sends the Transaction Information acquisition request to block chain network node;When block chain network section
After point receives Transaction Information acquisition request, to lightweight node feeding back Transaction Information corresponding with underlying transaction mark.
Preferably, block chain network node is the believable one or more block chain network nodes of lightweight node.
It is S320, corresponding block-identified according to the Transaction Information, Transaction Identifier array is initiated to block chain network node
Acquisition request, and obtain the Transaction Identifier array in block.
Lightweight node can also be directly obtained area corresponding with the Transaction Identifier while getting Transaction Identifier
Block identification or lightweight node get corresponding with Transaction Information block-identified according to the Transaction Information of feedback;Light weight
Grade node is based on block-identified formation block acquisition request, and sends the block acquisition request to block chain network node;Work as area
After block chain network node receives the block acquisition request, to lightweight node feeding back and block-identified corresponding block;Gently
Magnitude node receives the block and extracts Transaction Identifier array from the block head of block.
It should be noted that block chain network involved in the block chain network node involved in S320 and S310
Node can be the same or different.
S331, it is identified based on the underlying transaction locally obtained and searches corresponding underlying transaction in the Transaction Identifier array
Mark, and extract.
Since lightweight node is when obtaining Transaction Information to other block chain network nodes, need using underlying transaction mark
Know as acquisition foundation, therefore for the ease of the lookup of Transaction Information acquisition, each underlying transaction mark being stored in block head
It can be stored in Transaction Identifier array according to the storage order of Transaction Information each in block correspondence.Correspondingly, lightweight node base
It is identified in the underlying transaction locally obtained and searches same underlying transaction mark in Transaction Identifier array, and mentioned
It takes.
S332, the appended transaction that relative position is in underlying transaction mark is extracted from the Transaction Identifier array
Mark.
It is understood that for the ease of distinguishing the operation result of intelligent contract in each Transaction Information, each Transaction Information
Appended transaction mark also will identify associated storage with underlying transaction.
Illustratively, it is extracted from the Transaction Identifier array with underlying transaction mark in the additional of relative position
Transaction Identifier may is that the letter undetermined for extracting from the Transaction Identifier array and being in relative position with underlying transaction mark
Breath;Determine the information undetermined for appended transaction mark based on the presetting bit content of the information undetermined.
Since underlying transaction mark and appended transaction mark are to be compressed data into using hash algorithm by number and word
The hash character string that mother is combined into, therefore in order to be distinguish to underlying transaction mark and appended transaction mark, block generates section
Point sets corresponding presetting bit when would generally appended transaction be identified and be stored when storing appended transaction mark.Wherein, presetting bit
It can be some byte or some special bit.
Illustratively, it is extracted from the Transaction Identifier array with underlying transaction mark in the additional of relative position
Transaction Identifier may also is that be extracted from the Transaction Identifier array, the continuous position of memory space with underlying transaction mark
The appended transaction mark set;Or extracted from the Transaction Identifier array, exist with the storage location of underlying transaction mark
The appended transaction of index relative identifies.Wherein, when there are the appended transaction of index relative marks to be stored in underlying transaction mark
When appended transaction identifies array, a preset identifications can be only set, be attached to characterize the Transaction Identifier that the array is stored
Add Transaction Identifier.
Preferably by the way of underlying transaction mark and appended transaction mark Coutinuous store.In this way in Transaction Identifier array
In find underlying transaction mark when, subsequent appended transaction can be obtained immediately and identified, search efficiency is improved, also reduce
Required index data.
S340, the Transaction Information is verified according to underlying transaction mark and appended transaction mark.
The extraction operation that the embodiment of the present invention is identified by refinement underlying transaction mark and appended transaction is further perfect
The verification method of block chain data.By adopting the above technical scheme, it can verify when verifying Transaction Information and be stored in block chain
Multiple portions Transaction Information content, be suitble to different form Transaction Information the case where being verified.
Example IV
Fig. 4 is a kind of flow diagram of the storage method for block chain data that the embodiment of the present invention four provides, this implementation
Example is applicable to block and generates the case where node response transactions request and generate Transaction Information, and this method can be by block chain data
Storage device execute, the device is by software and or hardware realization and concrete configuration is in the electronics for generating node as block
In equipment.
The embodiment of the present invention is applicable to the Transaction Information verifying of processing diversified forms, especially suitable in Transaction Information
Appearance cannot solely carry out the case where hash signature forms Transaction Identifier.Bit coin (UTXO) illustrated below combines ether mill
(EVM) the Transaction Information form of intelligent forms of contract.
The storage method of block chain data as shown in Figure 4, specifically includes:
Transactions requests in S410, acquisition block chain network.
When user needs to handle affairs, transactions requests can be sent in block chain network.When each in block chain network
After node determines that block generates node based on common recognition mechanism, block generates the transactions requests in node acquisition block chain network.
S420, Transaction Information is generated according to the transactions requests, and be added in block.
Block generates node and carries out processing generation Transaction Information to transactions requests and be added to generated Transaction Information
In the block body of block.
S430, underlying transaction mark is generated according to the Transaction Information being added in block.
Block generates node and generates corresponding basic thing using Hash calculation according to the Transaction Information being added in block body
Business mark, to the unique identification as Transaction Information, convenient for the lookup and verifying of Transaction Information.
Intelligent contract in S440, the operation transactions requests, operation result is added in block.
Block generates the intelligent contract in node operation transactions requests, and the operation result of intelligent contract is added to block
In.
S450, appended transaction mark is generated according to the intelligent contract operation result being added in block.
Block generates node and carries out Hash calculation generation appended transaction to the intelligent contract operation result being added in block
Mark, to verify foundation as intelligent contract operation result.
S460, by the underlying transaction identify and appended transaction identify associated storage to the block Transaction Identifier array
In.
Although the operation result and Transaction Information of intelligent contract are stored in block, it is not stored at together.But
Node is generated by block, underlying transaction mark and appended transaction are identified into associated storage into the Transaction Identifier array in block head.
It should be noted that can pass through in a conventional manner after block generates node and generates block or Transaction Information
Whether other node verifications block generated or added Transaction Information in block chain network are correct.When block is by area
After other node verifications in block chain network, block can just be generated node area generated by other nodes in block chain network
Block storage or part storage are to locally.It, can when obtaining the Transaction Information in the block to block chain network there are electronic equipment
To be verified using the technical solution of the various embodiments described above of the present invention to block chain data.
Since underlying transaction mark and appended transaction mark are to be compressed data into using hash algorithm by number and word
The hash character string that mother is combined into, therefore in order to be distinguish to underlying transaction mark and appended transaction mark, block generates section
Point sets corresponding presetting bit when would generally appended transaction be identified and be stored when storing appended transaction mark.Wherein, presetting bit
It can be some byte or some special bit.Wherein, presetting bit can set at least one.
Illustratively, when the first presetting bit of Transaction Identifier is preset characters, show that current Transaction Identifier is additional
Transaction Identifier.Illustratively, the second presetting bit of Transaction Identifier number of transactions corresponding as Current transaction mark can also be set
According to the quantity of embedded intelligent contract.Illustratively, the third presetting bit of Transaction Identifier can also be set as current additional thing
The number for mark of being engaged in.Alternatively, can be identified by appended transaction when underlying transaction mark and appended transaction mark store respectively
In presetting bit store the pointer of underlying transaction mark, itself and which presetting bit so as to be identified by appended transaction determine
A underlying transaction mark corresponds to.
Wherein, the quantity of Transaction Identifier array included in block can be at least one.
Illustratively, when, there is only when a Transaction Identifier array, block generates node and can generate and deposit in block
It, can be according to the insertion of intelligent contract embedded by Transaction Information sequentially by the operation result phase of intelligent contract when storing up Transaction Information
Corresponding appended transaction mark is sequentially stored in after or before the memory space of the corresponding underlying transaction mark of Transaction Information
Continuous memory space.Preferably, appended transaction mark is stored in the company after corresponding underlying transaction mark storage location
Continuous memory space.
Illustratively, when, there are when two Transaction Identifier arrays, block, which generates node, to generate number of transactions in block
According to when, can by underlying transaction identify be stored in underlying transaction mark array in;Corresponding each appended transaction is identified according to affairs
The insertion sequence or operation order of intelligent contract embedded by data are sequentially stored in appended transaction mark array.It needs to illustrate
, appended transaction, which identifies array, can be separately provided a presetting bit for identifying the array for storing each appended transaction mark
Know.
Illustratively, when, there are when two Transaction Identifier arrays, block, which generates node, to generate number of transactions in block
According to when, can by underlying transaction identify be stored in underlying transaction mark array in;Each appended transaction corresponding with underlying transaction mark
The storage location of mark is successively added in array of indexes;Each index value that appended transaction mark is stored in array of indexes is corresponding
Memory space.
Illustratively, when, there are when at least three Transaction Identifier arrays, block generates node and can also generate in block
And when store transaction data, underlying transaction can be identified and be stored in underlying transaction mark array;Phase will be identified with underlying transaction
The storage location for each appended transaction mark answered successively is added in array of indexes;Corresponding each appended transaction mark can sequence
It is stored in appended transaction mark array;A new appended transaction mark number can also be re-created for the Transaction Information
Group;Then sequential storage each appended transaction mark relevant to the Transaction Information in the appended transaction mark array created.
It should be noted that the embodiment of the present invention only in the form of the transactions requests of UTXO combination EVM intelligence forms of contract into
Row exemplary illustration, when Transaction Information generated includes two parts and memory block to transactions requests after block generates node processing
When the difference of domain, appended transaction mark can be introduced using the storage method of the embodiment of the present invention, thus to Transaction Information mark
Know subregion storage.Illustratively, when transactions requests are the intelligent forms of contract of EVM code segment form, due to intelligent contract
Corresponding Transaction Information itself and the operation result storage region of intelligent contract are also different, therefore equally can be using the present invention
The storage method of embodiment is stored to by Transaction Information mark subregion.
The embodiment of the present invention generates the transactions requests in node acquisition block chain network by block, and is asked according to the affairs
Generation Transaction Information is asked to be added in block;Underlying transaction mark is generated according to the Transaction Information being added in block;Run thing
Intelligent contract in data of being engaged in, operation result is added in block, and generates appended transaction according to intelligent contract operation result
Mark;By underlying transaction mark and appended transaction mark associated storage into the Transaction Identifier array of block.Using above-mentioned technology
Scheme is in store transaction data, it is contemplated that various forms of Transaction Informations introduce appended transaction mark, thus in verifying thing
When data of being engaged in, it is able to verify that the Transaction Information content of the multiple portions stored in block chain, is suitble to different form Transaction Information
The case where being verified.
On the basis of the technical solution of the various embodiments described above, further, the underlying transaction is identified and is added thing
Business mark associated storage is into the Transaction Identifier array of the block, comprising:
Underlying transaction mark and appended transaction mark are continually stored in the Transaction Identifier array of the block, and
Presetting bit is set in appended transaction mark;Or
Underlying transaction mark and appended transaction mark are respectively stored into the Transaction Identifier array of the block, built
Found the index relative between the underlying transaction mark and appended transaction mark.
The technical solution of the embodiment of the present invention is thin by the way that underlying transaction mark and appended transaction are identified associated storage step
It turns to continuous associated storage and Additional Services mark presetting bit is set effectively to distinguish to Transaction Identifier, or by introducing index
The incidence relation between underlying transaction mark and appended transaction mark is determined, so that block generates node in store transaction data
When, it is contemplated that various forms of Transaction Informations introduce appended transaction mark, to be able to verify that when verifying Transaction Information
The case where Transaction Information content of the multiple portions stored in block chain, suitable different form Transaction Information is verified.
Embodiment five
Fig. 5 is a kind of structural schematic diagram of the verifying device for block chain data that the embodiment of the present invention five provides, the present invention
Embodiment is suitable for electronic equipment and obtains data from other block chain network nodes, and is verified to the block chain data of acquisition
The case where, the device is by software and or hardware realization and is configured in electronic equipment.The verifying device packet of the block chain data
Include: Transaction Information obtains module 510, and Transaction Identifier array obtains module 520, Transaction Identifier extraction module 530 and number of transactions
According to authentication module 540.
Wherein, Transaction Information obtains module 510, for initiating Transaction Information acquisition request to block chain network node, and
Receive the Transaction Information of feedback;
Transaction Identifier array obtains module 520, for corresponding block-identified according to the Transaction Information, to block link network
Network node initiates Transaction Identifier array acquisition request, and obtains the Transaction Identifier array in block;
Transaction Identifier extraction module 530, for extracting underlying transaction mark and additional thing from the Transaction Identifier array
Business mark;
Transaction Information authentication module 540, for being identified according to underlying transaction mark and appended transaction to the affairs
Data are verified.
The embodiment of the present invention obtains module by Transaction Information and initiates Transaction Information acquisition request to block chain network node
And receive the Transaction Information of feedback;Module is obtained according to corresponding with Transaction Information block-identified to area by Transaction Identifier array
Block chain network node sends Transaction Identifier array acquisition request, and obtains the Transaction Identifier array in block;Pass through Transaction Identifier
Extraction module extracts underlying transaction mark and appended transaction mark from Transaction Identifier array;Pass through Transaction Information authentication module root
Transaction Information is verified according to the underlying transaction mark and appended transaction mark of extraction.By adopting the above technical scheme in verifying thing
When data of being engaged in, it is contemplated that various forms of Transaction Informations introduce appended transaction mark, deposit in block chain so as to verify
The case where Transaction Information content of the multiple portions of storage, suitable different form Transaction Information.
Further, the Transaction Information extraction module 530, comprising:
Underlying transaction marker extraction unit, for being identified based on the underlying transaction locally obtained in the Transaction Identifier array
It is middle to search corresponding underlying transaction mark, and extract;
Appended transaction marker extraction unit, for from extraction in the Transaction Identifier array and the underlying transaction mark
It is identified in the appended transaction of relative position.
Further, the appended transaction marker extraction unit, is specifically used for:
The information undetermined that relative position is in underlying transaction mark is extracted from the Transaction Identifier array;
Determine the information undetermined for appended transaction mark based on the presetting bit content of the information undetermined.
Further, the appended transaction marker extraction unit, is specifically used for:
It is extracted from the Transaction Identifier array, the additional thing with the memory space continuous position of underlying transaction mark
Business mark;Or
It is extracted from the Transaction Identifier array, there are the attached of index relative with the storage location of underlying transaction mark
Add Transaction Identifier.
Further, the Transaction Identifier array obtains module 520, comprising:
Block acquiring unit is initiated for corresponding block-identified according to the Transaction Information to block chain network node
Block acquisition request, and receive the block of feedback;
Transaction Identifier array extraction unit, for extracting Transaction Identifier array from the block.
Further, described device further includes that block authentication module is specifically used for:
It is corresponding block-identified according to the Transaction Information, block acquisition request is initiated to block chain network node;
According to locally obtain current block mark and it is previous block-identified, and feedback block current block mark and
It is previous block-identified, the block is verified.
Further, the Transaction Information authentication module 540, comprising:
Transaction Information authentication unit carries out Hash calculation for the Transaction Information to feedback with the corresponding affairs of determination
Verifying is compared with underlying transaction mark, with the correctness of the determination Transaction Information in the Transaction Identifier of calculating by mark;
Operation result authentication unit determines the Transaction Information pair for determining there are when appended transaction mark
Where the intelligent contract operation result answered is present in the Transaction Information in block.
Further, the Transaction Information corresponds to the digital cash transaction bill of readable field form, the number of transactions
Including the intelligent contract of code segment form in.
Further, described device is configured at block chain network lightweight node, and the lightweight node is not stored or deposits
Partial Block Data and Transaction Information are stored up, includes the intelligent contract of code segment form in the Transaction Information.
The verifying device of block chain data provided by the embodiment of the present invention can be performed any embodiment of that present invention and be provided
Block chain data verification method, have execute block chain data the corresponding functional module of verification method and beneficial effect.
Embodiment six
Fig. 6 is a kind of structural schematic diagram of the storage device for block chain data that the embodiment of the present invention six provides.The present invention
Embodiment, which is applicable to block generation node response transactions, requests and generates Transaction Information corresponding the case where being stored in block, the dress
It sets by software and or hardware realization and concrete configuration is in the electronic equipment for generating node as block.The block chain data
Storage device specifically includes: transactions requests obtain module 610, Transaction Information generation module 620, and underlying transaction identifies generation module
630, operation result generation module 640, appended transaction identifies generation module 650 and Transaction Identifier associated storage module 660.
Wherein, transactions requests obtain module 610, for obtaining the transactions requests in block chain network;
Transaction Information generation module 620 for generating Transaction Information according to the transactions requests, and is added in block;
Underlying transaction identifies generation module 630, for generating underlying transaction mark according to the Transaction Information being added in block
Know;
Operation result is added to by operation result generation module 640 for running the intelligent contract in the transactions requests
In block;
Appended transaction identifies generation module 650, attached for being generated according to the intelligent contract operation result being added in block
Add Transaction Identifier;
Transaction Identifier associated storage module 660, for underlying transaction mark and appended transaction to be identified associated storage
Into the Transaction Identifier array of the block.
The embodiment of the present invention obtains the transactions requests in module acquisition block chain network by transactions requests;Pass through number of transactions
Transaction Information is generated according to the transactions requests according to generation module to be added in block;By underlying transaction identify generation module according to
The Transaction Information being added in block generates underlying transaction mark;The intelligence in Transaction Information is run by operation result generation module
Energy contract, operation result is added in block;Generation module is identified by appended transaction to be produced according to intelligent contract operation result
Raw appended transaction mark;Underlying transaction mark and appended transaction associated storage is identified by Transaction Identifier associated storage module to arrive
In the Transaction Identifier array of block.By adopting the above technical scheme in store transaction data, it is contemplated that various forms of number of transactions
According to, introduce appended transaction mark, to be able to verify that the multiple portions stored in block chain when verifying Transaction Information
The case where Transaction Information content, suitable different form Transaction Information is verified.
Further, by the Transaction Identifier associated storage module 660, it is specifically used for:
Underlying transaction mark and appended transaction mark are continually stored in the Transaction Identifier array of the block, and
Presetting bit is set in appended transaction mark;Or
Underlying transaction mark and appended transaction mark are respectively stored into the Transaction Identifier array of the block, built
Found the index relative between the underlying transaction mark and appended transaction mark.
The storage device of block chain data provided by the embodiment of the present invention can be performed any embodiment of that present invention and be provided
Block chain data storage method, have execute block chain data the corresponding functional module of storage method and beneficial effect.
Embodiment seven
Fig. 7 is the hardware structural diagram for a kind of electronic equipment that the embodiment of the present invention seven provides.Fig. 7, which is shown, to be suitable for using
Come realize embodiment of the present invention example electronic device 12 block diagram.The electronic equipment 12 that Fig. 7 is shown is only one and shows
Example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 12 is showed in the form of universal computing device.The component of electronic equipment 12 may include
But be not limited to: one or more processor or processing unit 16, system storage 28, connect different system components (including
System storage 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be electric
The usable medium that sub- equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 30 and/or cache memory 32.Electronic equipment 12 may further include other removable/not removable
Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for read and write can not
Mobile, non-volatile magnetic media (Fig. 7 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 7, Ke Yiti
For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light
The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver
It can be connected by one or more data media interfaces with bus 18.Memory 28 may include that at least one program produces
Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform of the invention each
The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28
In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and
It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual
Execute the function and/or method in embodiment described in the invention.
Electronic equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.)
Communication, can also be enabled a user to one or more equipment interact with the electronic equipment 12 communicate, and/or with make the electricity
Any equipment (such as network interface card, modem etc.) that sub- equipment 12 can be communicated with one or more of the other calculating equipment
Communication.This communication can be carried out by input/output (I/O) interface 22.Also, electronic equipment 12 can also be suitable by network
Orchestration 20 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet)
Communication.As shown, network adapter 20 is communicated by bus 18 with other modules of electronic equipment 12.Although should be understood that
It is not shown in the figure, other hardware and/or software module can be used in conjunction with electronic equipment 12, including but not limited to: microcode is set
Standby driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup storage system
System etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and
Data processing, such as realize the verification method of block chain data provided by the embodiment of the present invention.
Embodiment eight
The embodiment of the invention provides another electronic equipment, the structural schematic diagram of the electronic equipment equally can be found in Fig. 7.
The difference of the embodiment of the present invention and embodiment seven is only that: processing unit 16 is stored in system storage by operation
Program in 28 thereby executing various function application and data processing, such as realizes block provided by the embodiment of the present invention
The storage method of chain data.
Embodiment nine
The embodiment of the present invention nine additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
For executing a kind of verification method of block chain data when program is executed by processor, this method comprises: to block chain network section
Point initiates Transaction Information acquisition request, and receives the Transaction Information of feedback;It is corresponding block-identified according to the Transaction Information, to
Block chain network node initiates Transaction Identifier array acquisition request, and obtains the Transaction Identifier array in block;From the affairs
It identifies and extracts underlying transaction mark and appended transaction mark in array;According to underlying transaction mark and appended transaction mark pair
The Transaction Information is verified.
The embodiment of the present invention nine additionally provides another computer readable storage medium, is stored thereon with computer program,
The storage method of block chain data provided by any embodiment of the present invention, this method packet are realized when the program is executed by processor
It includes: obtaining the transactions requests in block chain network;Transaction Information is generated according to the transactions requests, and is added in block;Root
Underlying transaction mark is generated according to the Transaction Information being added in block;The intelligent contract in the transactions requests is run, will be run
As a result it is added in block;Appended transaction mark is generated according to the intelligent contract operation result being added in block;By the base
Plinth Transaction Identifier and appended transaction mark associated storage are into the Transaction Identifier array of the block.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (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 this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (17)
1. a kind of verification method of block chain data characterized by comprising
Transaction Information acquisition request is initiated to block chain network node, and receives the Transaction Information of feedback;
It is corresponding block-identified according to the Transaction Information, Transaction Identifier array acquisition request is initiated to block chain network node,
And obtain the Transaction Identifier array in block;
Underlying transaction mark and appended transaction mark are extracted from the Transaction Identifier array;
The Transaction Information is verified according to underlying transaction mark and appended transaction mark.
2. the method according to claim 1, wherein described extract underlying transaction from the Transaction Identifier array
Mark and appended transaction mark, comprising:
It is identified based on the underlying transaction locally obtained and searches corresponding underlying transaction mark in the Transaction Identifier array, gone forward side by side
Row extracts;
It extracts from the Transaction Identifier array and is identified with appended transaction of the underlying transaction mark in relative position.
3. according to the method described in claim 2, it is characterized in that, described extract and the base from the Transaction Identifier array
Plinth Transaction Identifier is in the appended transaction mark of relative position, comprising:
The information undetermined that relative position is in underlying transaction mark is extracted from the Transaction Identifier array;
Determine the information undetermined for appended transaction mark based on the presetting bit content of the information undetermined.
4. according to the method described in claim 2, it is characterized in that, described extract and the base from the Transaction Identifier array
Plinth Transaction Identifier is in the appended transaction mark of relative position, comprising:
It is extracted from the Transaction Identifier array, the appended transaction mark with the memory space continuous position of underlying transaction mark
Know;Or
It is extracted from the Transaction Identifier array, there are the additional things of index relative with the storage location of underlying transaction mark
Business mark.
5. the method according to claim 1, wherein described corresponding block-identified according to the Transaction Information,
Transaction Identifier array acquisition request is initiated to block chain network node, and obtains the Transaction Identifier array in block, comprising:
It is corresponding block-identified according to the Transaction Information, block acquisition request is initiated to block chain network node, and receive anti-
The block of feedback;
Transaction Identifier array is extracted from the block.
6. the method according to claim 1, wherein further include:
It is corresponding block-identified according to the Transaction Information, block acquisition request is initiated to block chain network node;
According to locally obtain current block mark and it is previous block-identified, and feedback block current block mark and it is previous
It is block-identified, the block is verified.
7. -6 any method according to claim 1, which is characterized in that described to identify and add according to the underlying transaction
Transaction Identifier verifies the Transaction Information, comprising:
Hash calculation is carried out with the corresponding Transaction Identifier of determination, by the Transaction Identifier and base of calculating to the Transaction Information of feedback
Verifying is compared in plinth Transaction Identifier, with the correctness of the determination Transaction Information;
If it is determined that there are appended transaction marks, it is determined that the corresponding intelligent contract operation result of the Transaction Information exists
Where the Transaction Information in block.
8. according to the method described in claim 7, it is characterized by: the Transaction Information corresponds to the number of readable field form
Moneytary operations bill includes the intelligent contract of code segment form in the Transaction Information.
9. -6 any method according to claim 1, it is characterised in that: the executing subject of the method is block chain network
Lightweight node, the lightweight node is not stored or storage section block data and Transaction Information.
10. a kind of storage method of block chain data, which is characterized in that be applied to block and generate node, which comprises
Obtain the transactions requests in block chain network;
Transaction Information is generated according to the transactions requests, and is added in block;
Underlying transaction mark is generated according to the Transaction Information being added in block;
The intelligent contract in the transactions requests is run, operation result is added in block;
Appended transaction mark is generated according to the intelligent contract operation result being added in block;
By underlying transaction mark and appended transaction mark associated storage into the Transaction Identifier array of the block.
11. according to the method described in claim 10, it is characterized in that, described by underlying transaction mark and appended transaction mark
Associated storage is known into the Transaction Identifier array of the block, comprising:
Underlying transaction mark and appended transaction mark are continually stored in the Transaction Identifier array of the block, and attached
Add and presetting bit is set in Transaction Identifier;Or
Underlying transaction mark and appended transaction mark are respectively stored into the Transaction Identifier array of the block, institute is established
State the index relative between underlying transaction mark and appended transaction mark.
12. a kind of verifying device of block chain data characterized by comprising
Transaction Information obtains module, for initiating Transaction Information acquisition request to block chain network node, and receives the thing of feedback
Business data;
Transaction Identifier array obtains module, for corresponding block-identified according to the Transaction Information, to block chain network node
Transaction Identifier array acquisition request is initiated, and obtains the Transaction Identifier array in block;
Transaction Identifier extraction module, for extracting underlying transaction mark and appended transaction mark from the Transaction Identifier array;
Transaction Information authentication module, for being carried out according to underlying transaction mark and appended transaction mark to the Transaction Information
Verifying.
13. a kind of storage device of block chain data, which is characterized in that be configured at block and generate node, described device includes:
Transactions requests obtain module, for obtaining the transactions requests in block chain network;
Transaction Information generation module for generating Transaction Information according to the transactions requests, and is added in block;
Underlying transaction identifies generation module, for generating underlying transaction mark according to the Transaction Information being added in block;
Operation result is added in block by operation result generation module for running the intelligent contract in the transactions requests;
Appended transaction identifies generation module, for generating appended transaction mark according to the intelligent contract operation result being added in block
Know;
Transaction Identifier associated storage module, for underlying transaction mark and appended transaction to be identified associated storage to the area
In the Transaction Identifier array of block.
14. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as a kind of described in any item verification methods of block chain data of claim 1-9.
15. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
A kind of existing storage method of block chain data as described in claim 10 or 11.
16. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
A kind of such as claim 1-9 described in any item verification methods of block chain data are realized when execution.
17. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
A kind of storage method of block chain data as described in claim 10 or 11 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810662650.0A CN108961052B (en) | 2018-06-25 | 2018-06-25 | Verification method, storage method, device, equipment and medium of block chain data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810662650.0A CN108961052B (en) | 2018-06-25 | 2018-06-25 | Verification method, storage method, device, equipment and medium of block chain data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108961052A true CN108961052A (en) | 2018-12-07 |
CN108961052B CN108961052B (en) | 2022-02-22 |
Family
ID=64486489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810662650.0A Active CN108961052B (en) | 2018-06-25 | 2018-06-25 | Verification method, storage method, device, equipment and medium of block chain data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108961052B (en) |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109493057A (en) * | 2018-12-10 | 2019-03-19 | 联动优势科技有限公司 | A kind of method of commerce and device based on UTXO model |
CN109710695A (en) * | 2018-12-26 | 2019-05-03 | 百度在线网络技术(北京)有限公司 | The identification of transactions requests validity and initiating method, device, equipment and medium |
CN109766389A (en) * | 2019-01-09 | 2019-05-17 | 华东师范大学 | A kind of light client revene lookup method of block chain based on bitmap index |
CN109858914A (en) * | 2019-01-18 | 2019-06-07 | 深圳壹账通智能科技有限公司 | Block chain data verification method, device, computer equipment and readable storage medium storing program for executing |
CN109981673A (en) * | 2019-04-04 | 2019-07-05 | 上海人行道网络信息技术有限公司 | Data based on block chain deposit card method, apparatus, equipment and storage medium |
CN109981750A (en) * | 2019-03-06 | 2019-07-05 | 北京百度网讯科技有限公司 | Business process system, business data processing method and device |
CN110099108A (en) * | 2019-04-26 | 2019-08-06 | 深圳前海微众银行股份有限公司 | A kind of block chain event De-weight method, device, computer equipment and storage medium |
CN110147685A (en) * | 2019-04-04 | 2019-08-20 | 阿里巴巴集团控股有限公司 | Data verification method, system, device and equipment |
CN110310205A (en) * | 2019-06-28 | 2019-10-08 | 百度在线网络技术(北京)有限公司 | A kind of block chain data monitoring method, device, equipment and medium |
CN110363687A (en) * | 2019-07-12 | 2019-10-22 | 百度在线网络技术(北京)有限公司 | Recording method, device, electronic equipment, terminal and the medium of travel information |
CN110457396A (en) * | 2019-08-15 | 2019-11-15 | 北京北科融智云计算科技有限公司 | One kind being based on block chain scientific data processing method, device, equipment and storage medium |
CN110535970A (en) * | 2019-09-16 | 2019-12-03 | 百度在线网络技术(北京)有限公司 | The evidence of judicial chain deposits card and processing method, device, equipment and medium |
CN110781192A (en) * | 2019-10-30 | 2020-02-11 | 支付宝(杭州)信息技术有限公司 | Verification method, device and equipment of block chain data |
CN110808839A (en) * | 2019-10-30 | 2020-02-18 | 百度在线网络技术(北京)有限公司 | Processing method, device, equipment and medium for block chain abnormal data |
CN111212126A (en) * | 2019-12-27 | 2020-05-29 | 百度在线网络技术(北京)有限公司 | Data transmission method, device, equipment and medium of block chain network |
CN111339202A (en) * | 2020-02-28 | 2020-06-26 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN111339114A (en) * | 2020-02-28 | 2020-06-26 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN111695991A (en) * | 2019-03-14 | 2020-09-22 | 北京沃东天骏信息技术有限公司 | Contract processing method and device based on block, block chain node and storage medium |
TWI706352B (en) * | 2018-12-13 | 2020-10-01 | 香港商阿里巴巴集團服務有限公司 | Computer-implemented method, non-transitory computer-readable storage medium and system for protecting sensitive data stored on blockchain maintained by blockchain network |
US10917231B2 (en) | 2019-04-04 | 2021-02-09 | Advanced New Technologies Co., Ltd. | Data storage method, apparatus, system and device |
CN112560078A (en) * | 2020-08-05 | 2021-03-26 | 北京京东振世信息技术有限公司 | Block chain data processing method, device, equipment and medium |
US11055277B2 (en) | 2019-04-04 | 2021-07-06 | Advanced New Technologies Co., Ltd. | Integrity verification method, apparatus, and system and device for data in a blockchain-type ledger |
CN113935069A (en) * | 2021-12-10 | 2022-01-14 | 北京百度网讯科技有限公司 | Data verification method, device and equipment based on block chain and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104111957A (en) * | 2013-04-22 | 2014-10-22 | 阿里巴巴集团控股有限公司 | Method and system for synchronizing distributed transaction |
CN106682984A (en) * | 2016-10-27 | 2017-05-17 | 上海亿账通区块链科技有限公司 | Block chain-based transaction business processing method and system |
CN106951307A (en) * | 2017-03-06 | 2017-07-14 | 钱德君 | A kind of intelligent contract virtual machine realization method |
US20170213221A1 (en) * | 2016-01-26 | 2017-07-27 | Bank Of America Corporation | System for tracking and validation of multiple instances of an entity in a process data network |
CN107273556A (en) * | 2017-08-23 | 2017-10-20 | 上海点融信息科技有限责任公司 | Block chain data index method and equipment |
CN107360238A (en) * | 2017-07-25 | 2017-11-17 | 光载无限(北京)科技有限公司 | Intelligent contract gateway based on block chain CPOW common recognition algorithms |
CN107368259A (en) * | 2017-05-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus that business datum is write in the catenary system to block |
CN107464117A (en) * | 2017-08-04 | 2017-12-12 | 平安科技(深圳)有限公司 | Data managing method and block catenary system based on block chain |
CN107833060A (en) * | 2017-11-13 | 2018-03-23 | 中国银行股份有限公司 | The verification method and system of intelligent contract transaction in a kind of block chain |
CN107886006A (en) * | 2017-11-28 | 2018-04-06 | 北京博晨技术有限公司 | Data manipulation method, device and electronic equipment |
CN107977910A (en) * | 2017-12-04 | 2018-05-01 | 四川长虹电器股份有限公司 | A kind of educational background based on block chain signs and issues method and system |
CN108122159A (en) * | 2017-12-22 | 2018-06-05 | 中链科技有限公司 | A kind of factoring information processing method and system based on block chain |
-
2018
- 2018-06-25 CN CN201810662650.0A patent/CN108961052B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104111957A (en) * | 2013-04-22 | 2014-10-22 | 阿里巴巴集团控股有限公司 | Method and system for synchronizing distributed transaction |
US20170213221A1 (en) * | 2016-01-26 | 2017-07-27 | Bank Of America Corporation | System for tracking and validation of multiple instances of an entity in a process data network |
CN106682984A (en) * | 2016-10-27 | 2017-05-17 | 上海亿账通区块链科技有限公司 | Block chain-based transaction business processing method and system |
CN106951307A (en) * | 2017-03-06 | 2017-07-14 | 钱德君 | A kind of intelligent contract virtual machine realization method |
CN107368259A (en) * | 2017-05-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus that business datum is write in the catenary system to block |
CN107360238A (en) * | 2017-07-25 | 2017-11-17 | 光载无限(北京)科技有限公司 | Intelligent contract gateway based on block chain CPOW common recognition algorithms |
CN107464117A (en) * | 2017-08-04 | 2017-12-12 | 平安科技(深圳)有限公司 | Data managing method and block catenary system based on block chain |
CN107273556A (en) * | 2017-08-23 | 2017-10-20 | 上海点融信息科技有限责任公司 | Block chain data index method and equipment |
CN107833060A (en) * | 2017-11-13 | 2018-03-23 | 中国银行股份有限公司 | The verification method and system of intelligent contract transaction in a kind of block chain |
CN107886006A (en) * | 2017-11-28 | 2018-04-06 | 北京博晨技术有限公司 | Data manipulation method, device and electronic equipment |
CN107977910A (en) * | 2017-12-04 | 2018-05-01 | 四川长虹电器股份有限公司 | A kind of educational background based on block chain signs and issues method and system |
CN108122159A (en) * | 2017-12-22 | 2018-06-05 | 中链科技有限公司 | A kind of factoring information processing method and system based on block chain |
Cited By (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109493057A (en) * | 2018-12-10 | 2019-03-19 | 联动优势科技有限公司 | A kind of method of commerce and device based on UTXO model |
TWI706352B (en) * | 2018-12-13 | 2020-10-01 | 香港商阿里巴巴集團服務有限公司 | Computer-implemented method, non-transitory computer-readable storage medium and system for protecting sensitive data stored on blockchain maintained by blockchain network |
US11003646B2 (en) | 2018-12-13 | 2021-05-11 | Advanced New Technologies Co., Ltd. | Data isolation in a blockchain network |
CN109710695A (en) * | 2018-12-26 | 2019-05-03 | 百度在线网络技术(北京)有限公司 | The identification of transactions requests validity and initiating method, device, equipment and medium |
CN109766389A (en) * | 2019-01-09 | 2019-05-17 | 华东师范大学 | A kind of light client revene lookup method of block chain based on bitmap index |
CN109858914A (en) * | 2019-01-18 | 2019-06-07 | 深圳壹账通智能科技有限公司 | Block chain data verification method, device, computer equipment and readable storage medium storing program for executing |
CN109981750A (en) * | 2019-03-06 | 2019-07-05 | 北京百度网讯科技有限公司 | Business process system, business data processing method and device |
US11521176B2 (en) | 2019-03-06 | 2022-12-06 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Service flow system and service data processing method and apparatus |
CN109981750B (en) * | 2019-03-06 | 2021-09-17 | 北京百度网讯科技有限公司 | Business process system, business data processing method and device |
CN111695991A (en) * | 2019-03-14 | 2020-09-22 | 北京沃东天骏信息技术有限公司 | Contract processing method and device based on block, block chain node and storage medium |
CN111695991B (en) * | 2019-03-14 | 2024-02-06 | 北京沃东天骏信息技术有限公司 | Block-based contract processing method and device, block chain node and storage medium |
CN109981673A (en) * | 2019-04-04 | 2019-07-05 | 上海人行道网络信息技术有限公司 | Data based on block chain deposit card method, apparatus, equipment and storage medium |
CN109981673B (en) * | 2019-04-04 | 2021-10-08 | 上海人行道网络信息技术有限公司 | Block chain-based data evidence storage method, device, equipment and storage medium |
US11055277B2 (en) | 2019-04-04 | 2021-07-06 | Advanced New Technologies Co., Ltd. | Integrity verification method, apparatus, and system and device for data in a blockchain-type ledger |
CN110147685A (en) * | 2019-04-04 | 2019-08-20 | 阿里巴巴集团控股有限公司 | Data verification method, system, device and equipment |
US10917231B2 (en) | 2019-04-04 | 2021-02-09 | Advanced New Technologies Co., Ltd. | Data storage method, apparatus, system and device |
CN110147685B (en) * | 2019-04-04 | 2020-10-23 | 创新先进技术有限公司 | Data verification method, system, device and equipment |
CN110099108B (en) * | 2019-04-26 | 2022-04-01 | 深圳前海微众银行股份有限公司 | Block chain event duplicate removal method and device, computer equipment and storage medium |
CN110099108A (en) * | 2019-04-26 | 2019-08-06 | 深圳前海微众银行股份有限公司 | A kind of block chain event De-weight method, device, computer equipment and storage medium |
CN110310205B (en) * | 2019-06-28 | 2022-02-25 | 百度在线网络技术(北京)有限公司 | Block chain data monitoring method, device, equipment and medium |
CN110310205A (en) * | 2019-06-28 | 2019-10-08 | 百度在线网络技术(北京)有限公司 | A kind of block chain data monitoring method, device, equipment and medium |
CN110363687A (en) * | 2019-07-12 | 2019-10-22 | 百度在线网络技术(北京)有限公司 | Recording method, device, electronic equipment, terminal and the medium of travel information |
CN110457396A (en) * | 2019-08-15 | 2019-11-15 | 北京北科融智云计算科技有限公司 | One kind being based on block chain scientific data processing method, device, equipment and storage medium |
CN110535970A (en) * | 2019-09-16 | 2019-12-03 | 百度在线网络技术(北京)有限公司 | The evidence of judicial chain deposits card and processing method, device, equipment and medium |
CN110535970B (en) * | 2019-09-16 | 2022-04-12 | 百度在线网络技术(北京)有限公司 | Evidence storing and processing method, device, equipment and medium of judicial chain |
CN110808839A (en) * | 2019-10-30 | 2020-02-18 | 百度在线网络技术(北京)有限公司 | Processing method, device, equipment and medium for block chain abnormal data |
CN110781192A (en) * | 2019-10-30 | 2020-02-11 | 支付宝(杭州)信息技术有限公司 | Verification method, device and equipment of block chain data |
CN110808839B (en) * | 2019-10-30 | 2022-07-12 | 百度在线网络技术(北京)有限公司 | Processing method, device, equipment and medium for block chain abnormal data |
CN111212126A (en) * | 2019-12-27 | 2020-05-29 | 百度在线网络技术(北京)有限公司 | Data transmission method, device, equipment and medium of block chain network |
CN111339114A (en) * | 2020-02-28 | 2020-06-26 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN111339202A (en) * | 2020-02-28 | 2020-06-26 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN111339202B (en) * | 2020-02-28 | 2023-05-09 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN111339114B (en) * | 2020-02-28 | 2023-05-09 | 百度在线网络技术(北京)有限公司 | Data access method, device, equipment and storage medium |
CN112560078A (en) * | 2020-08-05 | 2021-03-26 | 北京京东振世信息技术有限公司 | Block chain data processing method, device, equipment and medium |
CN112560078B (en) * | 2020-08-05 | 2024-05-17 | 北京京东振世信息技术有限公司 | Block chain data processing method, device, equipment and medium |
CN113935069A (en) * | 2021-12-10 | 2022-01-14 | 北京百度网讯科技有限公司 | Data verification method, device and equipment based on block chain and storage medium |
CN113935069B (en) * | 2021-12-10 | 2022-04-05 | 北京百度网讯科技有限公司 | Data verification method, device and equipment based on block chain and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108961052B (en) | 2022-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108961052A (en) | Verification method, storage method, device, equipment and the medium of block chain data | |
CN110365491B (en) | Service processing method, device, equipment, storage medium and data sharing system | |
CN110601956B (en) | Content aggregation method and device, computer equipment and storage medium | |
CN108960797B (en) | Block generation and verification method, device, equipment and storage medium | |
CN109951547B (en) | Transaction request parallel processing method, device, equipment and medium | |
CN109542888A (en) | The data modification and synchronous method of block chain, device, equipment and storage medium | |
CN109360101A (en) | A kind of block chain transaction processing method, device, equipment and medium | |
CN108509615B (en) | Consensus establishing method and device based on drawing mechanism and readable storage medium | |
CN109981297A (en) | Block chain processing method, device, equipment and storage medium | |
CN109951546A (en) | Transactions requests processing method, device, equipment and medium based on intelligent contract | |
CN109101664A (en) | A kind of data transmission method, device, equipment and the medium of lightweight node | |
CN109002349A (en) | Application program exchange method, implementation method, device, equipment and medium | |
CN107465698A (en) | A kind of data verification method and server | |
CN109194669A (en) | A kind of data transmission method, device, equipment and the medium of lightweight node | |
CN107623865A (en) | A kind of data verification method and server | |
CN107682328A (en) | A kind of data verification method and client | |
CN108650289A (en) | A kind of method and apparatus of the management data based on block chain | |
CN110597922A (en) | Data processing method, device, terminal and storage medium | |
CN110708358A (en) | Session message processing method, electronic device and computer-readable storage medium | |
CN108600250A (en) | Authentication method | |
CN110910143A (en) | Identity identification generation method, device, related node and medium | |
CN106470200A (en) | A kind of auth method and relevant apparatus | |
US11221894B2 (en) | Event execution method, device, and system | |
CN110505276B (en) | Object matching method, device and system, electronic equipment and storage medium | |
CN110532810B (en) | Information processing method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |