CN107577427A - For the data migration method of block catenary system, equipment and storage medium - Google Patents

For the data migration method of block catenary system, equipment and storage medium Download PDF

Info

Publication number
CN107577427A
CN107577427A CN201710769578.7A CN201710769578A CN107577427A CN 107577427 A CN107577427 A CN 107577427A CN 201710769578 A CN201710769578 A CN 201710769578A CN 107577427 A CN107577427 A CN 107577427A
Authority
CN
China
Prior art keywords
old
block
new
block chain
information
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
Application number
CN201710769578.7A
Other languages
Chinese (zh)
Other versions
CN107577427B (en
Inventor
何定
燕宝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Insurance Exchange Ltd By Share Ltd
Original Assignee
Shanghai Insurance Exchange Ltd By Share Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Insurance Exchange Ltd By Share Ltd filed Critical Shanghai Insurance Exchange Ltd By Share Ltd
Priority to CN201710769578.7A priority Critical patent/CN107577427B/en
Publication of CN107577427A publication Critical patent/CN107577427A/en
Application granted granted Critical
Publication of CN107577427B publication Critical patent/CN107577427B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses for the data migration method of block catenary system, equipment and storage medium.The data migration method includes:The new wound generation block of new block chain is created in new block catenary system, the relevant information of the old block chain in its data old block catenary system to be migrated is recorded in newly wound generation block, wherein, the relevant information of old block chain includes the range information of the data to be migrated of old block chain;According to range information, each old affair business recorded in each Geju City block in old block chain is converted to the new affairs for the new transaction data structure for meeting new block chain, and the new affairs after conversion are moved in new block chain, wherein, the new transaction data structure of new block chain includes instruction old affair corresponding with the new affairs and is engaged in the tracing information of the position in old block chain.

Description

For the data migration method of block catenary system, equipment and storage medium
Technical field
The present invention relates to block catenary system, the more particularly, to data migration method of block catenary system, equipment and storage Medium.
Background technology
Block chain is that the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, AES are interconnecting The innovation and application pattern in net epoch.
For narrow sense, block chain be it is a kind of sequentially in time by data block by sequentially be connected in a manner of be combined into one Kind linked data structure, and the distributed account book that can not be distorted He can not forge ensured in a manner of cryptography.Broadly, area Block chain technology is to verify with data storage using block linked data structure, algorithm is known together using distributed node to generate and more New data, the safety for ensureing using the mode of cryptography data transfer and access, utilize the intelligence being made up of automatized script code Can contract come program and a kind of brand-new distributed basis framework of operation data with calculate normal form.The Liang great Te of block chain technology Property can to trace and can not distort.
The content of the invention
But developing rapidly with block chain technology, block catenary system are also required to be upgraded and transformed in itself, especially It is in the case of the bottom data structural modification of block chain, the new block catenary system None- identified after upgrading and renewal is old The data that block catenary system carries over.Therefore, it is necessary to by the Data Migration that old block catenary system carries over to new area In block catenary system.But due to the characteristic that can not be distorted of block catenary system, the data time stamp in new block catenary system will Timestamp during migration, rather than timestamp during business generation can be updated to, this is an inevitable technical problem, The serious trust problem using block catenary system can be caused.Do not have feasible scheme at present and can solve the problem that these problems.
Therefore, the application regarding to the issue above at least one problem propose a kind of new technical scheme.
According to the first aspect of the invention, there is provided a kind of data migration method for block catenary system, including:New The new wound generation block of new block chain is created in block catenary system, to be migrated old of its data is recorded in the new wound generation block The relevant information of old block chain in block catenary system, wherein, the relevant information of the old block chain includes the old block chain Data to be migrated range information;According to the range information, by institute in each Geju City block in the old block chain Each old affair business of record is converted to the new affairs for the new transaction data structure for meeting the new block chain, and by after conversion New affairs are moved in the new block chain, wherein, the new transaction data structure of the new block chain includes instruction and the new thing The tracing information of position of the old affair business in the old block chain corresponding to business.
Preferably, the range information includes the old block of last Geju City block to be migrated in the old block chain Mark.
Preferably, the step of conversion includes:It is successively read since first Geju City block in the old block chain Each Geju City block in the old block chain, until last Geju City block to be migrated in the old block chain;For The each Geju City block read, the order being engaged according to each old affair recorded in the old block are successively read in the old block Each old affair business recorded;And the business of each old affair for being read, old affair business is parsed, by the old affair after parsing Business is converted to the new affairs for the new transaction data structure for meeting the new block chain.
Preferably, the relevant information of the old block chain also includes at least one of following information:The old block chain The access mode information of system, the information recorded in the block head of the old wound generation block of the old block chain, the old block Information in chain recorded in the block head of last block to be migrated, and the world state letter of the old block chain Breath.
Preferably, the access mode information of the old block catenary system includes at least one of following information:It is described old The networking mode information of block catenary system, the nodal information of all nodes in the old block catenary system, the old block chain The internet protocol address information of all nodes in system, and the application program access interface of the old block catenary system Address information.
Preferably, the tracing information includes:The call address information of the old block chain, it is corresponding old with the new affairs Old Transaction Identifier of the affairs in the old block chain, and old office position corresponding with the new affairs in the old block chain In old block it is old block-identified.
Preferably, the call address information of the old block chain includes at least one of following information:The old block The application program access interface address information of catenary system, and the calling of one or more of described old block catenary system node Address information.
Preferably, the new wound generation block of the new block chain is to be created when the new block chain starts using configuration file Build.
Preferably, the new affairs by after conversion move to the new block chain and included:According to it is new after conversion Execution sequence in the old block chain of the old affair business in the old block catenary system corresponding to affairs, in the new block chain The new affairs after conversion are performed in system.
Preferably, the data migration method also includes:Complete the number from the old block chain to the new block chain After migration, using the new Transaction Identifier of the new affairs in the new block chain, the intelligence disposed on the new block chain is used Can contract be engaged in inquire about old affair corresponding with the new affairs in the old block chain.
Preferably, the step of inquiry includes:Utilize the new Transaction Identifier of the new affairs in the new block chain, inquiry Included tracing information in the new transaction data structure of new affairs in the new block chain;And utilize the tracing information It is engaged in inquire about old affair corresponding with the new affairs in the old block chain.
Preferably, it is described old affair corresponding with the new affairs in the old block chain is inquired about using the tracing information to be engaged in The step of include:Using the old block chain included in the tracing information call address information and with the new affairs pair The old affair answered is engaged in the old Transaction Identifier in the old block chain, inquire about and return in the old block chain with the new affairs pair The old transaction information for the old affair business answered;And the call address letter using the old block chain included in the tracing information The old block that old office corresponding with the new affairs is located in breath and the old block chain it is old block-identified, inquire about and return Return the old block information of the old block that old office corresponding with the new affairs is located in the old block chain.
Preferably, the data migration method also includes:Complete the number from the old block chain to the new block chain After migration, carried out using the data migration method from the new block chain to the Data Migration of next new block chain, To realize the multiple Data Migration of block chain.
According to the second aspect of the invention, there is provided a kind of computer-readable storage medium, computer instruction is stored thereon with, when The computer instruction performs computer and is used for block linkwork as any one of foregoing items when being computer-executed The data migration method of system.
According to the third aspect of the invention we, there is provided a kind of computer implemented Data Migration equipment for block chain, Including:Memory, it is stored with computer instruction;And processor, memory is couple to, performs the computer instruction to perform such as The data migration method for block catenary system any one of foregoing items.
According to some embodiments of the present invention, cause new and old block chain in the bottom data structural modification due to block chain , can be will be same in the Data Migration that old block catenary system carries over to new block catenary system in the case of incompatible When, it is also possible that new block chain inherits the credibility of old block chain, can be traced so that new block catenary system also has With the characteristic that can not be distorted.
By referring to the drawings to the present invention exemplary embodiment detailed description, further feature of the invention and its Advantage will be made apparent from.
Brief description of the drawings
The accompanying drawing of a part for constitution instruction describes embodiments of the invention, and is used to solve together with the description Release the principle of the present invention.
Referring to the drawings, according to following detailed description, the present invention can be more clearly understood, wherein:
Fig. 1 is the stream for schematically showing the data migration method according to an embodiment of the invention for block catenary system Cheng Tu.
Fig. 2 is to schematically show the old affair business according to an embodiment of the invention by old block to be converted in new block New affairs process flow chart.
Fig. 3 A are the schematic diagrames for the configuration for schematically showing old block chain according to an embodiment of the invention.
Fig. 3 B are to schematically show showing for old transaction data structure in old block chain according to an embodiment of the invention It is intended to.
Fig. 4 A are the schematic diagrames for the configuration for schematically showing new block chain according to an embodiment of the invention.
Fig. 4 B are to schematically show showing for new transaction data structure in new block chain according to an embodiment of the invention It is intended to.
Fig. 4 C are to schematically show the retrospect in the new transaction structure in new block chain according to an embodiment of the invention The schematic diagram of information.
Fig. 5 is to schematically show the Data Migration side for block catenary system according to another embodiment of the invention The flow chart of method.
Fig. 6 is the flow chart for schematically showing query process according to another embodiment of the invention.
Fig. 7 is the flow chart for schematically showing specific query process according to another embodiment of the invention.
Fig. 8 is to schematically show carrying out multiple data to block catenary system and move according to still another embodiment of the invention The schematic diagram of the process of shifting.
Fig. 9 is to show to can be used for implementing the data migration method according to an embodiment of the invention for block catenary system The schematic block diagram of message processing device.
Embodiment
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should be noted that:Unless have in addition Body illustrates that the unlimited system of module and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally The scope of invention.
Simultaneously, it should be appreciated that for the ease of description, the size of the various pieces shown in accompanying drawing is not according to reality Proportionate relationship draw.
The description only actually at least one exemplary embodiment is illustrative to be never used as to the present invention below And its application or any restrictions that use.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable In the case of, the technology, method and apparatus should be considered as authorizing part for specification.
In shown here and discussion all examples, any occurrence should be construed as merely exemplary, 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 accompanying drawing, therefore, once a certain Xiang Yi It is defined, then it need not be further discussed in subsequent accompanying drawing in individual accompanying drawing.
Fig. 1 is to schematically show the data migration method 100 according to an embodiment of the invention for block catenary system Flow chart.
As shown in figure 1, in step S101, the new wound generation block of new block chain can be created in new block catenary system, The relevant information of the old block chain in its data old block catenary system to be migrated is recorded in newly wound generation block, wherein, it is old The relevant information of block chain includes the range information of the data to be migrated of old block chain.
According to one embodiment of present invention, the new wound generation block of new block chain can be used when new block chain starts Configuration file and create.That is, the new of new block chain can be created using configuration file when new block chain starts Create generation block.
The configuration of new block chain created in new block catenary system is described with reference to Fig. 4 A.Fig. 4 A are schematically The schematic diagram of the configuration of new block chain according to an embodiment of the invention is shown.
As shown in Figure 4 A, new block chain include new wound generation block and new block 1, new block 2 ..., new block M It is the natural number more than or equal to 1 Deng, wherein M.New wound generation block includes block head and block body.New block 1, new block 2nd ... each new block in, new block M etc. includes block head and block body.Can in the block head of new wound generation block To record the cryptographic Hash of the new wound generation block.In addition, newly the finger for pointing to new block 1 can be recorded in the block head of wound generation block Pin, for example, the pointer for pointing to new block 1 can be the cryptographic Hash of new block 1.This can be recorded in the block head of each new block The cryptographic Hash of new block in itself.Specifically, for example, the new block 1 Hash of itself can be recorded in the block head of new block 1 Value.In addition, the block head of each new block can record the pointer for pointing to next new block, for example, pointing to next new district The pointer of block can be the cryptographic Hash of next new block.Specifically, for example, sensing can be recorded in the block head of new block 1 The pointer of new block 2, for example, the pointer for pointing to new block 2 can be the cryptographic Hash of new block 2.Therefore, new wound generation block and each Individual new block (that is, new block 1, new block 2 ..., new block M etc.) can by above-mentioned pointer (for example, cryptographic Hash) that This is chained up to form new block chain.
As shown in Figure 4 A, can newly be recorded in its data old block catenary system to be migrated in the block body of wound generation block Old block chain relevant information.That is, when the new wound generation block of new block chain is created in new block catenary system, can be with The relevant information of old block chain in its data old block catenary system to be migrated is recorded in new wound generation block, especially It is, such as is recorded in the block body of new wound generation block.Typically, the new of general service form can not newly be included in wound generation block Affairs.Each new block (that is, new block 1, new block 2 ..., new block M etc.) block body in can record one or The new affairs of multiple general service forms.For example, new affairs 1 and new affairs 2, new district can be recorded in the block body of new block 1 New affairs 3 and new affairs 4 can be recorded in the block body of block 2, new affairs 2M-1 and new can be recorded in new block M block body Affairs 2M, etc..It will be understood by those skilled in the art that the quantity of the new affairs recorded in each new block can with identical, Can be different.
The configuration of old block chain in its data old block catenary system to be migrated is described with reference to Fig. 3 A.Fig. 3 A It is the schematic diagram for the configuration for schematically showing old block chain according to an embodiment of the invention.Old block chain is configured similarly to The configuration of new block chain.
As shown in Figure 3A, old block chain include it is old wound generation block and old block 1, old block 2 ..., old block N It is the natural number more than or equal to 1 Deng, wherein N.Old wound generation block includes block head and block body.Old block 1, old block 2nd ... each Geju City block in, old block N etc. includes block head and block body.Can in the block head of old wound generation block To record the cryptographic Hash of the old wound generation block.In addition, the finger for pointing to old block 1 can be recorded in the block head of old wound generation block Pin, for example, the pointer for pointing to old block 1 can be the cryptographic Hash of old block 1.This can be recorded in the block head of each Geju City block The cryptographic Hash of old block in itself.Specifically, for example, the old Hash of itself of block 1 can be recorded in the block head of old block 1 Value.In addition, the block head of each Geju City block can record the pointer for pointing to next Geju City block, for example, pointing to next Geju City area The pointer of block can be the cryptographic Hash of next Geju City block.Specifically, for example, sensing can be recorded in the block head of old block 1 The pointer of old block 2, for example, the pointer for pointing to old block 2 can be the cryptographic Hash of old block 2.Therefore, old wound generation block and each Geju City block (that is, old block 1, old block 2 ..., old block N etc.) can by above-mentioned pointer (for example, cryptographic Hash) that This is chained up to form old block chain.
As shown in Figure 3A, typically, the old affair that general service form can not be included in old wound generation block is engaged in.It is in addition, each Old block (that is, old block 1, old block 2 ..., old block N etc.) block body in can record it is one or more common The old affair business of form of service.For example, old affair business 1, old affair business 2 and old affair business 3, old area can be recorded in the block body of old block 1 Old affair business 4, old affair business 5 and old affair business 6 can be recorded in the block body of block 2, old affair business can be recorded in old block N block body 2N-2, old affair business 2N-1 and old affair business 2N, etc..It will be understood by those skilled in the art that the old affair recorded in each Geju City block The quantity of business can be with identical, can also be different.In addition, it will be understood by those skilled in the art that recorded in each Geju City block old The quantity of new affairs of the quantity of affairs with being recorded in above-mentioned new block can be with identical, can also be different.
According to one embodiment of present invention, the relevant information of old block chain can include the to be migrated of old block chain The range information of data.For example, the relevant information of old block chain can include all of the old block chain to be migrated with its data Such as relevant various information of configuration, state various aspects.
Typically, the scope of the data of the old block chain to be migrated to new block chain is limited.Moreover, by old block To after new block chain, old block chain may continue to run with a range of Data Migration of chain, other so as to produce Data.But these other data can't be comprised in new block chain.Therefore, it is to be migrated to the old of new block chain The scope of the data of block chain should obtain believable confirmation.
In order to which the scope of the data to the old block chain to be migrated to new block chain confirms, according to the one of the present invention Individual embodiment can record the range information for indicating the scope in itself using new block chain.Specifically, for example, can be in new district Record indicates the scope letter of the scope of the data of the old block chain to be migrated to new block chain in the new wound generation block of block chain Breath.
According to one embodiment of present invention, range information can include last Geju City to be migrated in old block chain Block it is old block-identified.
Referring back to Fig. 3 A, for example, if it is desired to which the old block 1 in old block chain to old block N is moved into new block Chain, then last Geju City block to be migrated in old block chain for " old block N ", wherein, last Geju City block " old area Block N " it is old it is block-identified be " N ".Therefore, above range information can include last Geju City to be migrated in old block chain Block " old block N " old block-identified " N ".
It will be understood by those skilled in the art that range information is not limited to above-described embodiment, but other information can be used As above range information.It is for instance possible to use the cryptographic Hash conduct of last Geju City block to be migrated in old block chain Above range information, etc..
According to one embodiment of present invention, the relevant information of old block chain can also include following information at least it One:The access mode information of old block catenary system, the information recorded in the block head of the old wound generation block of old block chain, old area Information in block chain recorded in the block head of last block to be migrated, and the world state letter of old block chain Breath.
In addition to above range information, the relevant information of old block chain can also be relevant with old block chain including other Various information.
For example, the relevant information of old block chain can also include the access mode information of old block catenary system.Typically, old area The access mode information of block catenary system can include the relevant with the framework of old block catenary system, reference address etc. all of full dose Information.
According to one embodiment of present invention, the access mode information of old block catenary system can include in following information At least one:The networking mode information of old block catenary system, the nodal information of all nodes in old block catenary system, old block The internet protocol address information of all nodes in catenary system, and the application program access interface of old block catenary system Location information.
For example, the access mode information of old block catenary system can include the networking mode information of old block catenary system.One As, block catenary system can using various latticed forms such as such as peer to peer network (that is, P2P networks) come tissue dispersion in various regions Participate in data verification and book keeping operation each node.Therefore, the networking mode information of old block catenary system can include and old area The relevant information of the annexation between each node used by block catenary system in network and the network.
In another example the access mode information of old block catenary system can include the section of all nodes in old block catenary system Point information.As described above, general, block catenary system can include each section for participating in data verification and book keeping operation for being dispersed in various regions Point.Therefore, the nodal information of all nodes in old block catenary system can include and each node in old block catenary system Relevant information, for example, the position where the node, the mechanism, the type of the node etc. belonging to the node.On node Type, for example, node in block catenary system can include common recognition node, accounting nodes etc..
For another example the access mode information of old block catenary system can include the mutual of all nodes in old block catenary system Networking protocol IP address information.As described above, general, block catenary system can use such as peer to peer network (that is, P2P networks) Carry out each node that participates in data verification and book keeping operation of the tissue dispersion in various regions etc. various latticed forms.Therefore, block catenary system In each node typically there is IP address on network, so as to access the node by the IP address of node.
Further for example, the application program access that the access mode information of old block catenary system can include old block catenary system connects Port address information.Typically, block catenary system has application program access interface address, so as to pass through the block catenary system Application program access interface address accesses the block catenary system.
It will be understood by those skilled in the art that the access mode information of old block catenary system is not limited to the above-mentioned information enumerated Example, but can include and relevant various other information such as the framework of old block catenary system, reference address.
According to one embodiment of present invention, for example, the relevant information of old block chain can also include the old of old block chain Create the information recorded in the block head of generation block., can be by the block of the old wound generation block of old block chain referring back to Fig. 3 A Information recorded in head is recorded in the new wound generation block of new block chain as the relevant information of old block chain.Typically, old area Information recorded in the block head of the old wound generation block of block chain is the evidence of the initialization of old block chain, and it can include old area The contents such as the cryptographic Hash of wound generation block of block chain.
According to one embodiment of present invention, for example, the relevant information of old block chain can also include wanting in old block chain Information recorded in the block head for last block being migrated.For example, last to be migrated in old block chain Information recorded in the block head of block can include the block mark of last Geju City block to be migrated in old block chain Last cryptographic Hash of Geju City block in itself to be migrated etc. in knowledge or old block chain.Referring back to Fig. 3 A, if uncommon Hope and the old block 1 in old block chain to old block N is moved into new block chain, then last to be migrated in old block chain Old block is " old block N ".Therefore, can be by last Geju City block " old block N " area to be migrated in old block chain Information recorded in build is recorded in the new wound generation block of new block chain as the relevant information of old block chain.In fact, Information in old block chain recorded in the block head of last block to be migrated, which is that instruction is to be migrated, arrives new block The evidence of the scope of the data of the old block chain of chain.
According to one embodiment of present invention, for example, the relevant information of old block chain can also include the generation of old block chain Boundary's state (World State) information.Typically, the world state (World State) of old block chain is run in old block chain When, Hash operation is carried out to the account book data of old block chain by using Merkel tree (Merkele Tree) and generates a Kazakhstan Obtained from uncommon algorithm.In fact, first block to be migrated in old block chain (referring to Fig. 3 A, old wound generation block) and The block head of last block (referring to Fig. 3 A, old block N) can be used as simplest evidence.
It will be understood by those skilled in the art that the relevant information of old block chain is not limited to the above-mentioned example enumerated, but can With including the relevant various information of the various aspects such as the configuration with old block chain, state.
According to one embodiment of present invention, can be according to the old block chain recorded in the new wound generation block of new block chain Relevant information judge whether the data in old block chain are tampered.
For example, in order to judge whether the data in old block chain are tampered, it is subsynchronous one can be carried out to old block chain Prove, i.e. start owning in synchronous old block chain (referring to Fig. 3 A, old wound generation block) from first block in old block chain Block, until last block (referring to Fig. 3 A, old block N).It is then possible to by from last block of synchronization (referring to Fig. 3 A, old block N) obtained cryptographic Hash with the old block chain that is recorded in the new wound generation block of new block chain it is to be migrated most Cryptographic Hash recorded in the block head of the latter block is compared, and can will run old area out by synchronous The world state information of block chain and the world state (World of the old block chain recorded in the new wound generation block of new block chain State) information is compared, if unanimously, then it represents that the data in old block chain are not tampered with, otherwise in old block chain Data are just tampered.
Referring back to Fig. 1, after step slol, the data migration method 100 for block catenary system proceeds to step S102.In step s 102, can be according to range information, by each old affair recorded in each Geju City block in old block chain Business is converted to the new affairs for the new transaction data structure for meeting new block chain, and the new affairs after conversion are moved into new block In chain, wherein, the new transaction data structure of new block chain includes instruction old affair business corresponding with the new affairs in old block chain Position tracing information.
For example, according to range information, it may be determined that need which of old block chain Data Migration into new block chain. After the scope for the data for needing to be migrated during old block chain is determined, it is possible to by the old block chain within the scope of this All Data Migrations are into new block chain.
Fig. 3 B and Fig. 4 B are combined separately below to describe in old transaction data structure and the new block chain in old block chain New transaction data structure.Fig. 3 B are to schematically show the old Transaction Information knot in old block chain according to an embodiment of the invention The schematic diagram of structure.In addition, Fig. 4 B are to schematically show the new Transaction Information in new block chain according to an embodiment of the invention The schematic diagram of structure.
As shown in Figure 3 B, the old transaction data structure of each old affair business in old block chain can include following two words Section:Old Transaction Identifier 301 and old affair business in itself 303, wherein, old Transaction Identifier for example can be the cryptographic Hash of one 32, old Affairs in itself 303 can for example be included in the Transaction Information for running to obtain in old block catenary system, old affair business founder's signature, Founder's mark of old affair business, creation time of old affair business etc..For example, referring back to Fig. 3 A, for old block Lian Zhongjiu areas The old affair business 1 recorded in block 1, included old Transaction Identifier 301 can be " the in the old transaction data structure of old affair business 1 One cryptographic Hash ", and old affair business included in the old transaction data structure of old affair business 1 303 can be in itself that " old affair is engaged in 1 Transaction Information, founder's signature of old affair business 1, founder's mark of old affair business 1, the creation time of old affair business 1 included in body Deng ".
In addition, as shown in Figure 4 B, the new transaction data structure of each new affairs in new block chain can include following three Individual field:New Transaction Identifier 401, tracing information 403 and new affairs in itself 405, wherein, new Transaction Identifier for example can be one The cryptographic Hash of 32, tracing information can indicate that old affair corresponding with the new affairs is engaged in the position in old block chain, and new thing The business 405 founder's signature, new that can be for example included in the Transaction Information for running to obtain in new block catenary system, new affairs in itself Founder's mark, the creation time etc. of new affairs of affairs.For example, referring back to Fig. 4 A, for the new block 1 in new block chain The new affairs 1 of middle record, included new Transaction Identifier 401 can be that " second breathes out in the new transaction data structure of the new affairs 1 Uncommon value ", included tracing information 403 can indicate corresponding with the new affairs 1 in the new transaction data structure of the new affairs 1 Old affair is engaged in 1 position in old block chain, and new affairs included in the new transaction data structure of the new affairs 1 in itself 405 Can be " Transaction Information that new affairs 1 itself include, founder's signature of new affairs 1, founder's mark of new affairs 1, newly Creation time of affairs 1 etc. ".
During by the Data Migration in old block chain into new block chain, due to the new Transaction Information of new block chain Structure is different from the old transaction data structure of old block chain, it is therefore desirable to will meet the old of the old transaction data structure of old block chain Affairs are converted to the new affairs for the new transaction data structure for meeting new block chain, that is to say, that, it is necessary to carry out from old block chain The form of old transaction data structure to the new transaction data structure of new block chain is changed.
For example, for the old affair business 1 in old block chain, the old transaction data structure of old affair business 1 can include the old affair The old affair business of the old Transaction Identifier 301 (for example, " first cryptographic Hash ") of business 1 and old affair business 1 is in itself 303 (for example, " old affair is engaged in 1 Transaction Information itself that include in, founder's signature of old affair business 1, founder's mark of old affair business 1, old affair business 1 establishment when Between etc. ").The old transaction data structure of old affair business 1 can be converted to the new number of transactions of new affairs 1 corresponding with old affair business 1 According to structure, the new transaction data structure of the new affairs 1 can include the new Transaction Identifier of new affairs 1 corresponding with old affair business 1 401 (for example, " second cryptographic Hash "), instruction are believed with the retrospect of new 1 corresponding old affair of affairs business, 1 position in old block chain Breath 403 and with the new affairs of 1 corresponding new affairs 1 of old affair business in itself 405 (for example, " affairs included in new affairs 1 itself Data, founder's signature of new affairs 1, founder's mark of new affairs 1, creation time of new affairs 1 etc. "), wherein it is possible to The old Transaction Identifier 301 (for example, " first cryptographic Hash ") of old affair business 1 is included in the tracing information 403, and can be with By the old affair business of old affair business 1 in itself 303 (for example, " Transaction Information that is included in old affair business 1 itself, the founder of old affair business 1 Signature, founder's mark of old affair business 1, creation time etc. of old affair business 1 ") be converted to the new affairs of new affairs 1 405 (example in itself Such as, " Transaction Information, founder's signature of new affairs 1, founder's mark, the new thing of new affairs 1 included in new affairs 1 itself Creation time of business 1 etc. ").
The process for the new affairs in new block that the old affair in old block is engaged in being converted to is described in detail with reference to Fig. 2. Fig. 2 is to schematically show the old affair according to an embodiment of the invention by old block to be engaged in being converted to the new affairs in new block Process 200 flow chart.
As shown in Fig. 2 in step s 201, old area can be successively read since first Geju City block in old block chain Each Geju City block in block chain, until last Geju City block to be migrated in old block chain.
For example, with reference to figure 3A, if it is desired to by the old block 1 in old block chain to old block N Data Migration to new district Block chain, then " each in old block chain can be successively read old block 1 " since first Geju City block in old block chain Old block, until last Geju City block " old block N " to be migrated in old block chain.
After step S201, process 200 proceeds to step S203.In step S203, for each read Old block, it can be successively read according to the order that each old affair recorded in the old block is engaged in every recorded in the old block One Geju City affairs.
For example, with reference to figure 3A, can be according to each old affair recorded in the old block 1 for the old block 1 read Business " old affair business 1, old affair business 2, old affair business 3 " order be successively read recorded in the old block 1 old affair business 1, old affair be engaged in 2 and Old affair business 3.
After step S203, process 200 proceeds to step S205.In step S205, for each read Old affair is engaged in, and can parse old affair business, and the old affair after parsing is engaged in be converted to the new transaction data structure for meeting new block chain New affairs.
For example, with reference to figure 3A, for the old affair business 1 read, old affair business 1 can be parsed, by the old affair business 1 after parsing Be converted to the new affairs 1 for the new transaction data structure for meeting new block chain.Pay attention to, can be with when parsing read old affair business The old transaction data structure being engaged according to the old affair is engaged in parse the old affair.
According to one embodiment of present invention, the above-mentioned old transaction data structure from old block chain is completed to new block chain New transaction data structure form conversion after, the new affairs after conversion can be moved in new block chain.
According to one embodiment of present invention, the new affairs by after conversion, which are moved in new block chain, to include: According to the execution sequence in old block chain of old affair corresponding with the new affairs after the conversion business in old block catenary system, in new district The new affairs after conversion are performed in block catenary system.
For example, with reference to figure 3A and Fig. 4 B, it is assumed that old affair business 1, old affair business 2 and old affair business 3 are old in old block catenary system Execution sequence in block chain to first carry out old affair business 1, performing old affair business 2 again, finally perform old affair business 3, and old affair business 1, Old affair business 2 and old affair business 3 are converted to new affairs 1, new affairs 2 and new affairs 3, then in new block catenary system according to as follows Order performs the new affairs 1 after conversion, new affairs 2 and new affairs 3:New affairs 1 are first carried out, new affairs 2 is performed again, finally performs New affairs 3.
Pay attention to, the execution sequence in the above-mentioned old block chain in strict accordance with old affair business in old block catenary system is in new block The purpose that the new affairs after conversion are performed in catenary system is to avoid clashing between the new affairs after migrating.That is, In order to avoid being clashed between each new affairs after migration, if migration after each new affairs between exist perform on Sequencing, then the execution sequence being engaged in strict accordance with old affair in the old block chain in old block catenary system is needed, is waited first New affairs perform and complete and then perform posterior new affairs.
Referring back to Fig. 3 B and Fig. 4 B, by comparing Fig. 3 B and Fig. 4 B, with each old affair business in old block chain Old transaction data structure is compared, and the new transaction data structure of each new affairs in new block chain can increase a field and " chase after Trace back information ", to indicate position of the old affair business corresponding with the new affairs in old block chain.By the tracing information, can obtain Know that old affair corresponding with the new affairs is engaged in the position in old block chain, for example, old affair corresponding with the new affairs can be known Business is in which of which old block chain old block.
According to one embodiment of present invention, tracing information can include:The call address information of old block chain is new with this Old affair corresponding to affairs is engaged in old Transaction Identifier in old block chain, and old affair corresponding with the new affairs is engaged in old block chain The old block being located at it is old block-identified.
The tracing information in the new transaction structure in new block chain is described with reference to Fig. 4 C.Fig. 4 C are schematically to show The schematic diagram of the tracing information gone out in the new transaction structure in new block chain according to an embodiment of the invention.
As shown in Figure 4 C, tracing information 403 can include following three fields:The call address information of old block chain 4031st, old Transaction Identifier 4033 and old block-identified 4035, wherein, the call address information 4031 of old block chain can indicate with The call address of old block chain corresponding to the new affairs where old affair business, old Transaction Identifier 4033 can be and the new affairs pair The old affair answered is engaged in the old Transaction Identifier in old block chain, and old block-identified 4035 can be in old block chain with the new affairs The old block that corresponding old office is located at it is old block-identified.
For example, referring back to Fig. 3 A and Fig. 4 A, for the new affairs 1 recorded in the new block 1 in new block chain, the new thing Included tracing information 403 can include in the new transaction data structure of business 1:The call address information 4031 of old block chain, It can indicate the call address with the old block chain where new 1 corresponding old affair of the affairs business 1;Old Transaction Identifier 4033, its Can be and the 1 old Transaction Identifier " the first cryptographic Hash " in old block chain of new 1 corresponding old affair of affairs business;And old block Mark 4035, it can be the old block mark for the old block 1 being located in old block chain with new 1 corresponding old affair of the affairs business 1 Know " old block 1 ".
By the calling of the old block chain in the tracing information 403 in the new transaction structure of the new affairs in new block chain Location information 4031, the call address with the old block chain where new 1 corresponding old affair of the affairs business 1 can be obtained.
Because the new affairs 1 recorded in new block 1 in new block chain are actually from the old block 1 in old block chain Recorded in the migration of old affair business 1 come, so should have in old block chain with new affairs 1 corresponding old affairs business 1 Old Transaction Identifier " the first cryptographic Hash ", this is also and 1 positive evidence in old block chain of new 1 corresponding old affair of affairs business. , can be with so the old Transaction Identifier 4033 in tracing information 403 in the new transaction structure for passing through the new affairs in new block chain Obtain old Transaction Identifier of the old affair business corresponding with the new affairs in old block chain.
In addition, in for judging old affair business 1 with the presence or absence of evidence in old block chain, in old block chain with the new thing Old block-identified " old block 1 " and the critically important information for the old block 1 that old affair business 1 corresponding to business 1 is located at.Therefore, lead to Old block-identified 4035 crossed in the tracing information 403 in the new transaction structure of the new affairs in new block chain, can be obtained old Old block-identified " the old block 1 " for the old block 1 being located in block chain with new 1 corresponding old affair of the affairs business 1.
It will be understood by those skilled in the art that the tracing information in new transaction structure in new block chain is not limited to above-mentioned row The example of act, but the various letters that can indicate position of the old affair business corresponding with the new affairs in old block chain can be included Breath.
According to one embodiment of present invention, the call address information of old block chain can be included in following information at least One of:The application program access interface address information of old block catenary system, and one or more of old block catenary system section The call address information of point.
For example, the call address information of old block chain can include the application program access interface address of old block catenary system Information.As described above, general, block catenary system has application program access interface address, so as to pass through the block linkwork The application program access interface address of system accesses the block catenary system.
In another example the call address information of old block chain can include one or more of old block catenary system node Call address information.As described above, general, block catenary system can use such as peer to peer network (that is, P2P networks) etc. various Latticed form carrys out each node that participates in data verification and book keeping operation of the tissue dispersion in various regions, can be stored respectively on each node Block chain in the block catenary system.Therefore, can be also by the calling of one or more of old block catenary system node Location information calls one or more of old block catenary system node, and then can call and stored on one or more nodes Old block catenary system in old block chain.
It will be understood by those skilled in the art that the call address information of old block chain is not limited to the above-mentioned example enumerated, and It is the various call address information that can include calling old block chain.
The Data Migration side for block catenary system according to another embodiment of the invention is described below with reference to Fig. 5 Method.Fig. 5 is to schematically show the data migration method 500 for block catenary system according to another embodiment of the invention Flow chart.
As shown in figure 5, in step S501, the new wound generation block of new block chain can be created in new block catenary system, The relevant information of the old block chain in its data old block catenary system to be migrated is recorded in newly wound generation block, wherein, it is old The relevant information of block chain includes the range information of the data to be migrated of old block chain.
After step S501, the above-mentioned data migration method 500 for block catenary system may be advanced to step S503. In step S503, each old affair business recorded in each Geju City block in old block chain can be turned according to range information The new affairs for the new transaction data structure for meeting new block chain are changed to, and the new affairs after conversion are moved into new block chain In, wherein, the new transaction data structure of new block chain includes instruction old affair business corresponding with the new affairs in old block chain The tracing information of position.
Pay attention to, the content of step S501 and S502 in Fig. 5 content phase with step S101 and S103 in Fig. 1 respectively Together, its detail will not be repeated here.
After step S503, the above-mentioned data migration method 500 for block catenary system may be advanced to step S505. , can be after Data Migration from old block chain to new block chain be completed, using new in new block chain in step S505 The new Transaction Identifier of affairs, inquired about using the intelligent contract disposed on new block chain corresponding with the new affairs in old block chain Old affair is engaged in.
For example, after the Data Migration from old block chain to new block chain is completed, use can be disposed on new block chain In the intelligent contract that old affair business corresponding with new affairs is inquired about in old block chain.Therefore, when needs retrospect is corresponding with new affairs Old affair business when, old affair business corresponding with the new affairs can be inquired about in old block chain using the intelligent contract, so as to The data traced to the source in old block chain.
Query process according to another embodiment of the invention is described in detail below with reference to Fig. 6.Fig. 6 is schematically The flow chart of query process 600 according to another embodiment of the invention is shown.
As shown in fig. 6, in step s 601, the new Transaction Identifier of the new affairs in new block chain can be utilized, inquiry is newly Included tracing information in the new transaction data structure of new affairs in block chain.
For example, with reference to figure 4A and Fig. 4 B, can utilize new affairs 1 in new block chain new Transaction Identifier 401 (for example, " the second cryptographic Hash "), in the new transaction data structure of the new affairs 1 in new block chain, inquire about the new number of transactions of the new affairs 1 According to including tracing information 403 corresponding with the new Transaction Identifier 401 (for example, " second cryptographic Hash ") of new affairs 1 in structure.
After step S601, above-mentioned query process 600 may be advanced to step S603.In step S603, Ke Yili Old affair corresponding with the new affairs in old block chain is inquired about with tracing information to be engaged in.
For example, with reference to figure 4A and Fig. 4 B, after by inquiring about the above-mentioned tracing information 403 of acquisition, the retrospect can be utilized Information 403 come inquire about in old block chain with new 1 corresponding old affair of affairs business 1.
Below with reference to Fig. 7 come be described in detail according to another embodiment of the invention old area is inquired about using tracing information The specific query process of old affair business corresponding with the new affairs in block chain.Fig. 7 is schematically shown according to the another of the present invention The flow chart of the specific query process 700 of individual embodiment.
As shown in fig. 7, in step s 701, the call address letter of old block chain included in tracing information can be utilized Breath and old affair corresponding with the new affairs are engaged in the old Transaction Identifier in old block chain, inquire about and return in old block chain with should The old transaction information of old affair business corresponding to new affairs.
For example, with reference to figure 3A, Fig. 3 B and Fig. 4 C, the calling of old block chain included in tracing information 403 can be utilized Address information 4031 and 1 old Transaction Identifier 4033 in old block chain is engaged in (for example, " first with the new 1 corresponding old affair of affairs Cryptographic Hash "), the old transaction information with new 1 corresponding old affair of affairs business 1 is inquired about in old block chain, and will can inquire about To old affair business 1 old transaction information return to user.
In addition, in step S703, can utilize old block chain included in tracing information call address information and The old block that old office corresponding with the new affairs is located in old block chain it is old block-identified, inquire about and return to old block The old block information for the old block that old office corresponding with the new affairs is located in chain.
For example, with reference to figure 3A, Fig. 3 B and Fig. 4 C, the calling of old block chain included in tracing information 403 can be utilized Address information 4031 and the old block 1 that is located at new 1 corresponding old affair of affairs business 1 in old block chain it is old block-identified 4035 (for example, " old block 1 "), the old block 1 that inquiry is located at new 1 corresponding old affair of the affairs business 1 in old block chain Old block information.
According to one embodiment of present invention, can after Data Migration from old block chain to new block chain is completed, Carried out using data migration method from new block chain to the Data Migration of next new block chain, to realize more numbers of block chain According to migration.
Below with reference to Fig. 8 come be described in detail according to still another embodiment of the invention more numbers are carried out to block catenary system According to the process of migration.Fig. 8 be schematically show according to still another embodiment of the invention block catenary system is carried out it is multiple The schematic diagram of the process of Data Migration.
As shown in figure 8, the data migration method for block catenary system disclosed herein can be utilized by block Then Data Migration in chain A can utilize the same block catenary system that is used for disclosed herein into block chain B Data migration method is by the Data Migration in block chain B into block chain C.By that analogy, it is possible to achieve more numbers of block chain According to migration.
Fig. 9 is to show to can be used for implementing the data migration method according to an embodiment of the invention for block catenary system The schematic block diagram of message processing device.
In fig.9, CPU (CPU) 901 is according to the program stored in read-only storage (ROM) 902 or from depositing The program that storage part 908 is loaded into random access memory (RAM) 903 performs various processing.In RAM 903, also according to need Store the data required when CPU 901 performs various processing etc..CPU 901, ROM 902 and RAM 903 are via bus 904 are connected to each other.Input/output interface 905 is also connected to bus 904.
Components described below is connected to input/output interface 905:Importation 906 (including keyboard, mouse etc.), output section Points 907 (including displays, such as cathode-ray tube (CRT), liquid crystal display (LCD) etc., and loudspeaker etc.), storage part 908 (including hard disks etc.), communications portion 909 (including NIC such as LAN card, modem etc.).Communications portion 909 Communication process is performed via network such as internet.As needed, driver 910 can be connected to input/output interface 905. Detachable media 911 such as disk, CD, magneto-optic disk, semiconductor memory etc. are installed in driver 910 as needed On so that the computer program read out is installed in storage part 908 as needed.
It is such as removable from network such as internet or storage medium in the case where realizing above-mentioned series of processes by software Unload the program that the installation of medium 911 forms software.
It will be understood by those of skill in the art that this storage medium be not limited to wherein having program stored therein shown in Fig. 9, Separately distribute with equipment to provide a user the detachable media 911 of program.The example of detachable media 911 includes disk (including floppy disk (registration mark)), CD (including compact disc read-only memory (CD-ROM) and digital universal disc (DVD)), magneto-optic disk (including mini-disk (MD) (registration mark)) and semiconductor memory.Or storage medium can be ROM 902, storage part Hard disk included in 908 etc., wherein computer program stored, and user is distributed to together with the equipment comprising them.
When the instruction code is read and performed by machine, above-mentioned method according to embodiments of the present invention can perform.
Can being combined to write for performing various aspects of the present invention with one or more programming languages The computer program code of operation, described program design language include object oriented program language-such as Java, Smalltalk, C++ etc., in addition to conventional procedural programming language-such as " C " language or similar program design language Speech.Program code fully can on the user computer be performed, partly performed on the user computer, as an independence Software kit perform, part on the user computer part perform on the remote computer or completely in remote computer or Performed on server.In the situation of remote computer is related to, remote computer can pass through the network of any kind --- bag LAN (LAN) or wide area network (WAN)-be connected to subscriber computer are included, or, it may be connected to outer computer (such as profit Pass through Internet connection with ISP).
It should be appreciated that in each square frame and flow chart and/or block diagram of flow chart and/or block diagram each square frame combination, It can be realized by computer program instructions.These computer program instructions can be supplied to all-purpose computer, special-purpose computer Or the processor of other programmable data processing units, so as to produce a kind of machine so that these computer program instructions exist During by the computing device of computer or other programmable data processing units, generate in implementation process figure and/or block diagram One or more square frames specified in function/action device.
These computer program instructions can also be stored in computer-readable medium, these instruct cause computer, Other programmable data processing units or other equipment work in a specific way, so as to be stored in computer-readable medium Instruction just produces the instruction for including function/action specified in one or more of implementation process figure and/or block diagram square frame Manufacture (article of manufacture).
Computer program instructions can also be loaded into computer, other programmable data processing units or miscellaneous equipment On so that series of operation steps is performed on computer, other programmable data processing units or miscellaneous equipment, in terms of producing The process that calculation machine is realized, so that the instruction performed on computer or other programmable devices can provide implementation process figure And/or the process of function/operation specified in the square frame in block diagram.
Flow chart and block diagram in accompanying drawing show system, method and the computer journey of multiple embodiments according to the present invention Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for the module, program segment or code include one or more use In the executable instruction of logic function as defined in realization.It should also be noted that marked at some as in the realization replaced in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two continuous square frames can essentially base Originally it is performed in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.It is also noted that It is the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, can uses and perform rule Fixed function or the special hardware based system of action are realized, or can use the group of specialized hardware and computer instruction Close to realize.
Pay attention to, in order to avoid the design of the masking present invention, do not describe some details known in the field.This area skill Art personnel as described above, can be appreciated how to implement technical scheme disclosed herein completely.
The application can also be configured as follows:
(1) a kind of, data migration method for block catenary system, including:
The new wound generation block of new block chain is created in new block catenary system, its data is recorded in the new wound generation block The relevant information of old block chain in old block catenary system to be migrated, wherein, the relevant information of the old block chain includes The range information of the data to be migrated of the old block chain;
According to the range information, each old affair recorded in each Geju City block in the old block chain is engaged in changing To meet the new affairs of the new transaction data structure of the new block chain, and the new affairs after conversion are moved into the new district In block chain,
Wherein, the new transaction data structure of the new block chain includes instruction old affair corresponding with the new affairs and is engaged in described The tracing information of position in old block chain.
(2), the data migration method according to (1), wherein, the range information includes will quilt in the old block chain Migration last Geju City block it is old block-identified.
(3), according to the data migration method described in (2), wherein, include the step of the conversion:
The each Geju City area being successively read since first Geju City block in the old block chain in the old block chain Block, until last Geju City block to be migrated in the old block chain;
For each Geju City block read, the order being engaged according to each old affair recorded in the old block is read successively Each old affair recorded in the old block is taken to be engaged in;And
It is engaged in for each old affair read, parses old affair business, the old affair business after parsing is converted to described in meeting The new affairs of the new transaction data structure of new block chain.
(4), the data migration method according to (1), wherein, the relevant information of the old block chain also includes following letter At least one of breath:The access mode information of the old block catenary system, the block of the old wound generation block of the old block chain Information recorded in head, the information in the old block chain recorded in the block head of last block to be migrated, And the world state information of the old block chain.
(5), the data migration method according to (4), wherein, the access mode information of the old block catenary system includes At least one of following information:The networking mode information of the old block catenary system, it is all in the old block catenary system The nodal information of node, the internet protocol address information of all nodes in the old block catenary system, and it is described old The application program access interface address information of block catenary system.
(6), the data migration method according to (1), wherein, the tracing information includes:The tune of the old block chain With address information, old affair corresponding with the new affairs is engaged in the old Transaction Identifier in the old block chain, and the old block The old block that old office corresponding with the new affairs is located in chain it is old block-identified.
(7), according to the data migration method described in (6), wherein, the call address information of the old block chain is including following At least one of information:The application program access interface address information of the old block catenary system, and the old block chain The call address information of one or more of system node.
(8), the data migration method according to any one of (1)-(7), wherein, the Xin Chuanshi areas of the new block chain Block is created when the new block chain starts using configuration file.
(9), the data migration method according to any one of (1)-(7), wherein, the new affairs by after conversion are moved Moving on to the new block chain includes:
According in the old block chain of old affair corresponding with the new affairs after the conversion business in the old block catenary system Execution sequence, in the new block catenary system perform conversion after new affairs.
(10), the data migration method according to any one of (1)-(7), in addition to:
After the Data Migration from the old block chain to the new block chain is completed, using in the new block chain The new Transaction Identifier of new affairs, is inquired about new with this in the old block chain using the intelligent contract disposed on the new block chain Old affair corresponding to affairs is engaged in.
(11), according to the data migration method described in (10), wherein, include the step of the inquiry:
Using the new Transaction Identifier of the new affairs in the new block chain, the new affairs inquired about in the new block chain it is new Included tracing information in transaction data structure;And
Old affair corresponding with the new affairs in the old block chain is inquired about using the tracing information to be engaged in.
(12), according to the data migration method described in (11), wherein, it is described inquired about using the tracing information it is described old The step of old affair corresponding with the new affairs is engaged in block chain includes:
Utilize the call address information of the old block chain included in the tracing information and corresponding with the new affairs Old affair be engaged in old Transaction Identifier in the old block chain, inquire about and return corresponding with the new affairs in the old block chain Old affair business old transaction information;And
In call address information and the old block chain using the old block chain included in the tracing information The old block that old office corresponding with the new affairs is located at it is old block-identified, inquire about and return in the old block chain with The old block information for the old block that old office corresponding to the new affairs is located at.
(13), the data migration method according to any one of (1)-(7), in addition to:
After the Data Migration from the old block chain to the new block chain is completed, the data migration method is utilized Carry out from the new block chain to the Data Migration of next new block chain, to realize the multiple Data Migration of block chain.
(14) a kind of, computer-readable storage medium, is stored thereon with computer instruction, when the computer instruction is by computer Computer is set to perform the data migration method for block catenary system any one of (1)-(13) during execution.
(15) a kind of, computer implemented Data Migration equipment for block chain, including:
Memory, it is stored with computer instruction;With
Processor, memory is couple to, performs the computer instruction to perform as any one of (1)-(13) Data migration method for block catenary system.
Although some specific embodiments of the present invention are described in detail by example, the skill of this area Art personnel it should be understood that above example merely to illustrating, the scope being not intended to be limiting of the invention.The skill of this area Art personnel to above example it should be understood that can modify without departing from the scope and spirit of the present invention.This hair Bright scope is defined by the following claims.

Claims (10)

1. a kind of data migration method for block catenary system, including:
The new wound generation block of new block chain is created in new block catenary system, recording its data in the new wound generation block will quilt The relevant information of old block chain in the old block catenary system of migration, wherein, the relevant information of the old block chain is including described The range information of the data to be migrated of old block chain;
According to the range information, each old affair business recorded in each Geju City block in the old block chain is converted into symbol The new affairs of the new transaction data structure of the new block chain are closed, and the new affairs after conversion are moved into the new block chain In,
Wherein, the new transaction data structure of the new block chain includes instruction old affair corresponding with the new affairs and is engaged in the old area The tracing information of position in block chain.
2. data migration method according to claim 1, wherein, the range information includes will quilt in the old block chain Migration last Geju City block it is old block-identified.
3. data migration method according to claim 2, wherein, include the step of the conversion:
The each Geju City block being successively read since first Geju City block in the old block chain in the old block chain, directly Last Geju City block to be migrated into the old block chain;
For each Geju City block read, the order being engaged according to each old affair recorded in the old block is successively read this Each old affair business recorded in old block;And
It is engaged in for each old affair read, parses old affair business, the old affair business after parsing is converted to and meets the new district The new affairs of the new transaction data structure of block chain.
4. data migration method according to claim 1, wherein, the relevant information of the old block chain also includes following letter At least one of breath:The access mode information of the old block catenary system, the block of the old wound generation block of the old block chain Information recorded in head, the information in the old block chain recorded in the block head of last block to be migrated, And the world state information of the old block chain.
5. data migration method according to claim 4, wherein, the access mode information of the old block catenary system includes At least one of following information:The networking mode information of the old block catenary system, it is all in the old block catenary system The nodal information of node, the internet protocol address information of all nodes in the old block catenary system, and it is described old The application program access interface address information of block catenary system.
6. data migration method according to claim 1, wherein, the tracing information includes:The tune of the old block chain With address information, old affair corresponding with the new affairs is engaged in the old Transaction Identifier in the old block chain, and the old block The old block that old office corresponding with the new affairs is located in chain it is old block-identified.
7. data migration method according to claim 6, wherein, the call address information of the old block chain is including following At least one of information:The application program access interface address information of the old block catenary system, and the old block chain The call address information of one or more of system node.
8. according to the data migration method any one of claim 1-7, wherein, the new wound generation block of the new block chain Created when the new block chain starts using configuration file.
9. according to the data migration method any one of claim 1-7, wherein, the new affairs by after conversion migrate Include to the new block chain:
According to holding in the old block chain of old affair corresponding with the new affairs after the conversion business in the old block catenary system Row order, the new affairs after conversion are performed in the new block catenary system.
10. a kind of computer-readable storage medium, is stored thereon with computer instruction, when the computer instruction is computer-executed Computer is set to perform the data migration method for being used for block catenary system as claimed in any one of claims 1-9 wherein.
CN201710769578.7A 2017-08-31 2017-08-31 data migration method, device and storage medium for blockchain system Active CN107577427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710769578.7A CN107577427B (en) 2017-08-31 2017-08-31 data migration method, device and storage medium for blockchain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710769578.7A CN107577427B (en) 2017-08-31 2017-08-31 data migration method, device and storage medium for blockchain system

Publications (2)

Publication Number Publication Date
CN107577427A true CN107577427A (en) 2018-01-12
CN107577427B CN107577427B (en) 2019-12-13

Family

ID=61030084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710769578.7A Active CN107577427B (en) 2017-08-31 2017-08-31 data migration method, device and storage medium for blockchain system

Country Status (1)

Country Link
CN (1) CN107577427B (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256354A (en) * 2018-01-29 2018-07-06 张天 A kind of storage method and storage medium based on test data
CN108519862A (en) * 2018-03-30 2018-09-11 百度在线网络技术(北京)有限公司 Storage method, device, system and the storage medium of block catenary system
CN108829350A (en) * 2018-05-31 2018-11-16 阿里巴巴集团控股有限公司 Data migration method and device based on block chain
CN109144414A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 The multistage storage method and device of block chain data
CN109213730A (en) * 2018-09-14 2019-01-15 莆田市烛火信息技术有限公司 A kind of file storage service address changing method and system being associated with block chain main chain
CN109241357A (en) * 2018-08-08 2019-01-18 深圳市金泽智联信息技术有限公司 Chain structure model and its construction method, system and terminal device
CN109298835A (en) * 2018-08-16 2019-02-01 北京京东尚科信息技术有限公司 Data filing processing method, device, equipment and the storage medium of block chain
CN109446383A (en) * 2018-10-18 2019-03-08 尚维斯 A kind of method that multichannel recurrence seeks block on block chain
CN109447805A (en) * 2018-10-18 2019-03-08 尚维斯 A method of dissolving new chain block group new block chain automatically
CN109543455A (en) * 2018-11-06 2019-03-29 联动优势科技有限公司 A kind of data archiving method and device of block chain
CN109669709A (en) * 2018-11-26 2019-04-23 杭州秘猿科技有限公司 A kind of data migration method and data mover system of the upgrading of block chain
CN110134668A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Data migration method, device and equipment applied to block chain
CN110209347A (en) * 2019-04-04 2019-09-06 特斯联(北京)科技有限公司 A kind of retrospective date storage method
CN110232080A (en) * 2019-05-23 2019-09-13 智慧谷(厦门)物联科技有限公司 A kind of method for quickly retrieving based on block chain
EP3570489A1 (en) * 2018-05-18 2019-11-20 Siemens Aktiengesellschaft Device and method for transforming blockchain data blocks
CN110517041A (en) * 2019-07-09 2019-11-29 咪咕文化科技有限公司 Block chain management method and device, electronic equipment and storage medium
WO2019228570A2 (en) 2019-09-12 2019-12-05 Alibaba Group Holding Limited Log-structured storage systems
CN110704392A (en) * 2019-08-21 2020-01-17 平安科技(深圳)有限公司 Block chain network upgrading method and device, storage medium and electronic equipment
CN110799966A (en) * 2018-04-22 2020-02-14 因特比有限公司 Method and system for hosting a new blockchain using existing blockchain nodes
CN111309711A (en) * 2020-03-13 2020-06-19 财付通支付科技有限公司 Cross-block-chain data migration method, device, equipment and storage medium
CN112540969A (en) * 2020-11-26 2021-03-23 南京纯白矩阵科技有限公司 Data migration method for intelligent contracts among heterogeneous block chains
CN112650733A (en) * 2020-12-28 2021-04-13 杭州趣链科技有限公司 Intelligent contract state data processing method, system and device
CN113806335A (en) * 2021-09-28 2021-12-17 杭州溪塔科技有限公司 Data migration method and device applied to block chain
US11294881B2 (en) 2019-09-12 2022-04-05 Advanced New Technologies Co., Ltd. Log-structured storage systems
CN115630046A (en) * 2022-12-22 2023-01-20 国网数字科技控股有限公司 Block chain migration method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321769A1 (en) * 2015-05-01 2016-11-03 Monegraph, Inc. Online content management and marketplace platform
US20160323109A1 (en) * 2015-05-01 2016-11-03 Monegraph, Inc. Rights transfers using block chain transactions
CN106598490A (en) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 Access method for block chain data and block chain management system
US20170134161A1 (en) * 2015-11-06 2017-05-11 Cable Television Laboratories, Inc Blockchaining for media distribution
CN106970921A (en) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 A kind of data migration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321769A1 (en) * 2015-05-01 2016-11-03 Monegraph, Inc. Online content management and marketplace platform
US20160323109A1 (en) * 2015-05-01 2016-11-03 Monegraph, Inc. Rights transfers using block chain transactions
US20170134161A1 (en) * 2015-11-06 2017-05-11 Cable Television Laboratories, Inc Blockchaining for media distribution
CN106970921A (en) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 A kind of data migration method and device
CN106598490A (en) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 Access method for block chain data and block chain management system

Cited By (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256354A (en) * 2018-01-29 2018-07-06 张天 A kind of storage method and storage medium based on test data
CN108519862B (en) * 2018-03-30 2020-03-17 百度在线网络技术(北京)有限公司 Storage method, device and system of block chain system and storage medium
CN108519862A (en) * 2018-03-30 2018-09-11 百度在线网络技术(北京)有限公司 Storage method, device, system and the storage medium of block catenary system
CN110799966A (en) * 2018-04-22 2020-02-14 因特比有限公司 Method and system for hosting a new blockchain using existing blockchain nodes
EP3570489A1 (en) * 2018-05-18 2019-11-20 Siemens Aktiengesellschaft Device and method for transforming blockchain data blocks
CN108829350A (en) * 2018-05-31 2018-11-16 阿里巴巴集团控股有限公司 Data migration method and device based on block chain
US10649953B2 (en) 2018-05-31 2020-05-12 Alibaba Group Holding Limited Blockchain-based data migration method and apparatus
CN109144414A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 The multistage storage method and device of block chain data
CN111897498A (en) * 2018-07-27 2020-11-06 创新先进技术有限公司 Multi-level storage method and device for block chain data
CN109144414B (en) * 2018-07-27 2020-07-07 阿里巴巴集团控股有限公司 Multi-level storage method and device for block chain data
CN109241357A (en) * 2018-08-08 2019-01-18 深圳市金泽智联信息技术有限公司 Chain structure model and its construction method, system and terminal device
CN109298835A (en) * 2018-08-16 2019-02-01 北京京东尚科信息技术有限公司 Data filing processing method, device, equipment and the storage medium of block chain
CN109298835B (en) * 2018-08-16 2022-04-26 北京京东尚科信息技术有限公司 Data archiving processing method, device, equipment and storage medium of block chain
CN109213730A (en) * 2018-09-14 2019-01-15 莆田市烛火信息技术有限公司 A kind of file storage service address changing method and system being associated with block chain main chain
CN109447805A (en) * 2018-10-18 2019-03-08 尚维斯 A method of dissolving new chain block group new block chain automatically
CN109446383A (en) * 2018-10-18 2019-03-08 尚维斯 A kind of method that multichannel recurrence seeks block on block chain
CN109543455A (en) * 2018-11-06 2019-03-29 联动优势科技有限公司 A kind of data archiving method and device of block chain
CN109669709B (en) * 2018-11-26 2022-04-08 杭州溪塔科技有限公司 Data migration method and data migration system for block chain upgrading
CN109669709A (en) * 2018-11-26 2019-04-23 杭州秘猿科技有限公司 A kind of data migration method and data mover system of the upgrading of block chain
CN110209347A (en) * 2019-04-04 2019-09-06 特斯联(北京)科技有限公司 A kind of retrospective date storage method
CN110134668A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Data migration method, device and equipment applied to block chain
CN110232080A (en) * 2019-05-23 2019-09-13 智慧谷(厦门)物联科技有限公司 A kind of method for quickly retrieving based on block chain
CN110517041A (en) * 2019-07-09 2019-11-29 咪咕文化科技有限公司 Block chain management method and device, electronic equipment and storage medium
CN110517041B (en) * 2019-07-09 2022-06-03 咪咕文化科技有限公司 Block chain management method and device, electronic equipment and storage medium
CN110704392B (en) * 2019-08-21 2023-03-31 平安科技(深圳)有限公司 Block chain network upgrading method and device, storage medium and electronic equipment
CN110704392A (en) * 2019-08-21 2020-01-17 平安科技(深圳)有限公司 Block chain network upgrading method and device, storage medium and electronic equipment
WO2021031655A1 (en) * 2019-08-21 2021-02-25 平安科技(深圳)有限公司 Method and apparatus for upgrading blockchain network, storage medium, and electronic device
EP3673376A4 (en) * 2019-09-12 2020-12-02 Advanced New Technologies Co., Ltd. Log-structured storage systems
US11093455B2 (en) 2019-09-12 2021-08-17 Advanced New Technologies Co., Ltd. Log-structured storage systems
US11294881B2 (en) 2019-09-12 2022-04-05 Advanced New Technologies Co., Ltd. Log-structured storage systems
WO2019228570A2 (en) 2019-09-12 2019-12-05 Alibaba Group Holding Limited Log-structured storage systems
WO2021179655A1 (en) * 2020-03-13 2021-09-16 腾讯科技(深圳)有限公司 Cross-blockchain data migration method and apparatus, device, and storage medium
CN111309711A (en) * 2020-03-13 2020-06-19 财付通支付科技有限公司 Cross-block-chain data migration method, device, equipment and storage medium
CN112540969A (en) * 2020-11-26 2021-03-23 南京纯白矩阵科技有限公司 Data migration method for intelligent contracts among heterogeneous block chains
CN112540969B (en) * 2020-11-26 2023-07-14 南京纯白矩阵科技有限公司 Data migration method of intelligent contracts among heterogeneous block chains
CN112650733A (en) * 2020-12-28 2021-04-13 杭州趣链科技有限公司 Intelligent contract state data processing method, system and device
CN113806335A (en) * 2021-09-28 2021-12-17 杭州溪塔科技有限公司 Data migration method and device applied to block chain
CN115630046A (en) * 2022-12-22 2023-01-20 国网数字科技控股有限公司 Block chain migration method and device

Also Published As

Publication number Publication date
CN107577427B (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN107577427A (en) For the data migration method of block catenary system, equipment and storage medium
JP6865851B2 (en) Blockchain World State Markle Patricia Tri Tree Subtree Construction
CN109274754A (en) For the method for synchrodata, equipment and storage medium in block chain network
WO2016177026A1 (en) Data processing method and apparatus of decentralized autonomous organization
CN110442652A (en) A kind of across chain data processing method and device based on block chain
CN109460405A (en) For the block generation method of block chain network, synchronous method, storage medium, calculate equipment
CN107395674A (en) A kind of application system accesses the method and device of isomery block platform chain
Hoffman et al. Smart papers: Dynamic publications on the blockchain
Cassioli et al. On the convergence of inexact block coordinate descent methods for constrained optimization
JP2020046738A (en) History storage system of block chain and history storage method of block chain
US11641280B1 (en) Computing technologies for enabling blockchain-based digital tokens with asset-specific attributes
Srivastava et al. Scope of cloud computing in business: A compendious and methodical analysis of trends in publications and patents
CN110473108A (en) Contract generation method and device based on block chain
Azouzi et al. Customization of multi-tenant learning process as a service with Business Process Feature Model
Sunyé Model consistency for distributed collaborative modeling
Shettigar et al. Blockchain-based grievance management system
Murray-Rust et al. Towards executable representations of social machines
Schmitt The significance of memes for the successful formation of autonomous personal knowledge management systems
Nijssen et al. The lifecycle of a user transaction in a hyperledger fabric blockchain network part 1: propose and endorse
Coplien Software design patterns
CN114090962B (en) Intelligent publishing system and method based on big data
Yan et al. Handling conditional queries on hyperledger fabric efficiently
Brindha et al. Network simulation software architecture of blockchain: A model-led viewpoint
Aman et al. Stochastic sharing calculus for reasoning about social networks
CN108459887A (en) A kind of service flow management method, engine and computer 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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 200120 T3, 1788, 1800 Century Avenue, free trade Experimental Zone, Pudong New Area, Shanghai

Patentee after: Shanghai insurance exchange, Limited by Share Ltd

Address before: 200120 Shanghai Pudong New Area China 22 / F, financial information center, Dongyuan Road, Pudong New Area, Shanghai

Patentee before: Shanghai insurance exchange, Limited by Share Ltd