CN111949634A - Method for synchronously migrating block chain data - Google Patents

Method for synchronously migrating block chain data Download PDF

Info

Publication number
CN111949634A
CN111949634A CN202010789142.6A CN202010789142A CN111949634A CN 111949634 A CN111949634 A CN 111949634A CN 202010789142 A CN202010789142 A CN 202010789142A CN 111949634 A CN111949634 A CN 111949634A
Authority
CN
China
Prior art keywords
block chain
transaction
network
data
blockchain
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.)
Pending
Application number
CN202010789142.6A
Other languages
Chinese (zh)
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.)
Guangzhou Intellectual Property Trading Center Co Ltd
Guangzhou Kechuang Space Information Technology Co ltd
Original Assignee
Guangzhou Intellectual Property Trading Center Co Ltd
Guangzhou Kechuang Space Information Technology 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 Guangzhou Intellectual Property Trading Center Co Ltd, Guangzhou Kechuang Space Information Technology Co ltd filed Critical Guangzhou Intellectual Property Trading Center Co Ltd
Priority to CN202010789142.6A priority Critical patent/CN111949634A/en
Publication of CN111949634A publication Critical patent/CN111949634A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a method for synchronously migrating block chain data, which comprises the steps of establishing a first block chain network and a second block chain network; all the alliance members reach consensus: importing transaction data in the first blockchain network into a second blockchain network as other chain historical transactions, and deploying a synchronization contract in the second blockchain network; establishing an API (application program interface) server between a first block chain network and a second block chain network, and after the API server analyzes the transaction of the first block chain network, reading transaction information T (n) from the block of the first block chain network through an SDK (secure digital link); and sequentially submitting the transaction information T (n) of the first blockchain network as the content of new transaction to the second blockchain network through a synchronization contract to complete the data synchronization of the first blockchain network and the second blockchain network. The invention migrates data by synchronizing contracts and provides a function of inquiring historical transactions of other chains, thereby improving credibility and flexibility of block chain data synchronous migration.

Description

Method for synchronously migrating block chain data
Technical Field
The invention relates to the technical field of block chains, in particular to a method for synchronously migrating block chain data.
Background
The block chain technology is an emerging technology which is commonly participated in accounting by a plurality of computing devices to maintain a complete distributed database. The corresponding data storage has the characteristics of decentralization, openness and transparency, and is added with the timestamp and the corresponding encryption mechanism, so that the transaction records can be traced and are not falsified, the trust relationship of each transaction link is promoted, and the method has a wide application prospect in the fields of finance, supply chains and the like, which relate to multiparty collaboration.
With the rapid development of the blockchain technology, the blockchain cannot identify the original data or meet new requirements due to the upgrade of the version or the adjustment of the technical architecture or the change of the upper business system.
The method has the advantages that the method is slow in efficiency, two systems are required to be maintained, and the workload and the complexity are increased in multiples.
In another method, data in an original blockchain system is migrated to an upgraded blockchain system to avoid the problem of data storage incompatibility, and the data migration method generally turns to a third-party service organization commonly approved by two blockchain systems, migrates the book data on the original blockchain to the third-party service organization, and migrates the book data to a new blockchain by the third-party service organization, but the whole process needs to depend on the third-party service organization, and the efficiency and the security of data migration are low.
Meanwhile, due to the characteristics of the blockchain system, the data timestamp in the new blockchain system is updated to the timestamp during migration instead of the timestamp during service occurrence, which also causes a serious trust problem for the blockchain system.
Disclosure of Invention
The invention aims to provide a method for synchronously migrating block chain data, which improves the credibility of synchronous migration of the block chain system data, directly introduces transaction information in the original block chain system into a new block chain system and provides the transaction information for other contracts and user inquiry.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for synchronously migrating block chain data is provided, which comprises the following steps:
s10, establishing a first block chain network and a second block chain network;
s20, the members of the alliance have consensus: importing transaction data in the first blockchain network into the second blockchain network as other-chain historical transactions;
s30, deploying a synchronization contract: writing a synchronization contract code, deploying the synchronization contract to the second blockchain network;
s40, read data: establishing an API (application programming interface) set between the first block chain network and the second block chain network, and after analyzing the transaction of the first block chain network, reading all transaction information T (n) from the blocks of the first block chain network through an SDK (software development kit);
s50, synchronization data: and sequentially submitting the transaction information T (n) of the first block chain network as the content of new transaction to the second block chain network through the synchronization contract to complete data synchronization of the first block chain network and the second block chain network, wherein other contracts and users can inquire historical transactions of other chains through the synchronization contract.
As a preferable scheme of the method for synchronous migration of blockchain data, in the step S50, the transaction information t (N) is stored in the original node 1a (B, C … N) of the first blockchain network, and the transaction information t (N) in the original node 1a (B, C … N) is sequentially submitted to the new node 2A (B, C … N) of the second blockchain network through the synchronization contract, so as to form the transaction content of the new transaction in the second blockchain network.
As a preferred embodiment of the method for synchronously migrating block chain data, in step S40, the transaction information t (n) includes a hash value, a timestamp, transaction contents, a signature, and a transaction status.
As a preferable scheme of the method for synchronously migrating blockchain data, in step S50, data written by the second blockchain network through the synchronization contract may be retrieved through the hash value, and each federation member may check validity and integrity of the data.
The invention has the beneficial effects that:
(1) the transaction data of the first block chain network is migrated to the second block chain network through a synchronous migration method, the transaction data comprise complete transaction information such as a timestamp, transaction content, a signature and a transaction state, the problem that the timestamp of the imported transaction data changes into import time is effectively solved, meanwhile, the data written into the second block chain network through an intelligent contract can be retrieved through a transaction hash value, all alliance members can check the validity and integrity of the data at any time, and the credibility of the data after synchronization is greatly improved;
(2) the invention reads the complete transaction information from the first blockchain network, the complete transaction information is transferred to the second blockchain network as a whole to form the transaction content of new transaction in the second blockchain network, the data structures of the two blockchain networks are mutually independent and are not in forced association, and the analysis of the old transaction is only provided in a synchronization contract, so that the method brings great flexibility to the upgrade of the blockchain system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a flowchart of a method for synchronously migrating blockchain data according to an embodiment of the present invention.
Fig. 2 is a diagram illustrating a first blockchain network and a second blockchain network according to an embodiment of the present invention.
Fig. 3 is a network diagram illustrating a method for synchronous migration of blockchain data according to an embodiment of the present invention.
Fig. 4 is a diagram comparing ledger data of a first blockchain network and a second blockchain network according to an embodiment of the invention.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Wherein the showings are for the purpose of illustration only and are shown by way of illustration only and not in actual form, and are not to be construed as limiting the present patent; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "inner", "outer", etc. are used for indicating the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not indicated or implied that the referred device or element must have a specific orientation, be constructed in a specific orientation and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and are not to be construed as limitations of the present patent, and the specific meanings of the terms may be understood by those skilled in the art according to specific situations.
In the description of the present invention, unless otherwise explicitly specified or limited, the term "connected" or the like, if appearing to indicate a connection relationship between the components, is to be understood broadly, for example, as being fixed or detachable or integral; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or may be connected through one or more other components or may be in an interactive relationship with one another. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
As shown in fig. 1, the method for synchronously migrating blockchain data in the embodiment of the present invention includes the following steps:
s10, establishing a first block chain network and a second block chain network;
s20, the members of the alliance have consensus: importing transaction data in the first blockchain network into a second blockchain network as other-chain historical transactions;
s30, deploying a synchronization contract: writing a synchronization contract code, and deploying the synchronization contract to a second block chain network;
s40, read data: establishing an API (application program interface) server between a first block chain network and a second block chain network, and after the API server analyzes the transaction of the first block chain network, reading all transaction information T (n) from the blocks of the first block chain network through an SDK (secure digital link);
s50, synchronization data: and sequentially submitting the transaction information T (n) of the first block chain network as the content of new transaction to the second block chain network through a synchronization contract to complete data synchronization of the first block chain network and the second block chain network, wherein other contracts and users can inquire historical transactions of other chains through the synchronization contract.
As shown in fig. 2, in step S50, the transaction information t (N) is stored in the original node 1a (B, C … N) of the first blockchain network, and the transaction information t (N) in the original node 1a (B, C … N) is sequentially submitted to the new node 2A (B, C … N) of the second blockchain network through a synchronization contract, so as to form the transaction content of the new transaction in the second blockchain network.
In this embodiment, in step S40, the transaction information t (n) includes a hash value, a timestamp, transaction content, a signature, and a transaction status.
In this embodiment, in step S50, the data written by the synchronization contract in the second blockchain network may be retrieved by the hash value, and each coalition member may check the validity and integrity of the data.
As shown in fig. 3, the transaction data of the first blockchain network is migrated to the second blockchain network by a synchronous migration method, the transaction data includes complete transaction information t (n) such as a timestamp, transaction content, a signature, a transaction state and the like, so that the problem that the timestamp of the imported transaction data changes into import time is effectively solved, meanwhile, the data written into the second blockchain network by an intelligent contract can be retrieved by a transaction hash value, and each coalition member can check the validity and integrity of the data at any time, so that the credibility of the data after synchronization is greatly improved;
as shown in fig. 4, the present invention reads complete transaction information t (n) from the first blockchain network, and the complete transaction information t (n) is migrated to the second blockchain network as a whole to form the transaction content of the new transaction in the second blockchain network, so as to ensure that the data structures of the two blockchain networks are independent from each other and not forcibly associated, and the analysis of the old transaction only needs to be provided in the synchronization contract, and other contracts and users can query the historical transaction of other chains through the synchronization contract, and can obtain the validity and integrity of each transaction information by comparing the account book data of each node of the first blockchain network and the second blockchain network, and this method provides great flexibility for upgrading the blockchain system.
The term is interpreted in the present invention:
the members of the federation: the member in the block chain is generally a mechanism, and one to a plurality of nodes can be contained under the member.
His chain history transactions: refers to historical transaction information for other blockchains.
API Server: a server providing an interface for external access.
And (3) SDK: is a collection of development tools in building application software for a particular software package, software framework, hardware platform, operating system, etc.
T (n): represents the nth transaction information in the blockchain network, wherein T is the abbreviation of transaction and n is the serial number representing the transaction.
Other contracts and users: other contracts refer to other intelligent contracts deployed in a federation chain, i.e., commitments defined in program code, including agreements on which contract participants can enforce these commitments, users referring to federation members and users under the authority.
1a (b, c … n): representing nodes in the first blockchain network, with sequence numbers from a, b, c to n.
2A (B, C … N): representing nodes in the second blockchain network, with sequence numbers from a, B, C to N.
Hash: an input of arbitrary length (also called pre-mapped pre-image) is converted by a hashing algorithm into an output of fixed length, which is a hash value.
Time stamping: the data generated by using the digital signature technology, the signed object comprises original file information, signature parameters, signature time and other information. The time stamp system is used for generating and managing time stamps, and the time stamps are generated by digitally signing signature objects so as to prove that original files exist before the signature time.
Signature: the digital string can be generated only by the sender of the information and cannot be forged by others, and the digital string is also a valid proof for the authenticity of the information sent by the sender of the information.
The transaction state is as follows: information indicating whether the transaction was successful, etc.
Transaction content: contains specific information of the transaction, such as transaction parties, transaction items and the like.
It should be understood that the above-described embodiments are merely preferred embodiments of the invention and the technical principles applied thereto. It will be understood by those skilled in the art that various modifications, equivalents, changes, and the like can be made to the present invention. However, such variations are within the scope of the invention as long as they do not depart from the spirit of the invention. In addition, certain terms used in the specification and claims of the present application are not limiting, but are used merely for convenience of description.

Claims (4)

1. A method for synchronously migrating block chain data is characterized by comprising the following steps:
s10, establishing a first block chain network and a second block chain network;
s20, the members of the alliance have consensus: importing transaction data in the first blockchain network into the second blockchain network as other-chain historical transactions;
s30, deploying a synchronization contract: writing a synchronization contract code, deploying the synchronization contract to the second blockchain network;
s40, read data: establishing an API (application programming interface) set between the first block chain network and the second block chain network, and after analyzing the transaction of the first block chain network, reading all transaction information T (n) from the blocks of the first block chain network through an SDK (software development kit);
s50, synchronization data: and sequentially submitting the transaction information T (n) of the first block chain network as the content of new transaction to the second block chain network through the synchronization contract to complete data synchronization of the first block chain network and the second block chain network, wherein other contracts and users can inquire historical transactions of other chains through the synchronization contract.
2. The method for synchronously migrating blockchain data according to claim 1, wherein in the step S50, the transaction information t (N) is stored in an original node 1a (B, C … N) of the first blockchain network, and the transaction information t (N) in the original node 1a (B, C … N) is sequentially submitted to a new node 2A (B, C … N) of the second blockchain network through the synchronization contract to form the transaction content of the new transaction in the second blockchain network.
3. The method for synchronously migrating block chain data according to claim 2, wherein in the step S40, the transaction information t (n) includes a hash value, a timestamp, transaction contents, a signature and a transaction status.
4. The method for synchronous migration of blockchain data according to claim 3, wherein in step S50, the data written by the second blockchain network through the synchronization contract is retrievable through the hash value, and each federation member can check validity and integrity of the data.
CN202010789142.6A 2020-08-07 2020-08-07 Method for synchronously migrating block chain data Pending CN111949634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010789142.6A CN111949634A (en) 2020-08-07 2020-08-07 Method for synchronously migrating block chain data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010789142.6A CN111949634A (en) 2020-08-07 2020-08-07 Method for synchronously migrating block chain data

Publications (1)

Publication Number Publication Date
CN111949634A true CN111949634A (en) 2020-11-17

Family

ID=73331778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010789142.6A Pending CN111949634A (en) 2020-08-07 2020-08-07 Method for synchronously migrating block chain data

Country Status (1)

Country Link
CN (1) CN111949634A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287033A (en) * 2020-12-24 2021-01-29 腾讯科技(深圳)有限公司 Data synchronization method, equipment and computer readable storage medium
CN115292419A (en) * 2022-10-09 2022-11-04 深圳市明源云科技有限公司 Data processing method, device and equipment based on poH consensus and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10102265B1 (en) * 2017-04-12 2018-10-16 Vijay K. Madisetti Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
CN109189853A (en) * 2018-08-08 2019-01-11 众安信息技术服务有限公司 Method of data synchronization and device between a kind of block chain
US20190370223A1 (en) * 2018-05-31 2019-12-05 Alibaba Group Holding Limited Blockchain-based data migration method and apparatus
CN110737664A (en) * 2019-10-21 2020-01-31 深圳前海微众银行股份有限公司 block link point synchronization method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10102265B1 (en) * 2017-04-12 2018-10-16 Vijay K. Madisetti Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
US20190370223A1 (en) * 2018-05-31 2019-12-05 Alibaba Group Holding Limited Blockchain-based data migration method and apparatus
CN109189853A (en) * 2018-08-08 2019-01-11 众安信息技术服务有限公司 Method of data synchronization and device between a kind of block chain
CN110737664A (en) * 2019-10-21 2020-01-31 深圳前海微众银行股份有限公司 block link point synchronization method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周云;: "基于区块链的信息网络信任支撑环境构建研究", 信息安全与通信保密, no. 04 *
张先洪;劳宪银;谭仁杨;梁海;: "基于区块链的军事数据云存储共享方案", 网络安全技术与应用, no. 06 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287033A (en) * 2020-12-24 2021-01-29 腾讯科技(深圳)有限公司 Data synchronization method, equipment and computer readable storage medium
CN115292419A (en) * 2022-10-09 2022-11-04 深圳市明源云科技有限公司 Data processing method, device and equipment based on poH consensus and storage medium

Similar Documents

Publication Publication Date Title
US11886421B2 (en) Systems, methods, and apparatuses for distributing a metadata driven application to customers and non-customers of a host organization using distributed ledger technology (DLT)
US9313104B2 (en) Method for extending business systems to a mobile workforce
KR20200011435A (en) Parameterizable Smart Contract
CN112861496A (en) Report generation display method and device, computer equipment and readable storage medium
CN110944046B (en) Control method of consensus mechanism and related equipment
CN112070608B (en) Information processing method, device, medium and electronic equipment
CN109190353B (en) Method and computing device for automatically generating certificate document
US20030140058A1 (en) Method and apparatus for sharing information between applications using common objects
CN113326165B (en) Data processing method and device based on block chain and computer readable storage medium
CN116663050A (en) Intelligent contract data rapid query method based on database
CN113434175B (en) Data processing method, device, storage medium and equipment
CN111949634A (en) Method for synchronously migrating block chain data
CN115859362A (en) Data storage system, method, device and medium based on block chain side chain
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN112883117A (en) Data synchronization method, equipment and computer readable storage medium
Westerkamp et al. Smartsync: Cross-blockchain smart contract interaction and synchronization
CN115114372A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN117632904A (en) Model-driven data synchronization method and system
CN113111125A (en) Business evidence storage method based on block chain
CN113114757B (en) File transmission method, device and equipment
US11537455B2 (en) Schema management using an event stream
CN112187909B (en) Financing information generation system and method based on block chain
CN114741066A (en) Block chain application generation method and system
CN110191048A (en) A kind of customer service information management method and system
CN116739397B (en) Dynamic management method for new energy indexes

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