CN108171601A - Block chain tracing methods, devices and systems - Google Patents
Block chain tracing methods, devices and systems Download PDFInfo
- Publication number
- CN108171601A CN108171601A CN201611112091.3A CN201611112091A CN108171601A CN 108171601 A CN108171601 A CN 108171601A CN 201611112091 A CN201611112091 A CN 201611112091A CN 108171601 A CN108171601 A CN 108171601A
- Authority
- CN
- China
- Prior art keywords
- block
- spanning tree
- address
- record
- resource
- 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
Abstract
The invention discloses a kind of block chain tracing methods, devices and systems, are related to big data field.Method therein includes:Order traversal block chain is generated according to block;The resource transfers record of block chain is mapped to multiple servers by the address based on each block, and wherein address includes input address or output address;Each server shifts record according to the block resource of mapping storage and builds sub- spanning tree set;The sub- spanning tree set merging processing of each server construction is built into spanning tree, so as to fulfill the tracing to block chain.The present invention can solve the performance issue that unit traces to the source to mass data, improve the efficiency that block chain is traced to the source.
Description
Technical field
The present invention relates to big data field more particularly to a kind of block chain tracing methods, devices and systems.
Background technology
Block chain technology using bit coin as representative increasingly attracts attention recently, in numerous necks such as finance, logistics, notarization
Domain is widely used.Due to anonymity feature possessed by block chain, while secret protection is improved, the transfer of assets also becomes
It must be difficult to track, also easily become the tool of undesirable's money laundering, black market bargain.Block chain is traced to the source as the important of trade management
One of means, meanwhile, in supply chain management, the important choosing that the fields such as product safety monitoring also become mechanism or government safety is supervised
It selects.
Existing block chain source tracing method mainly repeatedly traverses entire block chain, structure by the generation order according to block
It builds expenditure and takes in spanning tree and obtain the entire transfer record of assets.But this method is a sequence due to the foundation of spanning tree
Series process is required for entire block chain traversal primary every time, can not multithreading/multiprocessors parallel processing, be unsuitable for future
Mass data is traced to the source, and is easily become bottleneck by single machine memory, processor energy power limit when large-scale data amount.
In addition, the generation of each new child node of existing method, all relies on the traversal to entire former block chain to obtain, builds spanning tree
Time complexity be O (NN), the time cost that assets are traced to the source is too high.And the assets remaining sum for address of tracing to the source calculates, and needs to distinguish
Traversal 2 spanning trees of receipts and expenditures can just obtain, and efficiency is too low.
Invention content
The invention solves a technical problem be to provide a kind of block chain tracing methods, devices and systems can
The performance issue that unit traces to the source to mass data is solved, improves the efficiency that block chain is traced to the source.
According to an aspect of the present invention, a kind of block chain tracing method is proposed, including:Order traversal is generated according to block
Block chain;The resource transfers record of block chain is mapped to multiple servers by the address based on each block, and wherein address includes defeated
Enter address or output address;Each server shifts record according to the block resource of mapping storage and builds sub- spanning tree set;It will
The sub- spanning tree set merging processing structure spanning tree of each server construction, so as to fulfill the tracing to block chain.
Further, each server shifts record according to the block resource of mapping storage and builds sub- spanning tree set packet
It includes:Each server obtains root node of any address as sub- spanning tree from the block resource transfer record of mapping storage;Time
The block resource transfer record of block map storage is gone through, according to the pass between the address of the block resource of mapping storage transfer record
System, generates the tree node of sub- spanning tree, until the address conduct of the block resource transfer record of the mapping storage of generation block will be created
The leaf node of sub- spanning tree;Each sub- spanning tree is merged into the sub- spanning tree set of generation.
Further, the processing of the sub- spanning tree set merging of each server construction is built into spanning tree, so as to fulfill to area
The tracing of block chain includes:To treat root node of the tracing address as spanning tree, by the sub- spanning tree of each server construction
Set merging processing structure spanning tree;Spanning tree is traversed, obtains the resource transfers historical record for treating tracing address.
Further, it further includes:The resource transfers record of block chain is mapped to by multiple clothes based on the output address of block
Business device;Each server calculates the surplus of the block resource transfer record of mapping storage respectively;More than each server is calculated
Amount carries out merger processing, obtains the resource excess for treating tracing address.
Further, each server calculate respectively mapping storage block resource transfer record surplus include:It is each
Server respectively verifies the block resource of mapping storage transfer record;If in the block resource transfer record of mapping storage
Including input address and output address, then the block resource transfer record surplus of mapping storage for input surplus and output surplus it
With;If only including input address in the block resource transfer record of mapping storage, the block resource transfer record of mapping storage
Surplus is input surplus;If only include output address, the block of mapping storage in the block resource transfer record of mapping storage
Resource transfers record surplus is output surplus.
According to another aspect of the present invention, it is also proposed that a kind of block chain tracing device, including:Record map unit,
For generating order traversal block chain according to block, the address based on each block maps to the resource transfers record of block chain more
A server, wherein address include input address or output address;Spanning tree construction unit, for receiving from each server
Sub- spanning tree set, sub- spanning tree set builds sub- spanning tree set according to transfer record block by server and generates, by each clothes
The sub- spanning tree set merging processing structure spanning tree of business device structure;Tracing unit is used to implement and traces to the source block chain
Tracking.
Further, spanning tree construction unit is used for treat root node of the tracing address as spanning tree, by each service
The sub- spanning tree set merging processing structure spanning tree of device structure;Tracing unit obtains for traversing spanning tree and waits to trace to the source
The resource transfers historical record of track address.
Further, resource excess computing unit is further included;Recording map unit will for the output address based on block
The resource transfers record of block chain maps to multiple servers;Resource excess computing unit is for reception from each server
The surplus of the block resource transfer record of the mapping storage of calculating, the surplus that each server is calculated carry out merger processing, obtain
Take the resource excess for treating tracing address.
According to another aspect of the present invention, it is also proposed that a kind of block chain tracing system, including multiple servers and upper
The block chain tracing device stated;Each server is used to obtain any address from the block resource transfer record of mapping storage
Root node as sub- spanning tree;The block resource transfer record of block map storage is traversed, is provided according to the block of mapping storage
Relationship between the address of source transfer record, generates the tree node of sub- spanning tree, until the area of the mapping storage of generation block will be created
Leaf node of the address of block resource transfers record as sub- spanning tree;Each sub- spanning tree is merged into the sub- spanning tree collection of generation
It closes.
Further, each server is additionally operable to calculate the surplus of the block resource transfer record of mapping storage respectively.
Further, each server is additionally operable to respectively verify the block resource of mapping storage transfer record;If
The block resource transfer record of mapping storage includes input address and output address, then the block resource transfer note of mapping storage
Surplus is recorded as the sum of input surplus and output surplus;If only including input address in the block resource transfer record of mapping storage,
Then the block resource transfer record surplus of mapping storage is input surplus;If it is only wrapped in the block resource transfer record of mapping storage
Output address is included, then the block resource transfer record surplus of mapping storage is output surplus.
Compared with prior art, the present invention is based on thoughts of dividing and ruling, and record resource transfers according to the address of each block and map
To multiple servers, each server builds sub- spanning tree set parallel, and sub- spanning tree set is carried out merger processing and realizes life
The structure of Cheng Shu so as to fulfill the tracing to block chain, solves the performance issue that unit traces to the source to mass data, improves
The efficiency that block chain is traced to the source.In addition, when spanning tree is built, the generation of each new child node, it is only necessary to from the block chain of segmentation
It is searched in data interval, reduces ergodic data amount, reduce time cost.
By referring to the drawings to the detailed description of exemplary embodiment of the present invention, other feature of the invention and its
Advantage will become apparent.
Description of the drawings
The attached drawing of a part for constitution instruction describes the embodiment of the present invention, and is used to solve together with the description
Release the principle of the present invention.
With reference to attached drawing, according to following detailed description, the present invention can be more clearly understood, wherein:
Fig. 1 is the flow diagram of one embodiment of block chain tracing method of the present invention.
Fig. 2 is the flow diagram of one embodiment of each sub- spanning tree set of server construction of the present invention.
Fig. 3 is the flow diagram of another embodiment of block chain tracing method of the present invention.
Fig. 4 is the flow diagram of the further embodiment of block chain tracing method of the present invention.
Fig. 5 is the schematic diagram of one embodiment of block chain of the present invention.
Fig. 6 is the schematic diagram of one embodiment of present invention income spanning tree.
Fig. 7 is the flow diagram of one embodiment of address assets remaining sum computational methods of the invention of tracing to the source.
Fig. 8 is the schematic diagram of another embodiment of address assets remaining sum computational methods of the invention of tracing to the source.
Fig. 9 is the structure diagram of one embodiment of block chain tracing device of the present invention.
Figure 10 is the structure diagram of another embodiment of block chain tracing device of the present invention.
Figure 11 is the structure diagram of one embodiment of block chain tracing system of the present invention.
Specific embodiment
Carry out the various exemplary embodiments of detailed description of the present invention now with reference to attached drawing.It should be noted that:Unless in addition have
Body illustrates that the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
The range of invention.
Simultaneously, it should be appreciated that for ease of description, the size of the various pieces shown in attached drawing is not according to reality
Proportionate relationship draw.
It is illustrative to the description only actually of at least one exemplary embodiment below, is never used as to the present invention
And its application or any restrictions that use.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
In shown here and discussion all examples, any occurrence should be construed as merely illustrative, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need to that it is further discussed.
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference
Attached drawing, the present invention is described in more detail.
Fig. 1 is the flow diagram of one embodiment of block chain tracing method of the present invention.This method includes following
Step:
In step 110, order traversal block chain is generated according to block.When system is by a certain block chain for treating tracing
Behind address, according to the order that block generates, entire block chain is traversed.Wherein, block chain is according to generation time by different blocks
It once links, each block is made of block head and block body.Block head include previous block root cryptographic Hash, timestamp,
Random number etc..Block body includes all resource transfers record information in current block.Every resource transfers record is comprising preceding primary
Transinformation and next bit owner address (public key address).One public key address can have multiple input and output, each defeated
Enter and all correspond to previous output.
In step 120, the resource transfers record of block chain is mapped to multiple servers by the address based on each block.Example
Such as, according to input address in block or output address, by resource transfers record, mapping is distributed to different servers respectively, each
Server includes the block resource transfer record of a mapping storage.
In step 130, each server shifts record according to the block resource of mapping storage and builds sub- spanning tree set.Each clothes
Business device can build the sub- spanning tree set of input or the sub- spanning tree set of output parallel.
In step 140, the sub- spanning tree set merging processing of each server construction is built into spanning tree, so as to fulfill to area
The tracing of block chain.For example, using address to be traced to the source as the root node of spanning tree, by the sub- spanning tree set of each server into
Row merger is handled, and is built based on the resource transfers historical record for treating tracing address.
In this embodiment, based on thought of dividing and ruling, resource transfers record is mapped to by multiple clothes according to the address of each block
Business device, each server build sub- spanning tree set parallel, and sub- spanning tree set is carried out to the structure of merger processing realization spanning tree
It builds, so as to fulfill the tracing to block chain, which can adapt to map-reduce frameworks, solve unit to magnanimity
The performance issue that data are traced to the source improves the efficiency that block chain is traced to the source.In addition, when spanning tree is built, the life of each new child node
Into, it is only necessary to it is searched out of segmentation block chain data interval, reduces ergodic data amount, reduce time cost.
Fig. 2 is the flow diagram of one embodiment of each sub- spanning tree set of server construction of the present invention.This method packet
Include following steps:
In step 210, it is raw as son that each server obtains any address from the block resource transfer record of mapping storage
The root node of Cheng Shu.
In step 220, the block resource transfer record of Ergodic Maps storage is shifted according to the block resource of mapping storage and is remembered
Relationship between the address of record generates the tree node of sub- spanning tree.For example, traversal block record, by it is all using root node as
First layer tree node of the transfer record of the direct target of resource transfers as sub- spanning tree;It traverses again, by all with first layer
Tree node is recorded as the transfer of the direct target of resource transfers as new second layer tree node, and node direction is corresponding
First layer tree node records, and so on, determine each layer tree node.
In step 230, the address of block resource transfer record of the mapping storage of generation block will be created as sub- spanning tree
Leaf node has built a stalk spanning tree at this time.
In step 240, each sub- spanning tree is merged into the sub- spanning tree set of generation.After having built a stalk spanning tree,
Appoint again from the block resource of remaining mapping storage transfer record and take an address, as the root node of a new stalk spanning tree,
Step 220~230 are repeated, until the block resource transfer record of all mapping storages is all generated sub- spanning tree, and will be each
Sub- spanning tree merges the sub- spanning tree set of generation.
In this embodiment, each server can with the sub- spanning tree of parallel generation, in the tree node for generating sub- spanning tree,
It only needs to traverse out of segmentation block chain data interval, reduces ergodic data amount, reduce time cost.
Fig. 3 is the flow diagram of another embodiment of block chain tracing method of the present invention.This method include with
Lower step:
In step 310, order traversal block chain is generated according to block.Since current block, order is generated according to block,
Traverse entire block chain.
In step 320, the resource transfers record of block chain is mapped to by multiple servers based on the output address of block,
In, each server includes the block resource transfer record of a mapping storage.
In step 330, each server calculates the surplus of the block resource transfer record of mapping storage respectively.Wherein, each clothes
Being engaged in device can be respectively to the block resource of mapping storage transfer record progress authenticity verification, such as carry out signature check, and count
Calculate the surplus of the block resource transfer record of each mapping storage.If it for example, is wrapped in the block resource transfer record of mapping storage
Include input address and output address, then mapping storage block resource transfer record surplus for input surplus with output surplus it
With;If only including input address in the block resource transfer record of mapping storage, the block resource transfer record of mapping storage
Surplus is input surplus;If only include output address, the block of mapping storage in the block resource transfer record of mapping storage
Resource transfers record surplus is output surplus.
In step 340, the surplus that each server is calculated carries out merger processing, obtains more than the resource for treating tracing address
Amount.Merger processing is carried out to each server three classes address surplus set by address, calculates each address total resources surplus, and then obtain
Treat the resource excess of tracing address.
In this embodiment, based on thought of dividing and ruling, resource transfers record mapped to according to the output address of each block more
A server, each server to the block resource of mapping storage transfer record by carrying out surplus calculating, by address by each surplus
Set carries out merger processing, realizes that the resource excess of quickly address to be traced to the source calculates.The present embodiment do not need to structure input and
The resource excess that output spanning tree can be achieved with address to be traced to the source calculates so that surplus calculating process is more convenient.
The present invention can be used for the fields such as the transaction supervision, audit, anti money washing of large-scale financial institution or platform block chain finance,
Tracking and enterprise, mechanism or government to illegal usage behavior and illegal user is to necks such as supply chain management, food securities
The product traceability and security control in domain, the present invention will be described by taking the application in financial field as an example below.
Fig. 4 is the flow diagram of the further embodiment of block chain tracing method of the present invention.
In step 410, system receive it is a certain behind the block chain address of tracing, according to block generate order, time
Go through entire block chain.Wherein, block chain is as shown in figure 5, once linked according to generation time by different blocks, Mei Gequ
Block is made of block head and block body.Block head includes previous block root cryptographic Hash, timestamp, random number etc..Block body includes
All transaction in assets transfer record information in current block.Every transaction record includes a preceding Transaction Information and next bit owns
Person address (public key address).One public key address can have more expenditures and income, every income all to correspond to previous expenditure.
In step 420, according to traversing result, by the difference that address is taken in block, assets transfer record is mapped respectively
It is distributed to different server M1, M2 ... Mn.
In step 430, parallel structure takes in spanning tree set C1, C2 ... .Cm to each server respectively.For example, from assets
Appoint in transfer record and take an income address as son income spanning-tree root node;Block record is traversed, is made all with root node
First layer tree node of the transaction record as son income spanning tree for the direct target of assets transfer;Traverse again, by it is all with
First layer tree node is directed toward as the transaction record of the direct target of assets transfer as new second layer tree node, and by the node
Corresponding first layer tree node record;And so on, until wound generation block record becomes all leaf nodes, stalk income generation
Tree structure is completed;Obtained son income spanning tree is put into set Ci, is appointed again with taking an income from surplus assets transfer record
Location takes in spanning-tree root node as a new stalk, repeats the above steps;Until assets transfer record all generates son income
Spanning tree is put into set Ci.
In step 440, using address to be traced to the source as income spanning-tree root node, by all sub- income spanning trees of each server
Set Ci carries out merger processing, builds the income spanning tree based on address to be traced to the source.For example, as shown in fig. 6, owner J and institute
The person of having L is first layer tree node, they are pointing directly at root node, these assets transfers record represents these owners directly will money
Production has been transferred to address to be traced to the source, and is the most direct assets revenue source of address to be traced to the source.
In step 450, the income spanning tree traversed, the assets transfer history for obtaining the address for treating tracing is remembered
Record.
In this embodiment, pass through different income address section mapping divisions and parallel processing and sub- spanning tree set
The merging treatment of Ci realizes the parallel structure of income/expenditure spanning tree.Map-reduce frameworks are adapted to, solve unit pair
The performance issue that mass data is traced to the source.In addition, when spanning tree is built, the generation of each new child node, it is only necessary to from the area of segmentation
It is searched in block chain data interval, reduces ergodic data amount, reduce time cost.
Fig. 7 is the flow diagram of one embodiment of address assets remaining sum computational methods of the invention of tracing to the source.
In step 710, the address assets for treating tracing are initialized as 0.
In step 720, since current block, order is generated according to block, traverses entire block chain.
In step 730, according to traversing result, by expenditure address of cache into different sections, the transaction in assets of block chain is recorded
Correspondence is distributed to each server M1, M2 ... .Mn, can be as shown in Figure 8 in concrete application.
In step 740, each server carries out authenticity verification to transaction record respectively, calculates in each transaction and pays address
Remaining sum.Wherein, the remaining sum after all amounts paid is deducted in expenditure address.
In step 750, according to as a result, calculating accumulative address remaining sum.Wherein, there is the ground of expenditure again if any existing income
Location, remaining sum=all expenditures remaining sum+all incomes remaining sum;If the only address of income, remaining sum=all incomes remaining sum;
If the only address of expenditure, remaining sum=all expenditures remaining sum.
In step 760, merger is carried out to each 3 class address transactions balances set of server by address, each address is calculated and always provides
Produce remaining sum.
In step 770, lookup obtains the assets remaining sum of address to be traced to the source.
In this embodiment, based on thought of dividing and ruling, assets transfer record mapped to according to the output address of each block more
Each remaining sum set is carried out merger by a server, each server by carrying out remaining sum calculating to assets transfer record block, by address
Processing realizes that the assets remaining sum of quickly address to be traced to the source calculates.The present embodiment does not need to structure receipts and expenditures spanning tree just
It can realize that the assets remaining sum of address to be traced to the source calculates so that remaining sum calculating process is more convenient.
Fig. 9 is the structure diagram of one embodiment of block chain tracing device of the present invention.The system includes record
Map unit 910, spanning tree construction unit 920 and tracing unit 930, wherein:
It records map unit 910 to be used to generate order traversal block chain according to block, the address based on each block is by block
The resource transfers record of chain maps to multiple servers.When system by it is a certain after the block chain address of tracing after, record
The order that map unit 910 is generated according to block traverses entire block chain.It, will according to input address in block or output address
Mapping is distributed to different servers to resource transfers record respectively, and the block resource that each server includes a mapping storage turns
Move record.
Spanning tree construction unit 930 is for receiving the sub- spanning tree set from each server, by each server construction
Sub- spanning tree set merging processing structure spanning tree, such as using address to be traced to the source as the root node of spanning tree, by each service
The sub- spanning tree set of device carries out merger processing.Wherein, server shifts record structure according to the block resource of mapping storage
Spanning tree set.Each server can build the sub- spanning tree set of input or the sub- spanning tree set of output parallel.For example, from mapping
Root node of any address as sub- spanning tree is obtained in the block resource transfer record of storage;Traverse the area of block map storage
Block resource transfers record, and according to the relationship between the address of the block resource of mapping storage transfer record, generate sub- spanning tree
Tree node, until leaf node of the address of the block resource transfer record of the mapping storage of generation block as sub- spanning tree will be created;
Each sub- spanning tree is merged into the sub- spanning tree set of generation.
Tracing unit 930 is used to implement the tracing to block chain, for example, traversing the spanning tree, is treated
The resource transfers historical record of tracing address.
In this embodiment, based on thought of dividing and ruling, resource transfers record is mapped to by multiple clothes according to the address of each block
Business device, each server build sub- spanning tree set parallel, and sub- spanning tree set is carried out to the structure of merger processing realization spanning tree
It builds, so as to fulfill the tracing to block chain, which can adapt to map-reduce frameworks, solve unit to magnanimity
The performance issue that data are traced to the source, in addition, when spanning tree is built, the generation of each new child node, it is only necessary to from the block chain of segmentation
It is searched in data interval, reduces ergodic data amount, reduce time cost.
Figure 10 is the structure diagram of another embodiment of block chain tracing device of the present invention.The system includes note
Map unit 1010 and resource excess computing unit 1020 are recorded, wherein:
It records map unit 1010 to be used to generate order traversal block chain according to block, based on the output address of block by area
The resource transfers record of block chain maps to multiple servers.For example, since current block, order, traversal are generated according to block
The resource transfers record of block chain is mapped to multiple servers by entire block chain based on the output address of block.Resource excess
Computing unit 1020, will for receiving the surplus of the block resource of the mapping storage of the calculating from each server transfer record
The surplus that each server calculates carries out merger processing, obtains the resource excess for treating tracing address.By address to each server
Three classes address surplus set carries out merger processing, calculates each address total resources surplus, and then obtain the money for treating tracing address
Source surplus.Wherein, each server calculates the surplus of the block resource transfer record of mapping storage respectively.For example, each server can
Authenticity verification is carried out, such as carry out signature check to shift record to the block resource of mapping storage respectively, and calculated each
The surplus of the block resource transfer record of mapping storage.
In this embodiment, based on thought of dividing and ruling, resource transfers record mapped to according to the output address of each block more
A server, each server to the block resource of mapping storage transfer record by carrying out surplus calculating, by address by each surplus
Set carries out merger processing, realizes that the resource excess of quickly address to be traced to the source calculates.The present embodiment do not need to structure input and
The resource excess that output spanning tree can be achieved with address to be traced to the source calculates so that surplus calculating process is more convenient.
Figure 11 is the structure diagram of one embodiment of block chain tracing system of the present invention.The system includes block
Chain tracing device 1110 and multiple servers 1120, wherein, block chain tracing device 1110 is in above-described embodiment
In be described in detail, do not illustrate further herein.Server 1120 is used to receive block chain tracing device
1110 are shifted the block resource of multiple mapping storages of the resource transfers record mapping of block chain based on the output address of block
After record, record is shifted according to the block resource of mapping storage and builds sub- spanning tree set, so that sub- spanning tree set is sent
To block chain tracing device 1110, so as to which block chain tracing device 1110 be made to realize the tracing to block chain.
Each server can build the sub- spanning tree set of input or the sub- spanning tree set of output parallel.For example, the block from mapping storage
Root node of any address as sub- spanning tree is obtained in resource transfers record;Traverse the block resource transfer of block map storage
Record according to the relationship between the address of the block resource of mapping storage transfer record, generates the tree node of sub- spanning tree, until
Leaf node of the address as sub- spanning tree of the block resource transfer record of the mapping storage of generation block will be created;By each sub- spanning tree
Merge the sub- spanning tree set of generation.
In this embodiment, based on thought of dividing and ruling, resource transfers record is mapped to by multiple clothes according to the address of each block
Business device, each server build sub- spanning tree set parallel, and sub- spanning tree set is carried out to the structure of merger processing realization spanning tree
It builds, so as to fulfill the tracing to block chain, which can adapt to map-reduce frameworks, solve unit to magnanimity
The performance issue that data are traced to the source, in addition, when spanning tree is built, the generation of each new child node, it is only necessary to from the block chain of segmentation
It is searched in data interval, reduces ergodic data amount, reduce time cost.
In another embodiment of the present invention, server 1120 is additionally operable to calculate the block resource turn of mapping storage respectively
The surplus of record is moved, and the surplus of the block resource transfer record of the mapping storage of calculating is sent to block chain tracing dress
1110 are put, so that the surplus that block chain tracing device 1110 calculates each server carries out merger processing, obtains and waits to trace to the source
The resource excess of track address.Wherein, each server can shift record to the block resource of mapping storage respectively and carry out really
Property verification, such as carry out signature check, and calculate the surplus of the block resource transfer record of each mapping storage.
In this embodiment, based on thought of dividing and ruling, resource transfers record mapped to according to the output address of each block more
A server, each server to the block resource of mapping storage transfer record by carrying out surplus calculating, by address by each surplus
Set carries out merger processing, realizes that the resource excess of quickly address to be traced to the source calculates.The present embodiment causes surplus calculating process
It is more convenient.
So far, the present invention is described in detail.In order to avoid the design of the masking present invention, it is public that this field institute is not described
Some details known.Those skilled in the art as described above, can be appreciated how to implement technology disclosed herein completely
Scheme.
The method and device of the present invention may be achieved in many ways.For example, can by software, hardware, firmware or
Person's software, hardware, firmware any combinations come realize the present invention method and device.The step of for the method it is above-mentioned
Sequence is merely to illustrate, and the step of method of the invention is not limited to sequence described in detail above, unless with other sides
Formula illustrates.In addition, in some embodiments, the present invention can be also embodied as recording program in the recording medium, these
Program includes being used to implement machine readable instructions according to the method for the present invention.Thus, the present invention also covering stores to perform
The recording medium of program according to the method for the present invention.
Although some specific embodiments of the present invention are described in detail by example, the skill of this field
Art personnel it should be understood that above example merely to illustrating, the range being not intended to be limiting of the invention.The skill of this field
Art personnel are it should be understood that can without departing from the scope and spirit of the present invention modify to above example.This hair
Bright range is defined by the following claims.
Claims (11)
- A kind of 1. block chain tracing method, which is characterized in that including:Order traversal block chain is generated according to block;The resource transfers record of the block chain is mapped to multiple servers, wherein described address packet by the address based on each block Include input address or output address;Each server shifts record according to the block resource of mapping storage and builds sub- spanning tree set;By the sub- spanning tree set merging processing structure spanning tree of each server construction, trace back so as to fulfill to the block chain It tracks in source.
- 2. according to the method described in claim 1, it is characterized in that, each server is shifted according to the block resource of mapping storage Record builds sub- spanning tree set and includes:Each server obtains root node of any address as sub- spanning tree from the block resource transfer record of mapping storage;The block resource transfer record of block map storage is traversed, according to the ground of the block resource of mapping storage transfer record Relationship between location, generates the tree node of the sub- spanning tree, until the block resource transfer of the mapping storage of generation block will be created Leaf node of the address of record as the sub- spanning tree;Each sub- spanning tree is merged into the sub- spanning tree set of generation.
- 3. according to the method described in claim 1, it is characterized in that, the sub- spanning tree set merging of each server construction is handled Spanning tree is built, is included so as to fulfill the tracing to the block chain:To treat root node of the tracing address as spanning tree, the sub- spanning tree set merging of each server construction is handled into structure The spanning tree;The spanning tree is traversed, obtains the resource transfers historical record for treating tracing address.
- 4. according to any methods of claim 1-3, which is characterized in that further include:The resource transfers record of the block chain is mapped to by multiple servers based on the output address of block;Each server calculates the surplus of the block resource transfer record of mapping storage respectively;The surplus that each server is calculated carries out merger processing, obtains the resource excess for treating tracing address.
- 5. according to the method described in claim 4, it is characterized in that, each server calculates the block resource of mapping storage respectively The surplus of transfer record includes:Each server respectively verifies the block resource of mapping storage transfer record;If the block resource transfer record of the mapping storage includes input address and output address, the mapping storage Block resource transfer record surplus is the sum of input surplus and output surplus;If only include input address, the block resource of the mapping storage in the block resource transfer record of the mapping storage Transfer record surplus is input surplus;If only include output address, the block resource of the mapping storage in the block resource transfer record of the mapping storage Transfer record surplus is output surplus.
- 6. a kind of block chain tracing device, which is characterized in that including:Map unit is recorded, for generating order traversal block chain according to block, the address based on each block is by the block chain Resource transfers record map to multiple servers, wherein described address includes input address or output address;Spanning tree construction unit, for receiving the sub- spanning tree set from each server, the sub- spanning tree set is by taking Device be engaged according to the sub- spanning tree set generation of transfer record block structure, the sub- spanning tree set merging of each server construction is handled into structure Build spanning tree;Tracing unit is used to implement the tracing to the block chain.
- 7. device according to claim 6, which is characterized in thatThe spanning tree construction unit is used for treat root node of the tracing address as spanning tree, by the son of each server construction The processing of spanning tree set merging builds the spanning tree;The tracing unit obtains the resource transfers historical record for treating tracing address for traversing the spanning tree.
- 8. the device described according to claim 6 or 7, which is characterized in that further include resource excess computing unit;The record map unit is used to map to the resource transfers record of the block chain based on the output address of block more A server;The resource excess computing unit shifts for receiving the block resource of the mapping storage of the calculating from each server The surplus of record, the surplus that each server is calculated carry out merger processing, obtain the resource excess for treating tracing address.
- 9. a kind of block chain tracing system, which is characterized in that any described including multiple servers and claim 6-8 Block chain tracing device;Each server is used to obtain root section of any address as sub- spanning tree from the block resource transfer record of mapping storage Point;The block resource transfer record of block map storage is traversed, according to the ground of the block resource of mapping storage transfer record Relationship between location, generates the tree node of the sub- spanning tree, until the block resource transfer of the mapping storage of generation block will be created Leaf node of the address of record as the sub- spanning tree;Each sub- spanning tree is merged into the sub- spanning tree set of generation.
- 10. system according to claim 9, which is characterized in thatEach server is additionally operable to calculate the surplus of the block resource transfer record of mapping storage respectively.
- 11. system according to claim 10, which is characterized in thatEach server is additionally operable to respectively verify the block resource of mapping storage transfer record;If the area of the mapping storage Block resource transfers record includes input address and output address, then the block resource transfer record surplus of the mapping storage is Input the sum of surplus and output surplus;If only include input address, institute in the block resource transfer record of the mapping storage The block resource transfer record surplus for stating mapping storage is input surplus;If in the block resource transfer record of the mapping storage Only include output address, then the block resource transfer record surplus of the mapping storage is output surplus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611112091.3A CN108171601B (en) | 2016-12-07 | 2016-12-07 | Block chain source tracing method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611112091.3A CN108171601B (en) | 2016-12-07 | 2016-12-07 | Block chain source tracing method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108171601A true CN108171601A (en) | 2018-06-15 |
CN108171601B CN108171601B (en) | 2021-07-27 |
Family
ID=62525954
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611112091.3A Active CN108171601B (en) | 2016-12-07 | 2016-12-07 | Block chain source tracing method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108171601B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254837A (en) * | 2018-08-15 | 2019-01-22 | 泰链(厦门)科技有限公司 | Block catenary system and the wherein improvement method of the speed of performing task of nonproductive node |
CN109903161A (en) * | 2019-02-28 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Object processing method, device, equipment and medium based on block chain |
CN110008716A (en) * | 2019-02-01 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Block chain method of commerce and device, electronic equipment, storage medium |
CN111126987A (en) * | 2019-12-02 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Resource transfer information processing method and device, storage medium and electronic device |
CN111259418A (en) * | 2018-09-05 | 2020-06-09 | 贝富(广州)新技术有限公司 | Anti-counterfeiting method, system and storage medium based on block chain |
CN111311278A (en) * | 2020-02-13 | 2020-06-19 | 上海墨珩网络科技有限公司 | Cross-department information tracing method and system |
CN111709735A (en) * | 2020-04-28 | 2020-09-25 | 上海墨珩网络科技有限公司 | Credible transaction processing system and method based on block chain |
CN112187788A (en) * | 2020-09-27 | 2021-01-05 | 上海万向区块链股份公司 | Block chain-based multi-level asset transfer method, system and traceability method |
CN112231364A (en) * | 2020-11-05 | 2021-01-15 | 浙江智联阀门科技有限公司 | Data tracing method based on block chain |
CN114185938A (en) * | 2021-11-03 | 2022-03-15 | 王伟强 | Project traceability analysis method and system based on digital finance and big data traceability |
US11423474B1 (en) * | 2018-02-14 | 2022-08-23 | Block, Inc. | Securing capital offers using blockchain transaction reconstruction |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105608146A (en) * | 2015-12-17 | 2016-05-25 | 布比(北京)网络技术有限公司 | Block chain tracing method |
CN105630609A (en) * | 2016-02-24 | 2016-06-01 | 杭州复杂美科技有限公司 | Block chain packing and storing method |
CN106097101A (en) * | 2016-06-20 | 2016-11-09 | 深圳市淘淘谷信息技术有限公司 | A kind of block chain realizes the management method of financial transaction |
US20160342978A1 (en) * | 2015-05-21 | 2016-11-24 | Mastercard International Incorporated | Method and system for integration of market exchange and issuer processing for blockchain-based transactions |
-
2016
- 2016-12-07 CN CN201611112091.3A patent/CN108171601B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160342978A1 (en) * | 2015-05-21 | 2016-11-24 | Mastercard International Incorporated | Method and system for integration of market exchange and issuer processing for blockchain-based transactions |
CN105608146A (en) * | 2015-12-17 | 2016-05-25 | 布比(北京)网络技术有限公司 | Block chain tracing method |
CN105630609A (en) * | 2016-02-24 | 2016-06-01 | 杭州复杂美科技有限公司 | Block chain packing and storing method |
CN106097101A (en) * | 2016-06-20 | 2016-11-09 | 深圳市淘淘谷信息技术有限公司 | A kind of block chain realizes the management method of financial transaction |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11423474B1 (en) * | 2018-02-14 | 2022-08-23 | Block, Inc. | Securing capital offers using blockchain transaction reconstruction |
CN109254837A (en) * | 2018-08-15 | 2019-01-22 | 泰链(厦门)科技有限公司 | Block catenary system and the wherein improvement method of the speed of performing task of nonproductive node |
CN109254837B (en) * | 2018-08-15 | 2021-02-19 | 泰链(厦门)科技有限公司 | Block chain system and method for improving task execution speed of non-production node in block chain system |
CN111259418A (en) * | 2018-09-05 | 2020-06-09 | 贝富(广州)新技术有限公司 | Anti-counterfeiting method, system and storage medium based on block chain |
CN110008716A (en) * | 2019-02-01 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Block chain method of commerce and device, electronic equipment, storage medium |
CN109903161B (en) * | 2019-02-28 | 2021-11-09 | 百度在线网络技术(北京)有限公司 | Object processing method, device, equipment and medium based on block chain |
CN109903161A (en) * | 2019-02-28 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Object processing method, device, equipment and medium based on block chain |
CN111126987A (en) * | 2019-12-02 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Resource transfer information processing method and device, storage medium and electronic device |
CN111311278A (en) * | 2020-02-13 | 2020-06-19 | 上海墨珩网络科技有限公司 | Cross-department information tracing method and system |
CN111311278B (en) * | 2020-02-13 | 2024-02-02 | 上海墨珩网络科技有限公司 | Cross-department information tracing method and system |
CN111709735A (en) * | 2020-04-28 | 2020-09-25 | 上海墨珩网络科技有限公司 | Credible transaction processing system and method based on block chain |
CN111709735B (en) * | 2020-04-28 | 2023-10-20 | 上海墨珩网络科技有限公司 | System and method for processing trusted transaction based on blockchain |
CN112187788A (en) * | 2020-09-27 | 2021-01-05 | 上海万向区块链股份公司 | Block chain-based multi-level asset transfer method, system and traceability method |
CN112187788B (en) * | 2020-09-27 | 2022-09-16 | 上海万向区块链股份公司 | Block chain-based multi-level asset transfer method, system and traceability method |
CN112231364A (en) * | 2020-11-05 | 2021-01-15 | 浙江智联阀门科技有限公司 | Data tracing method based on block chain |
CN114185938A (en) * | 2021-11-03 | 2022-03-15 | 王伟强 | Project traceability analysis method and system based on digital finance and big data traceability |
Also Published As
Publication number | Publication date |
---|---|
CN108171601B (en) | 2021-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108171601A (en) | Block chain tracing methods, devices and systems | |
Bai et al. | Formal modeling and verification of smart contracts | |
Badawi et al. | Cryptocurrencies emerging threats and defensive mechanisms: A systematic literature review | |
CN109118168A (en) | A kind of government affairs service process traceability system and its construction method based on block chain mechanism | |
KR20180114939A (en) | Systems and methods for controlling asset-related activities through block chaining | |
US9330416B1 (en) | Visualization of fraud patterns | |
CN112686653A (en) | Registration and automatic management method of intelligent contracts executed by block chains | |
CN106452884A (en) | A data distribution method and apparatus in a block chain system | |
Ghosh et al. | A study on the issue of blockchain’s energy consumption | |
Zhang et al. | Design and application of a personal credit information sharing platform based on consortium blockchain | |
Yang et al. | Research and analysis of blockchain data | |
Gangwal et al. | Detecting covert cryptomining using hpc | |
CN103281403A (en) | Cloud protective system for improving personal information security in network marketing channel | |
Gaihre et al. | Deanonymizing cryptocurrency with graph learning: The promises and challenges | |
US20230315877A1 (en) | Managing machine-learning models via non-fungible tokens on a digital ledger | |
Zhang et al. | Smart contract-based secure model for miner registration and block validation | |
Wen et al. | Application of blockchain technology in data management: advantages and solutions | |
Zhao et al. | Research on a shared bicycle deposit management system based on blockchain technology | |
Xue et al. | Preventing price manipulation attack by front-running | |
CN111552738A (en) | Block chain ecosystem based on Internet of things and block chain chaining method | |
Rajesh | A survey on mining cryptocurrencies | |
Jeyakumar et al. | A framework for user-centric visualisation of blockchain transactions in critical infrastructure | |
Li | Security and Risk Analysis of Financial Industry Based on the Internet of Things | |
Zaidi | Blockchain: Emerging Trends, Applications, and Challenges | |
Belfer et al. | Proof-Of-Activity Consensus Protocol based on a Network's Active Nodes |
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 |