CN112540969B - Data migration method of intelligent contracts among heterogeneous block chains - Google Patents
Data migration method of intelligent contracts among heterogeneous block chains Download PDFInfo
- Publication number
- CN112540969B CN112540969B CN202011354527.6A CN202011354527A CN112540969B CN 112540969 B CN112540969 B CN 112540969B CN 202011354527 A CN202011354527 A CN 202011354527A CN 112540969 B CN112540969 B CN 112540969B
- Authority
- CN
- China
- Prior art keywords
- data
- migration
- blockchain
- contract
- heterogeneous
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data migration method of intelligent contracts between heterogeneous blockchains, and relates to the field of heterogeneous blockchains. The data migration method based on the intelligent contracts among heterogeneous blockchains is characterized in that each heterogeneous blockchain migrates the data of the intelligent contracts through a conversion engine, and the stability and the accuracy of migration are ensured, and the method comprises the following specific steps: s1, making a data mapping rule, namely making a data mapping rule from a source blockchain to an SD intermediate language and then to a target blockchain, and importing the data mapping rule into a conversion engine; s2, registering a migration account in the source blockchain, and upgrading the source blockchain contract. The invention maps the source block chain to the target block chain by data; meanwhile, the ID of the source data owner is stored to the target blockchain through the data storage contract, so that the ID can be effectively prevented from being invalid, a stable paradigm is provided for the data migration of the heterogeneous blockchain, and the problem that the contract data of the heterogeneous blockchain cannot be effectively migrated is solved.
Description
Technical Field
The invention relates to the technical field of heterogeneous blockchains, in particular to a data migration method of intelligent contracts among heterogeneous blockchains.
Background
Blockchains are a completely new distributed infrastructure and computing paradigm that use block-chained data structures to validate and store data, distributed node consensus algorithms to generate and update data, cryptography to secure data transfer and access control, and intelligent contracts composed of automated script code to program and manipulate data. Currently, blockchains are referred to by many large organizations as a significant breakthrough technique that thoroughly changes traffic and even the organization's mode of operation. In the fields of finance, the Internet of things, public welfare, medical health, supply chains and the like, more and more enterprises begin to explore the application prospect of blockchains in the industry and plan data flow route patterns based on blockchain technology; in face of opportunities and challenges brought by the blockchain technology, all industries around the world are actively laid out, and an attempt is made to change the original business and management modes through the combined innovation technology, so that a novel ecological system with multiparty participation and safe trust is constructed.
Smart contract (english) is a computer protocol that aims to propagate, verify or execute contracts in an informative manner. Smart contracts allow trusted transactions to be made without third parties, which transactions are traceable and irreversible. The smart contract concept was first proposed by Nick Szabo in 1995. The purpose of smart contracts is to provide a security approach that is superior to traditional contracts and to reduce other transaction costs associated with the contracts. "an intelligent contract is a set of digitally defined commitments (commitments) that include agreements on which contract participants can execute the commitments. "
When the applicant applies for the invention, the Chinese patent discloses a data migration method of a block-chain-oriented multi-level intelligent contract through searching, the application number of the Chinese patent is CN201710230002.3, and the Chinese patent discloses a data migration method of a block-chain-oriented multi-level intelligent contract. The method comprises the following steps: 1) Constructing a contract tree model for a contract system with a plurality of contract calls; 2) Migrating data of the top-level contract except child node contract addresses; 3) Judging whether the node where the current contract is located is a leaf node or not; 4) Deploying a new contract of the leaf node, migrating data of the contract, and storing contract addresses of the leaf node; 5) After the data migration of all the child node contracts is completed, deploying new contract migration contract data and storing new addresses of all the child node contracts; 6) Repeating steps 3) through 5) to migrate the contract address parameters of all sub-contracts of the top-level contract. The invention solves the problem that the contract address can not be updated as a parameter when complex intelligent contract data on the block chain is migrated, and realizes the data migration of multi-level intelligent contracts facing the block chain, but the problems of invalid data and the like occur in the data migration process.
The existing blockchain data migration has poor stability and the problem that the ID is invalid frequently occurs in the heterogeneous blockchain data migration process, so that a data migration method of intelligent contracts among heterogeneous blockchains is provided.
Disclosure of Invention
(one) solving the technical problems
Aiming at the defects of the prior art, the invention provides a data migration method of an intelligent contract between heterogeneous block chains, which solves the problems of poor data migration stability of the existing block chains and invalid ID (identity) frequently occurring in the heterogeneous block migration process.
(II) technical scheme
In order to achieve the above purpose, the invention is realized by the following technical scheme:
a data migration method of intelligent contracts among heterogeneous blockchains is characterized in that each heterogeneous blockchain migrates the data of the intelligent contracts through a conversion engine, and the stability and the accuracy of migration are ensured, and the method comprises the following specific steps:
s1, making a data mapping rule, namely making a data mapping rule from a source blockchain to an SD intermediate language and then to a target blockchain, and importing the data mapping rule into a conversion engine;
s2, registering a migration account in a source block chain, and upgrading a source block chain contract, namely setting all interfaces with data to be open to a migration;
s3, the migration service accesses the data interface, converts the data into a data format of a target block chain according to the data mapping rule formulated in the step S1, and attaches a source data owner ID to each piece of data;
s4, registering a migration account in a target block chain, constructing a data storage contract in the target block chain through mapping, and opening the authority of all the data storage contracts to the migration;
s5, the data with the data owner ID is stored into the target blockchain through a data storage contract.
Preferably, the mapping rule of the data is as follows: mapping from int-to number or from Char [ ] -to String-to CharARRAy.
Preferably, the migrator is a migration runner.
Working principle: the specific work comprises the following steps: s1, formulating a data mapping rule from a source blockchain to an SD (software development kit) intermediate language and then to a target blockchain, and importing the data mapping rule into a conversion engine; data mapping rules are e.g. (int-data type-to number-value to number, char [ ] -mapping of pointers to String-functions to charrray). S2, registering a migration account in a source blockchain, upgrading a source blockchain contract, and setting all interfaces with stored data to be open to the migration. S3, the migration runner service accesses the source data interface, converts the data into a data format of a target blockchain according to the data mapping rule established in the step S1, and attaches a source data owner ID to each piece of data. S4, registering a migration account in a target blockchain, constructing a data storage contract in the target blockchain through mapping, and opening the authority of all the data storage contracts to the migration. S5, the data with the data owner ID is stored into the target blockchain through a data storage contract. The invention maps the data of the source block chain to the target block chain through a conversion engine; meanwhile, the ID of the data owner of the source block chain is converted into the data format of the target block chain, so that the problem that the data of the target block chain is invalid can be effectively prevented, a stable paradigm is provided for the data migration of the heterogeneous block chain, and the problem that the contract data of the heterogeneous block chain cannot be effectively migrated is solved.
(III) beneficial effects
The invention provides a data migration method of intelligent contracts among heterogeneous block chains. The beneficial effects are as follows:
the invention provides a data migration method of intelligent contracts among heterogeneous blockchains, which comprises the steps of carrying out data mapping on data of a source blockchain to a target blockchain through a conversion engine; meanwhile, the ID of the data owner of the source block chain is converted into the data format of the target block chain, so that the problem that the data of the target block chain is invalid can be effectively prevented, a stable paradigm is provided for the data migration of the heterogeneous block chain, and the problem that the contract data of the heterogeneous block chain cannot be effectively migrated is solved.
Detailed Description
The following description of the technical solutions in the embodiments of the present invention will be clear and complete, and it is obvious that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples:
the embodiment of the invention provides a data migration method of intelligent contracts among heterogeneous blockchains, which is characterized in that each heterogeneous blockchain migrates the data of the intelligent contracts through a conversion engine and ensures the stability and the accuracy of migration, and comprises the following specific steps:
s1, making a data mapping rule, namely making a data mapping rule from a source blockchain to an SD intermediate language and then to a target blockchain, and importing the data mapping rule into a conversion engine;
s2, registering a migration account in a source block chain, and upgrading a source block chain contract, namely setting all interfaces with data to be open to a migration;
s3, the migration service accesses the data interface, converts the data into a data format of a target block chain according to the data mapping rule formulated in the step S1, and attaches a source data owner ID to each piece of data;
s4, registering a migration account in a target block chain, constructing a data storage contract in the target block chain through mapping, and opening the authority of all the data storage contracts to the migration;
s5, the data with the data owner ID is stored into the target blockchain through a data storage contract.
Mapping data rules, such as: mapping from int-to number or from Char [ ] -to String-to CharARRAy.
The migrator is a migration runner.
The invention maps the data of the source block chain to the target block chain through a conversion engine; meanwhile, the ID of the data owner of the source block chain is converted into the data format of the target block chain, so that the problem that the data of the target block chain is invalid can be effectively prevented, a stable paradigm is provided for the data migration of the heterogeneous block chain, and the problem that the contract data of the heterogeneous block chain cannot be effectively migrated is solved.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (3)
1. A data migration method of intelligent contracts among heterogeneous block chains is characterized in that: the method is characterized in that each heterogeneous blockchain migrates the data of the intelligent contract through a conversion engine, and ensures the stability and accuracy of migration, and comprises the following specific steps:
s1, formulating a data mapping rule, namely formulating a data mapping rule from a source blockchain to an SD intermediate language and then to a target blockchain, and importing the data mapping rule into a conversion engine;
s2, registering a migration account in a source block chain, and upgrading a source block chain contract, namely setting all interfaces with data to be open to a migration;
s3, the migration service accesses the data interface, converts the data into a data format of a target block chain according to the data mapping rule formulated in the step S1, and attaches a source data owner ID to each piece of data;
s4, registering a migration account in a target block chain, constructing a data storage contract in the target block chain through mapping, and opening the authority of all the data storage contracts to the migration;
s5, storing the data with the data owner ID mapped by the conversion engine into the target blockchain through a data storage contract, and converting the data owner ID of the source blockchain into a data format of the target blockchain.
2. The method for data migration of a heterogeneous inter-blockchain smart contract of claim 1, wherein: the mapping rules of the data include mapping from int-to number or mapping from Char [ ] -to String-to CharARRAy.
3. The method for data migration of a heterogeneous inter-blockchain smart contract of claim 1, wherein: the migrator is a migratory runner.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011354527.6A CN112540969B (en) | 2020-11-26 | 2020-11-26 | Data migration method of intelligent contracts among heterogeneous block chains |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011354527.6A CN112540969B (en) | 2020-11-26 | 2020-11-26 | Data migration method of intelligent contracts among heterogeneous block chains |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112540969A CN112540969A (en) | 2021-03-23 |
CN112540969B true CN112540969B (en) | 2023-07-14 |
Family
ID=75016876
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011354527.6A Active CN112540969B (en) | 2020-11-26 | 2020-11-26 | Data migration method of intelligent contracts among heterogeneous block chains |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112540969B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114820187B (en) * | 2022-03-31 | 2024-12-17 | 蚂蚁区块链科技(上海)有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106171035A (en) * | 2014-12-31 | 2016-11-30 | 华为技术有限公司 | A kind of method of state transition, Apparatus and system |
CN107577427A (en) * | 2017-08-31 | 2018-01-12 | 上海保险交易所股份有限公司 | For the data migration method of block catenary system, equipment and storage medium |
CN108829350A (en) * | 2018-05-31 | 2018-11-16 | 阿里巴巴集团控股有限公司 | Data migration method and device based on block chain |
CN109669709A (en) * | 2018-11-26 | 2019-04-23 | 杭州秘猿科技有限公司 | A kind of data migration method and data mover system of the upgrading of block chain |
CN110334154A (en) * | 2019-06-28 | 2019-10-15 | 阿里巴巴集团控股有限公司 | Based on the classification storage method and device of block chain, electronic equipment |
CN110532323A (en) * | 2019-09-02 | 2019-12-03 | 腾讯科技(深圳)有限公司 | Student identity information processing method and device in block chain network, electronic equipment and storage medium |
CN110659259A (en) * | 2019-09-03 | 2020-01-07 | 平安科技(深圳)有限公司 | Database migration method, server and computer storage medium |
CN110992029A (en) * | 2019-12-02 | 2020-04-10 | 中国科学院计算技术研究所 | A blockchain management system and method |
CN111309711A (en) * | 2020-03-13 | 2020-06-19 | 财付通支付科技有限公司 | Cross-blockchain data migration method, device, device and storage medium |
CN111984631A (en) * | 2020-09-02 | 2020-11-24 | 深圳壹账通智能科技有限公司 | Production data migration method, device, computer equipment and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1857946B1 (en) * | 2006-05-16 | 2018-04-04 | Sap Se | Systems and methods for migrating data |
US9792320B2 (en) * | 2012-07-06 | 2017-10-17 | Box, Inc. | System and method for performing shard migration to support functions of a cloud-based service |
-
2020
- 2020-11-26 CN CN202011354527.6A patent/CN112540969B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106171035A (en) * | 2014-12-31 | 2016-11-30 | 华为技术有限公司 | A kind of method of state transition, Apparatus and system |
CN107577427A (en) * | 2017-08-31 | 2018-01-12 | 上海保险交易所股份有限公司 | For the data migration method of block catenary system, equipment and storage medium |
CN108829350A (en) * | 2018-05-31 | 2018-11-16 | 阿里巴巴集团控股有限公司 | Data migration method and device based on block chain |
CN109669709A (en) * | 2018-11-26 | 2019-04-23 | 杭州秘猿科技有限公司 | A kind of data migration method and data mover system of the upgrading of block chain |
CN110334154A (en) * | 2019-06-28 | 2019-10-15 | 阿里巴巴集团控股有限公司 | Based on the classification storage method and device of block chain, electronic equipment |
CN110532323A (en) * | 2019-09-02 | 2019-12-03 | 腾讯科技(深圳)有限公司 | Student identity information processing method and device in block chain network, electronic equipment and storage medium |
CN110659259A (en) * | 2019-09-03 | 2020-01-07 | 平安科技(深圳)有限公司 | Database migration method, server and computer storage medium |
CN110992029A (en) * | 2019-12-02 | 2020-04-10 | 中国科学院计算技术研究所 | A blockchain management system and method |
CN111309711A (en) * | 2020-03-13 | 2020-06-19 | 财付通支付科技有限公司 | Cross-blockchain data migration method, device, device and storage medium |
CN111984631A (en) * | 2020-09-02 | 2020-11-24 | 深圳壹账通智能科技有限公司 | Production data migration method, device, computer equipment and storage medium |
Non-Patent Citations (3)
Title |
---|
Counter-mapping migration: irregular migrants’ stories through cognitive mapping;Amalia Campos-Delgado;《Mobilities》;488-504 * |
PCEDM模型的数据迁移方案设计及实施;赵贵菊;《数字石油和化工》;49-53 * |
基于区块链的持久标识符系统;孙善鹏 等;《计算机系统应用》;90-97 * |
Also Published As
Publication number | Publication date |
---|---|
CN112540969A (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ni et al. | Blockchain-based BIM digital project management mechanism research | |
CN112835985B (en) | Spatial data sharing system and method based on distributed account book | |
CN111260194B (en) | Block chain-based accurate supply method and system for materials | |
CN108446976B (en) | A kind of common reserve fund transfer method, computer readable storage medium and terminal device | |
CN109151030A (en) | A kind of Internet of Things object distributed interactive system, method | |
CN109063980A (en) | Memory calculation method and system suitable for electrical network analysis | |
CN112540969B (en) | Data migration method of intelligent contracts among heterogeneous block chains | |
Ou et al. | Research and analysis on cloud accounting of enterprises under the background of new economy | |
Huo et al. | A blockchain-enabled trusted identifier co-governance architecture for the industrial internet of things | |
Zhao et al. | Token economy: A new form economy with decentralized mutual trust and collective governance | |
Jia et al. | Development model of enterprise green marketing based on cloud computing | |
CN111144133A (en) | Translation document keyword modification traceability system and method based on block chain | |
Kang | Convergence analysis of BIM & blockchain technology in construction industry informatization | |
CN109886678A (en) | A kind of art work traceability system based on block chain | |
Peng | Blockchain equity system transaction method and system research based on machine learning and big data algorithm | |
CN113689077A (en) | A secondary node platform for environmental governance based on identification resolution | |
CN118585572A (en) | Supply chain data management device, method, equipment and storage medium | |
Li et al. | Assessment of industrial Internet platform application in manufacturing enterprises: System construction and industrial practice | |
CN117592755A (en) | Supply chain digital control system based on micro-point code block chain technology | |
CN113179294B (en) | Schema unified access method based on intelligent contract | |
CN114860199B (en) | A software architecture optimization method, device and storage medium | |
Li et al. | The study of the spatial heterogeneity and structural evolution of the producer services trade network | |
Zheng et al. | Research on the Continuous Innovation Driving Mechanism of the Transformation and Upgrading of Traditional Industries | |
CN115330510A (en) | Cross-platform credit management method based on block chain intelligent contract | |
Wan et al. | Research on the operation and management mechanism of the PPP mode of the smart city construction projects in the era of big data |
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 |