CN110210845A - For the method, apparatus of block chain Data Migration, medium and calculate equipment - Google Patents

For the method, apparatus of block chain Data Migration, medium and calculate equipment Download PDF

Info

Publication number
CN110210845A
CN110210845A CN201910503915.7A CN201910503915A CN110210845A CN 110210845 A CN110210845 A CN 110210845A CN 201910503915 A CN201910503915 A CN 201910503915A CN 110210845 A CN110210845 A CN 110210845A
Authority
CN
China
Prior art keywords
catenary system
block catenary
transaction
block
user status
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
CN201910503915.7A
Other languages
Chinese (zh)
Other versions
CN110210845B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910503915.7A priority Critical patent/CN110210845B/en
Publication of CN110210845A publication Critical patent/CN110210845A/en
Application granted granted Critical
Publication of CN110210845B publication Critical patent/CN110210845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

Embodiments of the present invention provide a kind of method for block chain Data Migration, it include: the corresponding transaction of the intelligent contract of at least one of described first block catenary system to be terminated based on the first Transaction Information, and export at least one corresponding User Status data of intelligence contract described in the first block catenary system;At least one described intelligent contract is disposed in the second block catenary system based on the second Transaction Information, and imports the User Status data to the second block catenary system;And it is based on third Transaction Information, open at least one described corresponding transaction of intelligence contract in the second block catenary system.Wherein the User Status data be in terminating the first block catenary system described in the corresponding transaction of at least one intelligent contract when described in the first block catenary system described in the corresponding user state information of at least one intelligent contract.Embodiments of the present invention additionally provide a kind of for the device of block chain Data Migration, medium and calculating equipment.

Description

For the method, apparatus of block chain Data Migration, medium and calculate equipment
Technical field
Embodiments of the present invention are related to Internet technical field, more specifically, embodiments of the present invention are related to one kind For the method, apparatus of block chain Data Migration, medium and calculate equipment.
Background technique
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.Herein Description recognizes it is the prior art not because not being included in this section.
In existing block chain technology, either publicly-owned chain or alliance's chain, all transaction are all to fall in each area On block chain node.Block chain node generallys use MPT (Merkle Patricia Tree) data structure and carries out data storage.Its In, MPT data structure is for transaction, all account datas and all receipts all in memory block catenary system.? In MPT data structure, the data access of a memory node needs multiple disk read-write operation, and each storage saves each time It is multiple memory nodes that the change of point, which can all cause a memory node of MPT data structure to be fissioned,.Therefore, with block linkwork The trading volume of system constantly increases (for example, after trading volume reaches more than one hundred million), the data of the MPT data structure of each block chain node Amount of storage constantly increases, and the memory node of MPT data structure is also significantly increased, and causes needed for executing each transaction in this way Data read-write operation become complicated cumbersome so that block catenary system executes speed and declines to a great extent, the transaction in block catenary system Error rate high frequency occur.
Summary of the invention
In the present context, the embodiment provides a kind of method, apparatus for block chain Data Migration, Jie Matter and system solve block linkwork by way of carrying out Data Migration between two block catenary systems to a certain extent Block catenary system performance sharply declines the problem of constantly increasing with error rate after trading volume increases in system.
Embodiments of the present invention in a first aspect, provide a kind of method for block chain Data Migration, be applied to Manage platform.The described method includes: the first Transaction Information is sent to the first block catenary system, to terminate the first block linkwork The corresponding transaction of the intelligent contract of at least one of system;By at least one intelligent contract pair described in the first block catenary system The User Status data answered are exported to database, wherein the User Status data are in terminating the first block catenary system The corresponding transaction of at least one described intelligent contract when described at least one described intelligent contract in the first block catenary system Corresponding user state information;The second Transaction Information is sent to the second block catenary system, in the second block catenary system At least one described intelligent contract of deployment;The User Status number is imported from the database to the second block catenary system According to;And third Transaction Information is sent to the second block catenary system, so that the second block catenary system is based on the use Family status data opens at least one described corresponding transaction of intelligence contract in the second block catenary system.
In one embodiment of the invention, described to send the first Transaction Information to the first block catenary system, to terminate The corresponding transaction of the intelligent contract of at least one of first block catenary system is stated, including institute is called according to first Transaction Information The corresponding method of shutting the book of each intelligent contract at least one intelligent contract is stated, to carry out end by the method for shutting the book Only transaction corresponding to the corresponding intelligent contract of the method for shutting the book.In one embodiment of the invention, it is described to Before first block catenary system sends the first Transaction Information, the method also includes every at least one described intelligent contract It shuts the book method described in setting in a intelligence contract.
In one embodiment of the invention, the first block catenary system and the second block catenary system are mutually only It is vertical;Alternatively, the first block catenary system is main chain, the second block catenary system is side chain corresponding with the main chain.
It in one embodiment of the invention, is main chain, the second block catenary system in the first block catenary system When for side chain corresponding with the main chain, third Transaction Information is sent to the second block catenary system described, so that described Second block catenary system based on the User Status data open in the second block catenary system described at least one intelligence After the corresponding transaction of contract, the method also includes: Xiang Suoshu the second block catenary system sends first Transaction Information, with Terminate at least one corresponding transaction of intelligence contract described in the second block catenary system;It will be in the second block catenary system At least one described corresponding second user status data of intelligence contract is exported to the database, wherein the second user shape State data be when terminating described in the second block catenary system the corresponding transaction of at least one intelligent contract described in the secondth area At least one described corresponding user state information of intelligence contract in block catenary system;From the database to first block The second user status data is imported in catenary system, to update the first block chain by the second user status data The User Status data in system;And the third Transaction Information is sent to the first block catenary system, so that institute State the first block catenary system based on the second user status data open in the first block catenary system described at least one The corresponding transaction of a intelligence contract.
In one embodiment of the invention, described to send the first Transaction Information to the first block catenary system, including pass through Scheduled block chain address sends first Transaction Information to the first block catenary system.
In one embodiment of the invention, the second Transaction Information is sent to the second block catenary system described, in institute It states and is disposed in the second block catenary system after at least one described intelligent contract, the method also includes to the second block chain System setting is for opening the unlatching method of commerce of at least one corresponding transaction of intelligence contract.
In one embodiment of the invention, described to send third Transaction Information to the second block catenary system, so that The second block catenary system based on the User Status data open in the second block catenary system described at least one The corresponding transaction of intelligent contract, including the unlatching method of commerce is called according to the third Transaction Information, to be based on the use Family status data opens at least one described corresponding transaction of intelligence contract in the second block catenary system.
In one embodiment of the invention, before second Transaction Information of transmission to the second block catenary system, institute The method of stating further include verification export to the database the User Status data it is whether correct, obtain the first checked result. Wherein, in the case where first checked result is correct, Xiang Suoshu the second block catenary system sends the second transaction letter Breath.
In one embodiment of the invention, it is described to the second block catenary system send third Transaction Information it Before, whether the User Status data for importeding into the second block catenary system the method also includes verification are correct, obtain Second checked result.Wherein, in the case where second checked result is correct, Xiang Suoshu the second block catenary system sends institute State third Transaction Information.
The second aspect of embodiment of the present invention provides a kind of method for block chain Data Migration, is applied to the One block catenary system.The described method includes: the first Transaction Information is received, to terminate at least one described corresponding friendship of intelligence contract Easily;And export at least one described corresponding User Status data of intelligence contract to database, wherein the User Status Data be in terminating the first block catenary system described in the corresponding transaction of at least one intelligent contract when described in the firstth area At least one described corresponding user state information of intelligence contract in block catenary system;Wherein, at least one described intelligent contract Also disposed in the second block catenary system according to the second Transaction Information;The User Status data are also fed to described In two block catenary systems, so that the second block catenary system is based on the User Status when receiving third Transaction Information Data open at least one described corresponding transaction of intelligence contract in the second block catenary system.Wherein, firstth area Block catenary system is different from the second block catenary system.
In one embodiment of the invention, the first Transaction Information of the reception, to terminate at least one described intelligently conjunction About corresponding transaction, including each intelligent contract pair at least one described intelligent contract is called according to first Transaction Information The method of shutting the book answered;And according to the corresponding intelligent contract institute of method that shuts the book described in method termination that shuts the book Corresponding transaction.
In one embodiment of the invention, before the first Transaction Information of the reception, the method also includes in institute State method of shutting the book described in setting in the intelligent contract of each of at least one intelligent contract.
In one embodiment of the invention, the first block catenary system is main chain, and the second block catenary system is The corresponding side chain of the main chain exports the corresponding User Status data of at least one described intelligent contract to database described Later, the method also includes importing at least one described corresponding second user status data of intelligence contract, by described Second user status data updates the User Status data, wherein the second user status data is to terminate described the In second block catenary system described in when the corresponding transaction of at least one intelligent contract described in two block catenary systems it is described at least The corresponding user state information of one intelligence contract;And third Transaction Information is received, to be based on the second user status number According to corresponding transaction of at least one intelligent contract described in opening in the first block catenary system.
The third aspect of embodiment of the present invention provides a kind of method for block chain Data Migration, is applied to the Two block catenary systems.The described method includes: receive the second Transaction Information, with disposed in the second block catenary system it is described extremely A few intelligent contract, wherein at least one described intelligent contract is also deployed in the first block catenary system;It is imported from database At least one described corresponding User Status data of intelligence contract, wherein the User Status data are in the first block catenary system Based on the first Transaction Information terminate in the first block catenary system described in the corresponding transaction of at least one intelligent contract when, institute State at least one described corresponding user state information of intelligence contract in the first block catenary system;The database be also used to from The User Status data are imported in the first block catenary system;Wherein, the first block catenary system and secondth area Block catenary system is different;And third Transaction Information is received, to open the second block linkwork based on the User Status data At least one described corresponding transaction of intelligence contract in system.
In one embodiment of the invention, in the second Transaction Information of the reception, in the second block catenary system After at least one intelligent contract described in middle deployment, the method also includes being arranged the second block catenary system for opening The unlatching method of commerce of at least one corresponding transaction of intelligence contract.
In one embodiment of the invention, the reception third Transaction Information, to be opened based on the User Status data At least one described corresponding transaction of intelligence contract in the second block catenary system is opened, including is traded and is believed according to the third Breath calls the unlatching method of commerce, and corresponding according at least one described intelligent contract of unlatching method of commerce unlatching Transaction.
In one embodiment of the invention, the first block catenary system and the second block catenary system are mutually only It is vertical;Alternatively, the first block catenary system is main chain, the second block catenary system is that the first block catenary system is corresponding Side chain.
It in one embodiment of the invention, is main chain, the second block catenary system in the first block catenary system When side chain corresponding for the first block catenary system, in the reception third Transaction Information, to be based on the User Status number After corresponding transaction of at least one intelligent contract described in opening in the second block catenary system, the method also includes The first Transaction Information is received, to terminate at least one corresponding transaction of intelligence contract described in the second block catenary system, with And at least one corresponding second user status data of intelligence contract described in the second block catenary system is exported to data Library, wherein the second user status data is to terminate at least one intelligent contract pair described in the second block catenary system At least one described corresponding user state information of intelligence contract in second block catenary system described in when the transaction answered.Wherein, The second user status data is used to update the User Status data in the first block catenary system.
The fourth aspect of embodiment of the present invention provides a kind of device for block chain Data Migration, is set to pipe Platform.Described device includes the first sending module, the first Data Migration module, the second sending module, the second Data Migration mould Block and third sending module.First sending module is used to send the first Transaction Information to the first block catenary system, with end The only corresponding transaction of the intelligent contract of at least one of described first block catenary system.The first Data Migration module is used for will The corresponding User Status data of at least one intelligent contract described in the first block catenary system is exported to database, wherein institute State User Status data be in terminating the first block catenary system described in the corresponding transaction of at least one intelligent contract when At least one described corresponding user state information of intelligence contract in the first block catenary system.Described second sends mould Block, for sending the second Transaction Information to the second block catenary system, with disposed in the second block catenary system it is described at least One intelligent contract.The second Data Migration module is used for from the database to described in the second block catenary system importing User Status data.The third sending module is used to send third Transaction Information to the second block catenary system, so that institute State the second block catenary system based on the User Status data open in the second block catenary system described at least one intelligence It can the corresponding transaction of contract.
In one embodiment of the invention, first sending module is specifically used for according to the first Transaction Information tune With the corresponding method of shutting the book of intelligent contract each at least one described intelligent contract, to pass through the method for shutting the book To terminate transaction corresponding to the corresponding intelligent contract of the method for shutting the book.
In one embodiment of the invention, described device further includes method setup module of shutting the book.The stopping is handed over Easy method setup module is used for before first Transaction Information of transmission to the first block catenary system, at least one described intelligence Can shut the book in the intelligent contract of each of contract method described in setting.
In one embodiment of the invention, the first block catenary system and the second block catenary system are mutually only It is vertical;Alternatively, the first block catenary system is main chain, the second block catenary system is side chain corresponding with the main chain.
In one embodiment of the invention, first sending module is also used to based on the first block catenary system Chain when the second block catenary system is side chain corresponding with the main chain, is sent described to the second block catenary system Third Transaction Information, so that the second block catenary system is based on the User Status data and opens the second block catenary system In the corresponding transaction of at least one described intelligent contract after, Xiang Suoshu the second block catenary system sends the first transaction letter Breath, to terminate at least one corresponding transaction of intelligence contract described in the second block catenary system.First Data Migration Module is also used to lead at least one corresponding second user status data of intelligence contract described in the second block catenary system Out to the database, wherein the second user status data is to terminate at least one described in the second block catenary system Corresponding user's shape of at least one described intelligent contract in second block catenary system described in when a intelligence corresponding transaction of contract State information.The second Data Migration module is also used to import described into the first block catenary system from the database Two User Status data, to update user's shape in the first block catenary system by the second user status data State data.The third sending module is also used to send the third Transaction Information to the first block catenary system, so that institute State the first block catenary system based on the second user status data open in the first block catenary system described at least one The corresponding transaction of a intelligence contract.
In one embodiment of the invention, described to send the first Transaction Information to the first block catenary system, including pass through Scheduled block chain address sends first Transaction Information to the first block catenary system.
In one embodiment of the invention, described device further includes opening method of commerce setup module.The unlatching is handed over Easy method setup module is used to send the second Transaction Information to the second block catenary system described, in the second block linkwork Disposed in system after at least one described intelligent contract, to the second block catenary system setting for open it is described at least one The unlatching method of commerce of the corresponding transaction of intelligent contract.
In one embodiment of the invention, the third sending module is specifically used for according to the third Transaction Information tune With the unlatching method of commerce, with described in being opened in the second block catenary system based on the User Status data at least one The corresponding transaction of a intelligence contract.
In one embodiment of the invention, described device further includes the first verification module.The first verification module is used In before second Transaction Information of transmission to the second block catenary system, verification exports to user's shape of the database Whether state data are correct, obtain the first checked result;Wherein, second sending module is specifically used in the first verification knot In the case that fruit is correct, Xiang Suoshu the second block catenary system sends second Transaction Information.
In one embodiment of the invention, described device further includes the second verification module.The second verification module is used In before the transmission third Transaction Information to the second block catenary system, verification imported into the second block catenary system The User Status data it is whether correct, obtain the second checked result.Wherein, the third sending module is specifically used in institute It states in the case that the second checked result is correct, Xiang Suoshu the second block catenary system sends the third Transaction Information.
At the 5th aspect of embodiment of the present invention, a kind of device for block chain Data Migration is provided, is set to First block catenary system.Described device includes the first receiving module and the first data export module.First receiving module For receiving the first Transaction Information, to terminate at least one described corresponding transaction of intelligence contract.First data export mould Block is used to export at least one described corresponding User Status data of intelligence contract to database, wherein the User Status number According to the first block described in when transaction corresponding at least one intelligent contract described in terminating the first block catenary system At least one described corresponding user state information of intelligence contract in catenary system;Wherein, at least one described intelligent contract is also It is disposed in the second block catenary system according to the second Transaction Information;The User Status data are also led from the database Enter into the second block catenary system, so that the second block catenary system is based on institute when receiving third Transaction Information It states User Status data and opens corresponding transaction of at least one described intelligent contract in the second block catenary system.Wherein, The first block catenary system is different from the second block catenary system.
In one embodiment of the invention, first receiving module is specifically used for according to the first Transaction Information tune With the corresponding method of shutting the book of intelligent contract each at least one described intelligent contract, and according to the side of shutting the book Transaction corresponding to the corresponding intelligent contract of method of shutting the book described in method termination.
In one embodiment of the invention, described device further includes method setup module of shutting the book.The stopping is handed over Easy method setup module is used for before the first Transaction Information of the reception, each intelligence at least one described intelligent contract Can shut the book in contract method described in setting.
In one embodiment of the invention, described device further includes the first data import modul.First data are led Enter module for being main chain in the first block catenary system, the second block catenary system is the corresponding side chain of the main chain When, it exports by least one described corresponding User Status data of intelligence contract to database, imports described at least one The corresponding second user status data of a intelligence contract, to pass through the second user status data update User Status number According to, wherein the second user status data is to terminate at least one intelligent contract described in the second block catenary system At least one described corresponding user state information of intelligence contract in second block catenary system described in when corresponding transaction.It is described First receiving module is also used to receive third Transaction Information, to open first block based on the second user status data At least one described corresponding transaction of intelligence contract in catenary system.
6th aspect of embodiment of the present invention, provides a kind of device for block chain Data Migration, is set to the Two block catenary systems.Described device includes the second receiving module and the second data import modul.Second receiving module is used In receiving the second Transaction Information, to dispose at least one described intelligent contract in the second block catenary system, wherein described At least one intelligent contract is also deployed in the first block catenary system.Second data import modul, for being led from database Enter at least one described corresponding User Status data of intelligence contract, wherein the User Status data are in the first block linkwork System based on the first Transaction Information terminate in the first block catenary system described in the corresponding transaction of at least one intelligent contract when, At least one described corresponding user state information of intelligence contract in the first block catenary system;The database is also used to The User Status data are imported from the first block catenary system;Wherein, the first block catenary system and described second Block catenary system is different.Second receiving module is also used to receive third Transaction Information, to be based on the User Status data Open at least one described corresponding transaction of intelligence contract in the second block catenary system.
In one embodiment of the invention, described device further includes opening method of commerce setup module.The unlatching is handed over Easy method setup module, in the second Transaction Information of receptions, with described in being disposed in the second block catenary system extremely It is corresponding for opening at least one described intelligent contract to the second block catenary system setting after a few intelligent contract The unlatching method of commerce of transaction.
In one embodiment of the invention, the reception third Transaction Information, to open the second block catenary system In the corresponding transaction of at least one described intelligent contract, including the unlatching counterparty is called according to the third Transaction Information Method, and at least one described corresponding transaction of intelligence contract is opened according to the unlatching method of commerce.
In one embodiment of the invention, the first block catenary system and the second block catenary system are mutually only It is vertical;Alternatively, the first block catenary system is main chain, the second block catenary system is that the first block catenary system is corresponding Side chain.
In one embodiment of the invention, described device further includes the second data export module.Described second receives mould Block is also used in the first block catenary system be main chain, and the second block catenary system is corresponding for the first block catenary system Side chain when, the third Transaction Information is being received, to open the second block catenary system based on the User Status data In the corresponding transaction of at least one described intelligent contract after, the first Transaction Information is received, to terminate the second block chain At least one corresponding transaction of intelligence contract described in system.The second data export module is used for the second block chain At least one corresponding second user status data of intelligence contract described in system is exported to database, wherein the second user Status data be when terminating described in the second block catenary system the corresponding transaction of at least one intelligent contract described in second At least one described corresponding user state information of intelligence contract in block catenary system;Wherein, the second user status number According to for updating the User Status data in the first block catenary system.
7th aspect of embodiment of the present invention, provides a kind of computer readable storage medium, being stored thereon with can hold Row instruction, described instruction make processor execute the first aspect of embodiment, second according to the present invention when being executed by processor The method of block chain Data Migration is used for provided by aspect or the third aspect.
7th aspect of embodiment of the present invention, provides a kind of calculating equipment.The calculating equipment includes one or more A memory and one or more processors.One or more of memories are stored with executable instruction.It is one or Multiple processors execute the executable instruction, to realize according to the present invention the first aspect of embodiment, second aspect or The method of block chain Data Migration is used for provided by the third aspect.
Method, apparatus, system and the medium for block chain Data Migration of embodiment according to the present invention, in the area Liang Ge It, can be only by the corresponding user of the intelligent contract of at least one in the first block catenary system when carrying out Data Migration between block catenary system Status data moves in the second block catenary system, wherein the User Status data are to terminate the first block catenary system In the corresponding transaction of at least one described intelligent contract when described in the first block catenary system it is described at least one intelligently close About corresponding user state information, so as to not have to all migrate whole transaction data of the first block catenary system.This Sample, on the one hand the second block catenary system can continue starting new transaction based on User Status data, so that the second block linkwork There is no the burden of historical transaction record, transactions velocity can greatly improve system, to avoid trading volume increasing to a certain extent The performance of first block catenary system sharply declines after big and error rate constantly increases to transaction bring negative effect.On the other hand It can also be inquired in the first block catenary system when needing query history transaction data, save the complete of transaction data Property, the just transparent feature of block chain is not lost.
According to some embodiments of the present invention, this is used for the method, apparatus of block chain Data Migration, medium and calculates equipment It can be applied between the main chain and side chain of a block catenary system.Wherein it is possible to by the intelligent contract of at least one of main chain Corresponding user state information moves to side chain when shutting the book.Then side chain continues to execute transaction, and is sometime working as side When at least one intelligent contract of chain is not re-used as the intelligent contract of hot spot, stop at least one intelligence in side chain Contract transaction, and the corresponding user state information of the intelligent contract of at least one of side chain moves to main chain when will shut the book To update at least one corresponding user state information of intelligence contract of this in main chain, and continue to execute main chain after the completion of migration Transaction.By this method, it solves the problems, such as that block catenary system calculates pressure in the peak traffic phase and increases, decreases single-stranded (main Chain or side chain) transaction total amount to the too fast decline of calculated performance that avoids this single-stranded.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, above-mentioned and other mesh of exemplary embodiment of the invention , feature and advantage will become prone to understand.In the accompanying drawings, if showing by way of example rather than limitation of the invention Dry embodiment, in which:
Fig. 1 schematically shows the method, apparatus for block chain Data Migration of embodiment, Jie according to the present invention Matter and the application scenarios for calculating equipment;
Block chain Data Migration is used for applied to management platform Fig. 2 schematically shows according to an embodiment of the present invention Method flow chart;
Fig. 3 schematically show it is according to an embodiment of the present invention be applied to the first block catenary system for block chain number According to the flow chart of the method for migration;
Fig. 4 schematically shows it is according to an embodiment of the present invention be applied to the second block catenary system for block chain number According to the flow chart of the method for migration;
Fig. 5 diagrammatically illustrates the design according to an embodiment of the present invention for block catenary system Data Migration and illustrates;
Fig. 6 diagrammatically illustrates the block chain data that are used for according to another embodiment of the present invention for being applied to management platform and moves The flow chart of the method for shifting;
Fig. 7 diagrammatically illustrate it is according to an embodiment of the present invention between main chain and side chain the design of Data Migration show Meaning;
Fig. 8 diagrammatically illustrate it is according to an embodiment of the present invention be set to management platform for block chain Data Migration The block diagram of device;
Fig. 9 diagrammatically illustrate it is according to an embodiment of the present invention be set to the first block catenary system for block chain data The block diagram of the device of migration;
Figure 10 diagrammatically illustrate it is according to an embodiment of the present invention be set to the second block catenary system for block chain number According to the block diagram of the device of migration;
Figure 11, which is diagrammatically illustrated, is adapted for carrying out the method according to an embodiment of the present invention for block chain Data Migration The schematic diagram of program product;And
Figure 12, which is diagrammatically illustrated, is adapted for carrying out the method according to an embodiment of the present invention for block chain Data Migration Calculate the schematic diagram of equipment.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing this A little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with any Mode limits the scope of the invention.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and energy It is enough that the scope of the present disclosure is completely communicated to those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, method Or computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete software The form that (including firmware, resident software, microcode etc.) or hardware and software combine.
Embodiment according to the present invention, propose it is a kind of by the method, apparatus of block chain Data Migration, medium and based on Calculate equipment.
Herein, it is to be understood that any number of elements in the description and the appended drawings is used to example rather than limits, And any name is only used for distinguishing, without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Summary of the invention
The inventors discovered that if original block catenary system includes to shut the book and function derived from data, new block chain System include data import and open transaction function, so that it may terminate the transaction in original block catenary system, then can will In the user state information export for terminating the transaction moment in original block catenary system, then the user state information is imported into newly Block catenary system, be finally then turned on the transaction of new block catenary system.In this way, new block catenary system can leave history behind The burden of transaction, to a certain extent solve block catenary system in trading volume increase after, block catenary system performance sharply decline with The problem of error rate constantly increases.And original block catenary system can be used for user query historical trading, not lose block linkwork The just transparent feature of system.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiment party of the invention Formula.
Application scenarios overview
Referring initially to Fig. 1.
Fig. 1 schematically shows the method, apparatus for block chain Data Migration of embodiment, Jie according to the present invention Matter and the application scenarios for calculating equipment.
As shown in Figure 1, the application scenarios include management platform 10, the first block catenary system 11 and the second block catenary system 12.Management platform 10 can be communicated with the first block catenary system 11 and the second block chain 12.
According to an embodiment of the invention, the task of management platform 10 includes closing original block catenary system (for example, first Block catenary system 11) transaction, export User Status data, migrated users status data and open new block catenary system The transaction etc. of (for example, second block catenary system 12).
According to an embodiment of the invention, the first block catenary system 11 can be used as original block catenary system.First block The main task of catenary system 11 includes shutting the book and exporting User Status data.
According to one embodiment of present invention, the second block catenary system 12 can be used as corresponding with original block catenary system New block catenary system.The task of second block catenary system 12 may include disposing intelligent contract, importing from the first block The User Status data of catenary system 11 and closing and unlatching transaction etc..
First block catenary system 11 and the second block catenary system 12 respectively may include multiple nodes.Multiple node can be with It is in communication with each other.Each node can correspond at least one database (for example, LevelDB database).Multiple node can be with shape The database storage system for being distributed in all parts of the world at one, operating capable of being cooperateed with.Multiple node can be respectively deployed in entirely The server of ball various regions, each node can be server or server cluster, and server/server cluster can be to provide respectively The server/server cluster of kind service.
According to some embodiments of the present invention, the first block catenary system 11 can be main chain, and the second block catenary system 12 can With side chain also corresponding with main chain.According to an embodiment of the invention, can also be incited somebody to action after the Data Migration to side chain by main chain The data of side chain are moved back to main chain.
It should be understood that Fig. 1 is only illustrative, management platform therein, number of node in block catenary system etc. are only It is only illustrative.
Illustrative methods
Below with reference to the application scenarios of Fig. 1, the use of illustrative embodiments according to the present invention is described with reference to Fig. 2~Fig. 7 In the method for block chain Data Migration.
It is applied to moving for block chain data for management platform 10 Fig. 2 schematically shows according to an embodiment of the present invention The flow chart of the method for shifting;
As shown in Fig. 2, the method for block chain Data Migration that should be applied to management platform 10 may include operation S201~operation S205.
In operation S201, the first Transaction Information is sent to the first block catenary system 11, to terminate the first block linkwork The corresponding transaction of the intelligent contract of at least one of system 11.For example, it may be by scheduled block chain address (for example, specified Block chain account) the first block of Xiang Suoshu catenary system 11 sends first Transaction Information.It can on first block catenary system 11 Multiple intelligent contracts can be deployed with.Wherein intelligent contract is a kind of trading rules.
According to one embodiment of present invention, which can be the transaction for type of shutting the book.When first After block catenary system 11 receives management the first Transaction Information of transmission of platform 10, the first block catenary system 11 verifying first transaction Information, and first Transaction Information is executed after being verified, so that the first block catenary system stops receiving any transaction, and throw The All Activity in trading pit is abandoned, to stop All Activity.According to one embodiment of present invention, the first transaction letter is verified Breath includes that verifying initiates whether the account of first Transaction Information is the management preassigned block chain address of platform 10;If tested Card determines that the account for initiating first Transaction Information is not the management preassigned block chain address of platform 10, then first transaction Information Authentication does not pass through, and the first block catenary system 11 can initiate the account of first Transaction Information to the management feedback of platform 10 at this time Family is not the management preassigned block chain address of platform 10, manages platform 10 with help and is managed analysis;If after verifying Determine that the account for initiating first Transaction Information is the management preassigned block chain address of platform 10, at this time if necessary to the One Transaction Information carries out other verifyings and then continues to execute this other verifying, alternatively, determined if without other verifyings this first Transaction Information is verified.In this case, after the first Transaction Information is verified, first can be passed through in operation S201 Transaction Information can terminate the corresponding transaction of all intelligent contract in the first block catenary system 11.
Management platform 10 in the embodiment of the present invention can before sending the first Transaction Information to the first block catenary system 11 First to obtain the performance data of the first block catenary system 11, and judge whether the performance data has been more than preset threshold.Wherein, it manages Platform 10 can send described first to the first block catenary system 11 and hand over when determining the performance data more than preset threshold Easy information (operation S201).Certainly according to another embodiment of the present disclosure, the acquisition of the performance data of the first block catenary system 11 And the judgement of the performance data can also manually be carried out by operation maintenance personnel, believe to manage platform 10 and trade in transmission first Before breath, the performance data of the first block catenary system 11 can not also be obtained and judged.
According to another embodiment of the present invention, the intelligent contract of each of at least one described intelligent contract is provided with correspondence Method of shutting the book.It can be called according to first Transaction Information in operation S201 at least one described intelligent contract The corresponding method of shutting the book of each intelligence contract, to shut the book method by described and terminate the method pair of shutting the book Transaction corresponding to the intelligent contract answered.It in this case, can be according to the intelligent contract to be terminated in operation S201 Transaction targetedly terminates the corresponding transaction of corresponding intelligent contract by the first Transaction Information.
In operation S202, by least one corresponding User Status of intelligence contract described in the first block catenary system 11 Data are exported to database, wherein the User Status data be in terminating the first block catenary system 11 described at least Corresponding use of at least one described intelligent contract in first block catenary system 11 described in when the corresponding transaction of one intelligent contract Family status information.
The User Status data are exported to database, management platform is can be and calls the first block catenary system 11 extremely The deriving method of the corresponding User Status data of an intelligence contract less, and the derived User Status data are remained into number According to library.Table 1 diagrammatically illustrates the structure of the corresponding User Status data of the intelligent contract of some in database, is included in the intelligence Contract transaction terminate when user token quantity, token state and token whether transferred field.Wherein Token is the digital cash to circulate in block chain or block chain digital goods, such as ether coin, ERC20 token.
Table 1
In operation S203, the second Transaction Information is sent to the second block catenary system 12, in the second block catenary system At least one described intelligent contract is disposed in 12.For example, management platform 10 is by scheduled block chain address to the second block chain System 12 sends second Transaction Information.After second block catenary system 12 receives and executes the second Transaction Information, in the second block At least one described intelligent contract is disposed in catenary system 12.
According to one embodiment of present invention, it can first check and be exported to described in the database before operating S203 Whether User Status data are correct, obtain the first checked result.Wherein, in the case where first checked result is correct, Redo S203.For example, after at least one described corresponding User Status data of intelligence contract all export, management Platform 10 can call the intelligent contract of each of at least one intelligent contract described in the first block catenary system 11 to provide The method of data query verification checks derived data, wherein after derived data are all checked successfully, determining should First checked result is correct.
In operation S204, the User Status data are imported from the database to the second block catenary system 12.? After at least one intelligent contract is completed in the deployment of second block catenary system 12, management platform 10 can start the institute in database User Status Data Migration is stated to the second block catenary system 12.For example, management platform 10 is called in the second block catenary system 12 and is somebody's turn to do The introduction method of at least one corresponding User Status data of intelligence contract, to import institute to the second block catenary system State User Status data.After a certain data for receiving the return of the second block catenary system 12 import successful feedback information, pipe Platform 10 can shift successfully the data markers.
In operation S205, the second block of Xiang Suoshu catenary system 12 sends third Transaction Information, so that the second block chain System 12 based on the User Status data open in the second block catenary system 12 described at least one intelligent contract pair The transaction answered.
According to some embodiments of the present invention, after operating S204, management platform 10 can also be to second block The setting of catenary system 12 is for opening the unlatching method of commerce of at least one corresponding transaction of intelligence contract.Root in this case According to some embodiments of the present invention, it can be in operation S205 and the unlatching counterparty called according to the third Transaction Information Method, it is corresponding at least one intelligent contract described in being opened in the second block catenary system 12 based on the User Status data Transaction.
According to some embodiments of the present invention, platform 10 is managed before operating S205 can first check imported into described the Whether the User Status data of two block catenary systems 12 are correct, obtain the second checked result.Wherein, in second verification As a result in the case where being correct, S205 is operated executing.For example, management platform 10 can be by calling the second block catenary system 12 Status inquiry interface, verification import the second block catenary system 12 the User Status data and database in the user The consistency of status data.After all checking successfully, determine that the second checked result is correct.
Method according to an embodiment of the present invention for block chain Data Migration, can only will be in the first block catenary system 11 At least one corresponding User Status Data Migration of intelligence contract is into the second block catenary system 12, wherein the User Status number According to the firstth area described in when transaction corresponding at least one intelligent contract described in terminating the first block catenary system 11 At least one described corresponding user state information of intelligence contract in block catenary system 11, so as to not have to the first block chain Whole transaction data of system 11 are all migrated.In this way, on the one hand the second block catenary system 12 can be based on User Status number According to continuing starting new transaction, so that the second block catenary system 12 is there is no the burden of historical transaction record, transactions velocity can be with It greatly improves.On the other hand it can also be inquired in the first block catenary system 11 when needing query history transaction data, The integrality of transaction data is saved, does not lose the just transparent feature of block chain.
According to some embodiments of the present invention, the first block catenary system 11 and the second block catenary system 12 are mutual It is independent.
Other embodiments according to the present invention, the first block catenary system 11 are main chain, the second block linkwork System 12 is side chain corresponding with the main chain.That is, the method for block chain Data Migration of the embodiment of the present invention, can apply In Data Migration between main chain and side chain, this more detailed embodiment can be referred to and retouched below with respect to Fig. 6 and Fig. 7 It states.
Fig. 3 schematically show it is according to an embodiment of the present invention be applied to the first block catenary system 11 for block chain The flow chart of the method for Data Migration.
As shown in figure 3, according to an embodiment of the invention, being applied to moving for block chain data for the first block catenary system 11 The method of shifting includes operation S301 and operation S302
In operation S301, the first Transaction Information is received, to terminate at least one described corresponding transaction of intelligence contract.
According to some embodiments of the present invention, which can be the transaction for type of shutting the book.Firstth area After block catenary system 11 receives first Transaction Information, which verify and allows this after being verified First Transaction Information enters trading pit and carries out transaction execution.After first Transaction Information is performed, trading pit can stop receiving any Transaction, and the All Activity in trading pit is abandoned, to stop All Activity.The code that trading pit stops All Activity can joining It examines such as the signal in the following table 2:
Table 2
Other embodiments according to the present invention, can be before operating S301 in the first block catenary system 11 It shuts the book described in setting in the intelligent contract of each of at least one intelligent contract method.Then, according to the present invention Embodiment can call each intelligence at least one described intelligent contract in operation S301 according to first Transaction Information The corresponding method of shutting the book of contract, according to the corresponding intelligent contract of method of shutting the book described in method termination of shutting the book Corresponding transaction.In this way, it is possible to the corresponding method of shutting the book of the intelligent contract to be terminated targetedly is called, thus Targetedly terminate the corresponding transaction of corresponding intelligent contract.
For example, corresponding method of shutting the book can be arranged to the intelligent contract of each in the first block catenary system 11.Often After a method of shutting the book switchs to true from false by marker bit stopAll, the corresponding friendship of corresponding intelligent contract is terminated Easily.The specific code of the method for shutting the book is realized can be with reference to the example such as the following table 3.
Table 3
In operation S302, at least one described corresponding User Status data of intelligence contract are exported to database, wherein The User Status data be in terminating the first block catenary system 11 described in the corresponding friendship of at least one intelligent contract At least one described corresponding user state information of intelligence contract in first block catenary system 11 described in when easily;Wherein, described At least one intelligent contract is also disposed in the second block catenary system 12 according to the second Transaction Information;The User Status number According to being also fed in the second block catenary system 12, so that the second block catenary system 12 is receiving third transaction When information based on the User Status data open in the second block catenary system 12 described at least one intelligent contract pair The transaction answered;Wherein, the first block catenary system 11 is different from the second block catenary system 12.
Fig. 4 schematically shows it is according to an embodiment of the present invention be applied to the second block catenary system 12 for block chain The flow chart of the method for Data Migration.
As shown in figure 4, should include operation applied to the method for block chain Data Migration of the second block catenary system 12 S401~operation S403.
In operation S401, the second Transaction Information is received, to dispose described at least one in the second block catenary system 12 A intelligence contract, wherein at least one described intelligent contract is also deployed in the first block catenary system 11.
Disposed in the second block catenary system 12 all needs migrate described at least one intelligent contract.For it is described extremely Each intelligent contract in a few intelligent contract, is issued consistent with the intelligence contract total value in the first block catenary system 11 Token quantity, setting import the interface of User Status data and the interface of the inquiry User Status data.
Firstly, issuing token for each intelligent contract at least one described intelligent contract.Second block catenary system 12 In the intelligent contract publication of each of this at least one intelligent contract and 11 equivalent amount of the first block catenary system token and The token of same condition.Equivalent amount refers to for identical intelligent contract, the second block catenary system 12 and the first block catenary system 11 token quantity is consistent, and the token of same condition refers to for identical intelligent contract, the second block catenary system 12 It is consistent respectively with the token quantity dug under the states such as mine, lock state in the first block catenary system 11.
Then, the interface of User Status data is imported to each intelligent contract setting at least one described intelligent contract. The called side of the interface of the importing User Status data is scheduled block chain address (example in management platform 10 in the present embodiment Such as, specified block chain account), to prevent Data Migration from being abused by other accounts.Import the reality of the interface of User Status data Modern code can be with the example of reference table 4.
Table 4
In operation S402, at least one described corresponding User Status data of intelligence contract are imported from database, wherein institute Stating User Status data is to be based on the first Transaction Information in the first block catenary system 11 to terminate in the first block catenary system 11 The corresponding transaction of at least one described intelligent contract when, in the first block catenary system 11 it is described at least one intelligently close About corresponding user state information;The database is also used to import the User Status from the first block catenary system 11 Data;Wherein, the first block catenary system 11 is different from the second block catenary system 12.
In operation S403, third Transaction Information is received, to open the second block chain based on the User Status data At least one described corresponding transaction of intelligence contract in system 12.
According to one embodiment of present invention, the second block catenary system 12 can also be arranged after operating S402 For opening the unlatching method of commerce of at least one corresponding transaction of intelligence contract.In this way according to an embodiment of the invention, The unlatching method of commerce can be called according to the third Transaction Information in operation S403, and is traded according to the unlatching Method opens at least one described corresponding transaction of intelligence contract.The realization code of the unlatching method of commerce can be with reference to such as following table 5 example.
Table 5
Fig. 5 diagrammatically illustrates the design according to an embodiment of the present invention for block catenary system Data Migration and illustrates.
As shown in figure 5, according to an embodiment of the present invention for block catenary system Data Migration described in Fig. 2~Fig. 4 The bulk migration process of method approximately as:
1) management platform 10 by scheduled block chain address the first Transaction Information of transmission to the first block catenary system 11, with The first block catenary system 11 is set to terminate at least one corresponding transaction of intelligence contract.
2) management platform 10 calls the User Status data export interface of the first block catenary system 11, passes through the User Status At least one described intelligent contract corresponding User Status data to data library of data export interface export.Export is completed and is checked Export it is errorless after, export terminates.
3) the second block catenary system 12 is created.After the completion of the creation of the second block catenary system, platform 10 is managed to the secondth area Block catenary system sends the second Transaction Information, to dispose at least one described intelligent contract in the second block catenary system 12.? The intelligent contract of each of at least one the intelligent contract disposed in two block catenary systems 12 may include User Status number According to introducting interface, off/on method of commerce.
4) the User Status data in 10 migrating data library of platform are managed to the second block catenary system 12.For example, pipe Platform 10 can be called by scheduled block chain address the corresponding User Status data introducting interface of each intelligent contract come Import data.The User Status data in pending data library enter the second block catenary system 12, and knot is imported after confirmation Beam.
5) management platform 10 sends third Transaction Information to the second block catenary system 12 by scheduled block chain address, with Call described in the second block catenary system 12 the corresponding unlatching method of commerce of each intelligent contract at least one intelligent contract.When After third Transaction Information cochain executes, the second block catenary system 12 starts to receive the new transaction of user.Hereafter, user can be New transaction and the corresponding transaction record of inquiry are executed in two block catenary systems, and can be looked into the first block catenary system 11 Ask historical transaction record.
Fig. 6 diagrammatically illustrate it is according to another embodiment of the present invention be applied to management platform 10 for block chain data The flow chart of the method for migration.
As previously mentioned, the method for block chain Data Migration of the embodiment of the present invention, can be applied to main chain and example chain Between Data Migration in.The first block catenary system 11 is main chain, and the second block catenary system 12 is and the main chain Corresponding side chain.According to the embodiment of invention, the method for block chain Data Migration applied to management platform 10 is in Fig. 2 institute It can also include operation S606~operation S609 shown in fig. 6 after the operation S201~operation S205 shown.
In operation S606, the second block of Xiang Suoshu catenary system 12 sends first Transaction Information, to terminate described second At least one corresponding transaction of intelligence contract described in block catenary system 12.
In operation S607, by least one corresponding second user of intelligence contract described in the second block catenary system 12 Status data is exported to the database, wherein the second user status data is to terminate the second block catenary system 12 Described in the corresponding transaction of at least one intelligent contract when described in the second block catenary system 12 it is described at least one intelligently close About corresponding user state information.
In operation S608, the second user status number is imported into the first block catenary system from the database According to update the User Status data in the first block catenary system 11 by the second user status data.
In operation S609, the first block of Xiang Suoshu catenary system 11 sends the third Transaction Information, so that firstth area Block catenary system 11 based on the second user status data open in the first block catenary system 11 described at least one intelligence It can the corresponding transaction of contract.
According to an embodiment of the invention, the main chain when a block catenary system is significantly increased in certain peak time trading volumes When, partially can will trade to migrate to side chain on main chain with embodiment according to the present invention is handled, and is dropped in main chain traffic pressure The transaction results handled on side chain are moved back to main chain again after low, after being continued to execute on the basis of above-mentioned transaction results by main chain Continuous transaction.That is, corresponding user state information moves to side chain in termination of contract transaction that at least one of main chain is intelligent And after continuing to execute new transaction in the side chain, sometime after the traffic pressure of main chain reduces, side can also stopped This at least one intelligent contract transaction in chain, and at least one of side chain intelligent contract corresponding use when will shut the book Family status information moves to main chain to update at least one corresponding user state information of intelligence contract of this in main chain, and makes main chain Transaction is continued to execute after the completion of migration.
According to an embodiment of the invention, being main chain, the second block catenary system 12 in the first block catenary system 11 In the case where the corresponding side chain of the first block catenary system 11, the second block catenary system when data are moved back from side chain to main chain 12 can receive the first Transaction Information, corresponding to terminate at least one intelligent contract described in the second block catenary system 12 Transaction, and at least one corresponding second user status data of intelligence contract described in the second block catenary system 12 is led Out to database, wherein the second user status data is to terminate at least one described in the second block catenary system 12 Corresponding user's shape of at least one described intelligent contract in second block catenary system 12 described in when the corresponding transaction of intelligent contract State information;Wherein, the second user status data is used to update the User Status in the first block catenary system 11 Data.
According to an embodiment of the invention, being main chain, the second block catenary system 12 in the first block catenary system 11 In the case where the corresponding side chain of the main chain, the first block catenary system 11 can import institute when data are moved back from side chain to main chain At least one corresponding second user status data of intelligence contract is stated, updates the use to pass through the second user status data Family status data, wherein the second user status data is to terminate at least one described in the second block catenary system 12 The corresponding user of at least one described intelligent contract in second block catenary system 12 described in when a intelligence corresponding transaction of contract Status information, and third Transaction Information is received, to open the first block linkwork based on the second user status data At least one described corresponding transaction of intelligence contract in system 11.
According to an embodiment of the invention, the corresponding User Status data of the intelligent contract of at least one of main chain can be moved Move on to side chain.Then side chain continues to execute transaction, and is not re-used as at least one intelligent contract sometime when side chain When the intelligent contract of hot spot, stop this at least one intelligent contract transaction in side chain, and by least one in side chain It is corresponding to update this in main chain at least one intelligent contract that the corresponding second user status data of a intelligence contract moves to main chain User Status data, and main chain is made to continue to execute transaction after the completion of migration.In this way, it is possible to meet the frequency of different business Numerous transaction reduces the transaction total amount of single block catenary system, improves the performance of single block catenary system.
Fig. 7 diagrammatically illustrate it is according to an embodiment of the present invention between main chain and side chain the design of Data Migration show Meaning.
The mistake according to an embodiment of the present invention for Data Migration between main chain and side chain is broadly described below in conjunction with Fig. 7 Journey.Wherein, a main chain can be corresponding with multiple side chains, and the intelligent contract of at least one of main chain is deployed in each side chain. Such as some stage of intelligence transaction corresponding with about A in main chain can be transferred in side chain 1 and be executed in Fig. 7, and in side chain 1 Executed after the transaction in the stage again by intelligence it is corresponding with about A trade to be moved back again into main chain continue to execute.
1), management platform 10 calls shutting the book for the intelligent contract of at least one in main chain by scheduled block chain address Method.After the method for shutting the book is performed, at least one corresponding transaction of intelligence contract described in main chain will be terminated.
2), management platform 10 calls the User Status data export interface of main chain, at least one described intelligent contract of export Corresponding User Status data.Data export complete and check export it is errorless after, data export terminate.
3), at least one described intelligent contract of side chain deployment.Setting and main chain at least one described intelligent contract In this at least one token of the identical quantity of the intelligent contract and token of same state.
4) the User Status data in 10 migrating data library of platform, are managed to side chain.Platform 10 is managed by making a reservation for Block chain address call the corresponding User Status data introducting interface of each intelligent contract.Side chain is imported to user's status data In and check status data it is errorless after, importing terminates.
5), management platform 10 calls at least one described intelligent contract of side chain corresponding by scheduled block chain address Method of commerce is opened, to open the transaction of side chain.
6), sometime, after side chain data are needed to move back to main chain by determination, management platform 10 sends first to side chain and hands over Easy information, to terminate the transaction of the intelligent contract of at least one in side chain by the first Transaction Information.
7), management platform 10 exports at least one corresponding second user status data of intelligence contract described in side chain to number According to library and check.
8) at least one corresponding transaction of intelligence contract described in main chain, is closed, and is ensured described in main chain and side chain extremely Token total quantity and total state in a few intelligent contract are consistent.
9), second user status data described in 10 migrating data library of platform is managed to main chain and to check.
10) the User Status data in main chain, are updated with the second user status data.Then main chain is opened again Transaction is opened, restarts to receive the new transaction of user.
So far the transaction record of the corresponding all users of at least one described intelligence contract of main chain and side chain exists, can For user query.Main chain and side chain toggle transaction simultaneously, solve block catenary system in the peak traffic phase and calculate pressure The problem of power increases, under decreasing the transaction total amount of single-stranded (main chain or side chain) so that the calculated performance for avoiding this single-stranded is too fast Drop.
Exemplary means
After describing the method for exemplary embodiment of the invention, next, showing with reference to Fig. 8,9,10 couples of present invention The method for block chain Data Migration of example property embodiment is illustrated.
Fig. 8 diagrammatically illustrate it is according to an embodiment of the present invention be set to management platform 10 for block chain Data Migration Device block diagram.
As shown in figure 8, described device 800 may include the first sending module 810, the first Data Migration module 820, second Sending module 830, the second Data Migration module 840 and third sending module 850.First sending module 810 be used for First block catenary system 11 sends the first Transaction Information, is intelligently closed with terminating at least one of described first block catenary system 11 About corresponding transaction.The first Data Migration module 820 be used for by described in the first block catenary system 11 at least one The corresponding User Status data of intelligent contract are exported to database, wherein the User Status data are to terminate firstth area In first block catenary system 11 described in when the corresponding transaction of at least one described intelligent contract in block catenary system 11 it is described extremely The corresponding user state information of an intelligence contract less.Second sending module 830 is used to send out to the second block catenary system 12 The second Transaction Information is sent, to dispose at least one described intelligent contract in the second block catenary system 12.Second number It is used to import the User Status data from the database to the second block catenary system 12 according to transferring module 840.It is described Third sending module 850 is used to send third Transaction Information to the second block catenary system 12, so that the second block chain System 12 based on the User Status data open in the second block catenary system 12 described at least one intelligent contract pair The transaction answered.
In one embodiment of the invention, first sending module 810 is specifically used for being believed according to first transaction Breath calls the corresponding method of shutting the book of each intelligent contract at least one described intelligent contract, to be shut the book by described Method terminates transaction corresponding to the corresponding intelligent contract of the method for shutting the book.
In one embodiment of the invention, described device 800 further includes method setup module 860 of shutting the book.It is described Method of shutting the book setup module 860 is used for before first Transaction Information of transmission to the first block catenary system 11, in institute State method of shutting the book described in setting in the intelligent contract of each of at least one intelligent contract.
In one embodiment of the invention, the first block catenary system 11 and the second block catenary system 12 are mutual It is independent;Alternatively, the first block catenary system 11 is main chain, the second block catenary system 12 is side corresponding with the main chain Chain.
In one embodiment of the invention, first sending module 810 is also used in the first block catenary system 11 be main chain, when the second block catenary system 12 is side chain corresponding with the main chain, described to the second block chain System 12 sends third Transaction Information, so that the second block catenary system 12 is based on the User Status data and opens described the After at least one described corresponding transaction of intelligence contract in two block catenary systems 12, the second block of Xiang Suoshu catenary system 12 is sent out First Transaction Information is sent, to terminate at least one corresponding friendship of intelligence contract described in the second block catenary system 12 Easily.The first Data Migration module 820 is also used at least one intelligent contract described in the second block catenary system 12 Corresponding second user status data is exported to the database, wherein the second user status data is to terminate described the It is described in second block catenary system 12 described in when the corresponding transaction of at least one intelligent contract described in two block catenary systems 12 At least one corresponding user state information of intelligence contract.The second Data Migration module 840 is also used to from the database Import the second user status data into the first block catenary system 11, with by the second user status data more The User Status data in the new first block catenary system 11.The third sending module 850 is also used to described One block catenary system 11 sends the third Transaction Information, so that the first block catenary system 11 is based on the second user shape State data open at least one described corresponding transaction of intelligence contract in the first block catenary system 11.
In one embodiment of the invention, described to send the first Transaction Information to the first block catenary system 11 including logical It crosses scheduled block chain address and sends first Transaction Information to the first block catenary system 11.
In one embodiment of the invention, described device 800 further includes opening method of commerce setup module 870.It is described It opens method of commerce setup module 870 to be used to send the second Transaction Information to the second block catenary system 12 described, described It is disposed in second block catenary system 12 after at least one described intelligent contract, the second block catenary system 12 setting is used for Open the unlatching method of commerce of at least one corresponding transaction of intelligence contract.
In one embodiment of the invention, the third sending module 850 is specifically used for being traded according to the third and believe Breath calls the unlatching method of commerce, described in being opened in the second block catenary system 12 based on the User Status data At least one corresponding transaction of intelligence contract.
In one embodiment of the invention, described device 800 further includes the first verification module 880.First verification Module is used for before second Transaction Information of transmission to the second block catenary system 12, and verification exports to the institute of the database It whether correct states User Status data, obtains the first checked result;Wherein, second sending module is specifically used for described the In the case that one checked result is correct, the second block of Xiang Suoshu catenary system 12 sends second Transaction Information.
In one embodiment of the invention, described device 800 further includes the second verification module 890.Second verification Module is used for before the transmission third Transaction Information to the second block catenary system 12, and verification imported into secondth area Whether the User Status data of block catenary system 12 are correct, obtain the second checked result.Wherein, the third sending module tool Body is used in the case where second checked result is correct, and the second block of Xiang Suoshu catenary system 12 sends the third transaction Information.
It is used for reference to described in Fig. 2 and/or Fig. 6 according to an embodiment of the invention, described device 800 can be used for executing The method of block chain Data Migration.
Fig. 9 diagrammatically illustrate it is according to an embodiment of the present invention be set to the first block catenary system 11 for block chain number According to the block diagram of the device 900 of migration.
As shown in figure 9, device 900 includes the first receiving module 910 and the first data export module 920.Described first Receiving module 910 is for receiving the first Transaction Information, to terminate at least one described corresponding transaction of intelligence contract.Described first Data export module 920 is used to export at least one described corresponding User Status data of intelligence contract to database, wherein The User Status data be in terminating the first block catenary system 11 described in the corresponding friendship of at least one intelligent contract At least one described corresponding user state information of intelligence contract in first block catenary system 11 described in when easily;Wherein, described At least one intelligent contract is also disposed in the second block catenary system 12 according to the second Transaction Information;The User Status number According to being also directed into the second block catenary system 12 from the database, so that the second block catenary system 12 is connecing When receiving third Transaction Information based on the User Status data open in the second block catenary system 12 described at least one The corresponding transaction of a intelligence contract.Wherein, the first block catenary system 11 is different from the second block catenary system 12.
In one embodiment of the invention, first receiving module 910 is specifically used for being believed according to first transaction Breath calls the corresponding method of shutting the book of each intelligent contract at least one described intelligent contract, and according to stoppings friendship Transaction corresponding to the corresponding intelligent contract of method of shutting the book described in easy method termination.
In one embodiment of the invention, described device 900 further includes method setup module 930 of shutting the book.It is described Method of shutting the book setup module 930 is used for before the first Transaction Information of the reception, at least one described intelligent contract Each of method of being shut the book in intelligent contract described in setting.
In one embodiment of the invention, described device 900 further includes the first data import modul 940.Described first Data import modul 940 is used in the first block catenary system 11 be main chain, and the second block catenary system 12 is the master When the corresponding side chain of chain, exports by the corresponding User Status data of at least one described intelligent contract to database, lead Enter at least one described corresponding second user status data of intelligence contract, updates institute to pass through the second user status data State User Status data, wherein the second user status data is to terminate described in the second block catenary system 12 extremely At least one described intelligent contract in second block catenary system 12 described in when the corresponding transaction of few one intelligent contract is corresponding User state information.First receiving module 910 is also used to receive third Transaction Information, to be based on the second user state Data open at least one described corresponding transaction of intelligence contract in the first block catenary system 11.
According to an embodiment of the invention, described device 900 can be used for executing with reference to described in Fig. 3 for block chain number According to the method for migration.
Figure 10 diagrammatically illustrate it is according to an embodiment of the present invention be set to the second block catenary system 12 for block chain The block diagram of the device of Data Migration.
As shown in Figure 10, device 1000 includes the second receiving module 1010 and the second data import modul 1020.It is described Second receiving module 1010 is for receiving the second Transaction Information, to dispose described at least one in the second block catenary system 12 A intelligence contract, wherein at least one described intelligent contract is also deployed in the first block catenary system 11.Second data are led Enter module 1020 for importing at least one described corresponding User Status data of intelligence contract from database, wherein the user Status data be terminated in the first block catenary system 11 in the first block catenary system 11 based on the first Transaction Information described in When the corresponding transaction of at least one intelligent contract, at least one described intelligent contract in the first block catenary system 11 is corresponding User state information;The database is also used to import the User Status data from the first block catenary system 11; Wherein, the first block catenary system 11 is different from the second block catenary system 12.Second receiving module 1020 is also used In receiving third Transaction Information, with described in being opened in the second block catenary system 12 based on the User Status data at least The corresponding transaction of one intelligence contract.
In one embodiment of the invention, described device 1000 further includes opening method of commerce setup module 1030.Institute Unlatching method of commerce setup module 1030 is stated to be used in the second Transaction Information of the reception, in the second block catenary system 12 After at least one intelligent contract described in middle deployment, to the second block catenary system 12 setting for open it is described at least one The unlatching method of commerce of the corresponding transaction of intelligent contract.In one embodiment of the invention, the reception third Transaction Information, With corresponding transaction of at least one intelligent contract described in opening in the second block catenary system 12, including according to the third Transaction Information calls the unlatching method of commerce, and opens at least one described intelligent contract according to the unlatching method of commerce Corresponding transaction.
In one embodiment of the invention, the first block catenary system 11 and the second block catenary system 12 are mutual It is independent;Alternatively, the first block catenary system 11 is main chain, the second block catenary system 12 is the first block catenary system 11 corresponding side chains.
In one embodiment of the invention, described device 1000 further includes the second data export module 1040.Described Two receiving modules 1010 are also used in the first block catenary system 11 be main chain, and the second block catenary system 12 is described the When one block 11 corresponding side chain of catenary system, the third Transaction Information is being received, to open based on the User Status data After at least one described corresponding transaction of intelligence contract in the second block catenary system 12, the first Transaction Information is received, To terminate at least one corresponding transaction of intelligence contract described in the second block catenary system 12.Second data export mould Block 1040 is used at least one corresponding second user status data of intelligence contract described in the second block catenary system 12 It exports to database, wherein the second user status data is to terminate at least one described in the second block catenary system 12 The corresponding user of at least one described intelligent contract in second block catenary system 12 described in when a intelligence corresponding transaction of contract Status information;Wherein, the second user status data is used to update user's shape in the first block catenary system 11 State data.
Exemplary media
After describing the method and apparatus of exemplary embodiment of the invention, next, real to being suitable for reference to Figure 11 The program product of the existing method according to an embodiment of the present invention for block chain Data Migration is illustrated.
The embodiment provides a kind of computer readable storage mediums, are stored thereon with executable instruction, described Instruct the method for block chain Data Migration for making processor execute embodiment according to the present invention when being executed by processor.
In some possible embodiments, various aspects of the invention are also implemented as a kind of shape of program product Formula comprising program code, when described program product is run on the computing device, said program code is for making the calculating Equipment executes described in above-mentioned " illustrative methods " part of this specification the use of various illustrative embodiments according to the present invention Operation in block chain data migration method.
For example, the calculating equipment can execute operation S201 as shown in Figure 2, sent to the first block catenary system 11 First Transaction Information, to terminate the corresponding transaction of the intelligent contract of at least one of described first block catenary system 11;Operation S202 exports at least one corresponding User Status data of intelligence contract described in the first block catenary system 11 to data Library, wherein the User Status data be in terminating the first block catenary system 11 described at least one intelligent contract pair At least one described corresponding user state information of intelligence contract in first block catenary system 11 described in when the transaction answered;Operation S203 sends the second Transaction Information to the second block catenary system 12, with disposed in the second block catenary system 12 it is described extremely A few intelligent contract;S204 is operated, imports the User Status number from the database to the second block catenary system 12 According to;And operation S205, the second block of Xiang Suoshu catenary system 12 sends third Transaction Information, so that the second block catenary system 12 based on the User Status data open in the second block catenary system 12 described at least one intelligent contract it is corresponding Transaction.
Such as the calculating equipment can execute operation S301 as shown in Figure 3, receive the first Transaction Information, with Terminate at least one described corresponding transaction of intelligence contract;And operation S302, at least one described intelligent contract is corresponding User Status data are exported to database, wherein the User Status data are in terminating the first block catenary system 11 At least one described intelligent contract in first block catenary system 11 described in when the corresponding transaction of described at least one intelligent contract Corresponding user state information;Wherein, at least one described intelligent contract is handed over also in the second block catenary system 12 according to second Easy information is disposed;The User Status data are also fed in the second block catenary system 12, so that described Two block catenary systems 12 open the second block linkwork based on the User Status data when receiving third Transaction Information At least one described corresponding transaction of intelligence contract in system 12;Wherein, the first block catenary system 11 and secondth area Block catenary system 12 is different.
Such as the calculating equipment can execute operation S401 as shown in Figure 4, receive the second Transaction Information, with At least one described intelligent contract is disposed in the second block catenary system 12, wherein at least one described intelligent contract also portion It is deployed in the first block catenary system 11;S402 is operated, imports at least one described corresponding user's shape of intelligence contract from database State data, wherein the User Status data are to be based on the first Transaction Information in the first block catenary system 11 to terminate firstth area When the corresponding transaction of at least one described intelligent contract in block catenary system 11, in the first block catenary system 11 it is described extremely The corresponding user state information of an intelligence contract less;The database is also used to import from the first block catenary system 11 The User Status data;Wherein, the first block catenary system 11 is different from the second block catenary system 12;Operation S403 receives third Transaction Information, described in opening in the second block catenary system 12 based on the User Status data At least one corresponding transaction of intelligence contract.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, red The system of outside line or semiconductor, device or device, or any above combination.The more specific example of readable storage medium storing program for executing (non exhaustive list) includes: the electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc Read memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
As shown in figure 11, the program product 1100 of the block chain Data Migration of embodiment according to the present invention is described, It can be using portable compact disc read only memory (CD-ROM) and including program code, and can calculate equipment, such as It is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying Readable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letter Number, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any can Read medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Program in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to --- Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language --- and such as Java, C++ etc. further include routine Procedural programming language --- such as " C ", language or similar programming language.Program code can fully exist It executes in user calculating equipment, partly execute on a user device, executing, as an independent software package partially in user Upper side point is calculated to execute or execute in remote computing device or server completely on a remote computing.It is relating to And in the situation of remote computing device, remote computing device can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN) one is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize internet Service provider is connected by internet).
Exemplary computer device
After the method, apparatus and medium for describing exemplary embodiment of the invention, next, with reference to Figure 12 to suitable It is illustrated in the calculating equipment for realizing the method according to an embodiment of the present invention for block chain Data Migration.
The embodiment of the invention also provides a kind of calculating equipment.Person of ordinary skill in the field is it is understood that this hair Bright various aspects can be implemented as system, method or program product.Therefore, various aspects of the invention can be implemented as Following form, it may be assumed that complete hardware embodiment, complete Software Implementation (including firmware, microcode etc.) or hardware and The embodiment that software aspects combine, may be collectively referred to as circuit, " module " or " system " here.
In some possible embodiments, it is single can to include at least at least one processing for calculating equipment according to the present invention Member and at least one storage unit.Wherein, the storage unit is stored with program code, when said program code is described When processing unit executes, so that the processing unit executes described in above-mentioned " illustrative methods " part of this specification according to this Invent the operation in the method for block chain Data Migration of various illustrative embodiments.
For example, the processing unit can execute operation S201 as shown in Figure 2, sent to the first block catenary system 11 First Transaction Information, to terminate the corresponding transaction of the intelligent contract of at least one of described first block catenary system 11;Operation S202 exports at least one corresponding User Status data of intelligence contract described in the first block catenary system 11 to data Library, wherein the User Status data be in terminating the first block catenary system 11 described at least one intelligent contract pair At least one described corresponding user state information of intelligence contract in first block catenary system 11 described in when the transaction answered;Operation S203 sends the second Transaction Information to the second block catenary system 12, with disposed in the second block catenary system 12 it is described extremely A few intelligent contract;S204 is operated, imports the User Status number from the database to the second block catenary system 12 According to;And operation S205, the second block of Xiang Suoshu catenary system 12 sends third Transaction Information, so that the second block catenary system 12 based on the User Status data open in the second block catenary system 12 described at least one intelligent contract it is corresponding Transaction.
Such as the processing unit can execute operation S301 as shown in Figure 3, receive the first Transaction Information, with Terminate at least one described corresponding transaction of intelligence contract;And operation S302, at least one described intelligent contract is corresponding User Status data are exported to database, wherein the User Status data are in terminating the first block catenary system 11 At least one described intelligent contract in first block catenary system 11 described in when the corresponding transaction of described at least one intelligent contract Corresponding user state information;Wherein, at least one described intelligent contract is handed over also in the second block catenary system 12 according to second Easy information is disposed;The User Status data are also fed in the second block catenary system 12, so that described Two block catenary systems 12 open the second block linkwork based on the User Status data when receiving third Transaction Information At least one described corresponding transaction of intelligence contract in system 12;Wherein, the first block catenary system 11 and secondth area Block catenary system 12 is different.
Such as the processing unit can execute operation S401 as shown in Figure 4, receive the second Transaction Information, with At least one described intelligent contract is disposed in the second block catenary system 12, wherein at least one described intelligent contract also portion It is deployed in the first block catenary system 11;S402 is operated, imports at least one described corresponding user's shape of intelligence contract from database State data, wherein the User Status data are to be based on the first Transaction Information in the first block catenary system 11 to terminate firstth area When the corresponding transaction of at least one described intelligent contract in block catenary system 11, in the first block catenary system 11 it is described extremely The corresponding user state information of an intelligence contract less;The database is also used to import from the first block catenary system 11 The User Status data;Wherein, the first block catenary system 11 is different from the second block catenary system 12;Operation S403 receives third Transaction Information, described in opening in the second block catenary system 12 based on the User Status data At least one corresponding transaction of intelligence contract.
It describes to be adapted for carrying out the method according to an embodiment of the present invention for block chain Data Migration referring to Figure 12 Calculating equipment 1200.Calculating equipment 1200 as shown in figure 12 is only an example, should not be to the function of the embodiment of the present invention Any restrictions can be brought with use scope.
As shown in figure 12, equipment 1200 is calculated to show in the form of universal computing device.The component for calculating equipment 1200 can To include but is not limited to: at least one above-mentioned processing unit 1210, connects not homologous ray at least one above-mentioned storage unit 1220 The bus 1230 of component (including storage unit 1220 and processing unit 1210).
Bus 1230 includes data/address bus, control bus and address bus.
Storage unit 1220 may include the readable medium of form of volatile memory, such as random access memory (RAM) 1221 and/or cache memory 1222, it can further include read-only memory (ROM) 1223.
Storage unit 1220 can also include program/utility with one group of (at least one) program module 1224 1225, such program module 1224 includes but is not limited to: operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.
Calculating equipment 1200 can also be with one or more external equipments 1240 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more with calculate equipment 1200 interact equipment communication, and/or with make Calculate any equipment (such as router, modulation /demodulation that equipment 1200 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/0) interface 1250.Also, it calculates equipment 1200 may be used also To pass through network adapter 1260 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network Network, such as internet) communication.As shown, other moulds of the network adapter 1260 by bus 1230 and calculating equipment 1200 Block communication.It should be understood that other hardware and/or software module are used although not shown in the drawings, can combine and calculate equipment 1200, Including but not limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive Dynamic device and data backup storage system etc..
It should be noted that although being referred to several units/modules or subelement/module of device in the above detailed description, But it is this division be only exemplary it is not enforceable.In fact, embodiment according to the present invention, above-described The feature and function of two or more units/modules can embody in a units/modules.Conversely, above-described one The feature and function of a units/modules can be to be embodied by multiple units/modules with further division.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one Step is decomposed into execution of multiple steps.
Although detailed description of the preferred embodimentsthe spirit and principles of the present invention are described by reference to several, it should be appreciated that, this It is not limited to the specific embodiments disclosed for invention, does not also mean that the feature in these aspects cannot to the division of various aspects Combination is benefited to carry out, this to divide the convenience merely to statement.The present invention is directed to cover appended claims spirit and Included various modifications and equivalent arrangements in range.

Claims (10)

1. a kind of method for block chain Data Migration is applied to management platform, which comprises
The first Transaction Information is sent to the first block catenary system, to terminate at least one of described first block catenary system intelligence The corresponding transaction of contract;
At least one corresponding User Status data of intelligence contract described in the first block catenary system are exported to database, Wherein the User Status data be in terminating the first block catenary system described at least one intelligent contract it is corresponding At least one described corresponding user state information of intelligence contract in first block catenary system described in when transaction;
Send the second Transaction Information to the second block catenary system, with disposed in the second block catenary system it is described at least one Intelligent contract;
The User Status data are imported from the database to the second block catenary system;And
Third Transaction Information is sent to the second block catenary system, so that the second block catenary system is based on user's shape State data open at least one described corresponding transaction of intelligence contract in the second block catenary system.
2. it is described to send the first Transaction Information to the first block catenary system according to the method described in claim 1, wherein, with end Only corresponding trade of the intelligent contract of at least one of described first block catenary system includes:
It calls at least one described intelligent contract each intelligence according to first Transaction Information contract is corresponding and shut the book Method, to shut the book method by described and terminate transaction corresponding to the corresponding intelligent contract of the method for shutting the book.
3. according to the method described in claim 1, wherein, the first block catenary system and the second block catenary system are mutual It is independent;Alternatively, the first block catenary system is main chain, the second block catenary system is side chain corresponding with the main chain.
4. according to the method described in claim 3, being main chain, the second block chain in the first block catenary system wherein When system is side chain corresponding with the main chain, third Transaction Information is sent to the second block catenary system described, so that The second block catenary system based on the User Status data open in the second block catenary system described at least one After the corresponding transaction of intelligent contract, the method also includes:
First Transaction Information is sent to the second block catenary system, to terminate described in the second block catenary system extremely The corresponding transaction of an intelligence contract less;
At least one corresponding second user status data of intelligence contract described in the second block catenary system is exported to institute Database is stated, wherein the second user status data is to terminate at least one intelligence described in the second block catenary system Corresponding user state information of at least one described intelligent contract in second block catenary system described in when the corresponding transaction of contract;
The second user status data is imported into the first block catenary system from the database, to pass through described second User Status data update the User Status data in the first block catenary system;And
The third Transaction Information is sent to the first block catenary system, so that the first block catenary system is based on described the Two User Status data open at least one described corresponding transaction of intelligence contract in the first block catenary system.
It is described to send the first Transaction Information to the first block catenary system and include: 5. according to the method described in claim 1, wherein
First Transaction Information is sent to the first block catenary system by scheduled block chain address.
6. the second Transaction Information is sent to the second block catenary system described according to the method described in claim 1, wherein, with It is disposed in the second block catenary system after at least one described intelligent contract, the method also includes:
To the second block catenary system setting for opening the unlatching transaction of at least one corresponding transaction of intelligence contract Method.
Wherein, described to send third Transaction Information to the second block catenary system, so that the second block catenary system is based on The User Status data open at least one described corresponding transaction of intelligence contract in the second block catenary system, packet It includes: the unlatching method of commerce is called according to the third Transaction Information, to open described the based on the User Status data At least one described corresponding transaction of intelligence contract in two block catenary systems.
7. a kind of method for block chain Data Migration is applied to the first block catenary system, which comprises
The first Transaction Information is received, to terminate at least one described corresponding transaction of intelligence contract;And
At least one described corresponding User Status data of intelligence contract are exported to database, wherein the User Status data First block chain described in when transaction corresponding at least one intelligent contract described in terminating the first block catenary system At least one described corresponding user state information of intelligence contract in system;Wherein, at least one described intelligent contract also exists It is disposed in second block catenary system according to the second Transaction Information;The User Status data are also fed to secondth area In block catenary system, so that the second block catenary system is based on the User Status data when receiving third Transaction Information Open at least one described corresponding transaction of intelligence contract in the second block catenary system;
Wherein, the first block catenary system is different from the second block catenary system.
8. a kind of method for block chain Data Migration is applied to the second block catenary system, which comprises
The second Transaction Information is received, to dispose at least one described intelligent contract in the second block catenary system, wherein institute At least one intelligent contract is stated also to be deployed in the first block catenary system;
At least one described corresponding User Status data of intelligence contract are imported from database, wherein the User Status data are At least one is intelligently closed described in being terminated in the first block catenary system in the first block catenary system based on the first Transaction Information About corresponding transaction when, corresponding user state information of at least one described intelligent contract in the first block catenary system; The database is also used to import the User Status data from the first block catenary system;Wherein, first block Catenary system is different from the second block catenary system;And
Receive third Transaction Information, with described in being opened in the second block catenary system based on the User Status data at least The corresponding transaction of one intelligence contract.
9. a kind of computer readable storage medium, is stored thereon with executable instruction, described instruction makes when being executed by processor Processor executes:
Method described in any one according to claim 1~6;Or
According to the method for claim 7;Or
According to the method for claim 8.
10. a kind of calculating equipment, comprising:
One or more memories, are stored with executable instruction;
One or more processors execute the executable instruction, to realize:
Method described in any one according to claim 1~6;Or
According to the method for claim 7;Or
According to the method for claim 8.
CN201910503915.7A 2019-06-11 2019-06-11 Method, apparatus, medium, and computing device for blockchain data migration Active CN110210845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910503915.7A CN110210845B (en) 2019-06-11 2019-06-11 Method, apparatus, medium, and computing device for blockchain data migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910503915.7A CN110210845B (en) 2019-06-11 2019-06-11 Method, apparatus, medium, and computing device for blockchain data migration

Publications (2)

Publication Number Publication Date
CN110210845A true CN110210845A (en) 2019-09-06
CN110210845B CN110210845B (en) 2021-06-18

Family

ID=67792059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910503915.7A Active CN110210845B (en) 2019-06-11 2019-06-11 Method, apparatus, medium, and computing device for blockchain data migration

Country Status (1)

Country Link
CN (1) CN110210845B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017052A (en) * 2020-10-28 2020-12-01 支付宝(杭州)信息技术有限公司 Method and apparatus for deploying and invoking contracts in blockchain
CN112650733A (en) * 2020-12-28 2021-04-13 杭州趣链科技有限公司 Intelligent contract state data processing method, system and device
CN112738280A (en) * 2021-03-30 2021-04-30 支付宝(杭州)信息技术有限公司 Method and device for communication between block chain and equipment under block chain
CN113342776A (en) * 2021-05-18 2021-09-03 网易(杭州)网络有限公司 Transaction information migration method, device, equipment and medium based on intelligent contract

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101701131B1 (en) * 2016-04-28 2017-02-13 주식회사 라피 Data recording and validation methods and systems using the connecting of blockchain between different type
US20180227131A1 (en) * 2017-02-06 2018-08-09 ShoCard, Inc. Electronic identification verification methods and systems with storage of certification records to a side chain
CN108492183A (en) * 2018-03-29 2018-09-04 深圳前海微众银行股份有限公司 Account trading method, system and the computer readable storage medium of block chain
CN109471744A (en) * 2018-11-21 2019-03-15 北京蓝石环球区块链科技有限公司 The more subchain system architectures of main chain adduction row based on block chain
CN109522362A (en) * 2018-10-17 2019-03-26 北京瑞卓喜投科技发展有限公司 Incomplete markets synchronous method, system and equipment based on block chain data
US20190109707A1 (en) * 2017-10-10 2019-04-11 Chromata Corporation System and method for a blockchain network with heterogeneous privacy
CN109669940A (en) * 2018-11-12 2019-04-23 深圳市步云科技有限公司 A kind of main side chain distributed storage mode based on block chain
CN109829718A (en) * 2019-01-30 2019-05-31 缀初网络技术(上海)有限公司 A kind of block chain multi-layer framework and its operation method based on storage application scenarios
CN109857580A (en) * 2019-03-12 2019-06-07 深圳市网心科技有限公司 Across the chain contract call method of block chain, device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101701131B1 (en) * 2016-04-28 2017-02-13 주식회사 라피 Data recording and validation methods and systems using the connecting of blockchain between different type
US20180227131A1 (en) * 2017-02-06 2018-08-09 ShoCard, Inc. Electronic identification verification methods and systems with storage of certification records to a side chain
US20190109707A1 (en) * 2017-10-10 2019-04-11 Chromata Corporation System and method for a blockchain network with heterogeneous privacy
CN108492183A (en) * 2018-03-29 2018-09-04 深圳前海微众银行股份有限公司 Account trading method, system and the computer readable storage medium of block chain
CN109522362A (en) * 2018-10-17 2019-03-26 北京瑞卓喜投科技发展有限公司 Incomplete markets synchronous method, system and equipment based on block chain data
CN109669940A (en) * 2018-11-12 2019-04-23 深圳市步云科技有限公司 A kind of main side chain distributed storage mode based on block chain
CN109471744A (en) * 2018-11-21 2019-03-15 北京蓝石环球区块链科技有限公司 The more subchain system architectures of main chain adduction row based on block chain
CN109829718A (en) * 2019-01-30 2019-05-31 缀初网络技术(上海)有限公司 A kind of block chain multi-layer framework and its operation method based on storage application scenarios
CN109857580A (en) * 2019-03-12 2019-06-07 深圳市网心科技有限公司 Across the chain contract call method of block chain, device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ALBERTO GAROFFOLO等: "Sidechains: Decoupled Consensus Between Chains", 《HTTPS://ARXIV.ORG/ABS/1812.05441》 *
LIPING DENG等: "Research on Cross-Chain Technology Based on Sidechain and Hash-Locking", 《INTERNATIONAL CONFERENCE ON EDGE COMPUTING》 *
白杰等: "发布区块链标准应用模型及应用部署技术研究", 《信息技术与网络安全》 *
赵小峰的思想迭代器: "以太坊上的侧链技术Loom(一)", 《HTTPS://WWW.JIANSHU.COM/P/35039DC96BBB?UTM_CAMPAIGN=MALESKINE&UTM_CONTENT=NOTE&UTM_MEDIUM=SEO_NOTES&UTM_SOURCE=RECOMMENDATION》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017052A (en) * 2020-10-28 2020-12-01 支付宝(杭州)信息技术有限公司 Method and apparatus for deploying and invoking contracts in blockchain
CN112650733A (en) * 2020-12-28 2021-04-13 杭州趣链科技有限公司 Intelligent contract state data processing method, system and device
CN112738280A (en) * 2021-03-30 2021-04-30 支付宝(杭州)信息技术有限公司 Method and device for communication between block chain and equipment under block chain
CN113342776A (en) * 2021-05-18 2021-09-03 网易(杭州)网络有限公司 Transaction information migration method, device, equipment and medium based on intelligent contract

Also Published As

Publication number Publication date
CN110210845B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN110210845A (en) For the method, apparatus of block chain Data Migration, medium and calculate equipment
CN106547678B (en) Method and apparatus for white-box testing
CN107395353A (en) A kind of block chain common recognition method and device
CN110298740A (en) Data account checking method, device, equipment and storage medium
CN108595157A (en) Processing method, device, equipment and the storage medium of block chain data
CN108664650A (en) A kind of transaction methods, device, equipment and the storage medium of block chain network
CN109829296A (en) The sandbox implementation method of intelligent contract based on alliance's chain
CN109951547A (en) Transactions requests method for parallel processing, device, equipment and medium
CN106156186A (en) A kind of data model managing device, server and data processing method
CN109118230A (en) Information processing method and device based on block chain
CN109872042A (en) House prosperity transaction monitoring and managing method, device, equipment and storage medium based on block chain
US20150309889A1 (en) Recovery of a transaction after xa end
CN109831529A (en) A kind of integrated architecture of cloud chain number
US20190325056A1 (en) Interconnected graph structured database for identifying and remediating conflicts in resource deployment
CN110189220A (en) A kind of risk analysis decision-making technique, device, system and storage medium
CN109583862A (en) A kind of point-to-point internet public good management method and device based on block chain technology
CN108665272A (en) Block chain data processing method, device, equipment and storage medium
CN104937618A (en) Risk control method and system for Internet financing funds and project progress
CN107066561A (en) Data managing method and platform
CN107886006A (en) Data manipulation method, device and electronic equipment
CN107911251A (en) A kind of method for configuring network equipment, device and medium
CN108830715A (en) Disk processing method and system are returned in batch documents part
CN107528912A (en) A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN106294611A (en) Core banking system and the old and new's core system data exchange method
CN111383100A (en) Risk model-based full life cycle management and control method and device

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