KR20210125381A - Blockchain conversion method and apparatus - Google Patents

Blockchain conversion method and apparatus Download PDF

Info

Publication number
KR20210125381A
KR20210125381A KR1020200043019A KR20200043019A KR20210125381A KR 20210125381 A KR20210125381 A KR 20210125381A KR 1020200043019 A KR1020200043019 A KR 1020200043019A KR 20200043019 A KR20200043019 A KR 20200043019A KR 20210125381 A KR20210125381 A KR 20210125381A
Authority
KR
South Korea
Prior art keywords
chain
database
ledger
data
smart contract
Prior art date
Application number
KR1020200043019A
Other languages
Korean (ko)
Other versions
KR102446213B1 (en
Inventor
김재훈
Original Assignee
아주대학교산학협력단
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 아주대학교산학협력단 filed Critical 아주대학교산학협력단
Priority to KR1020200043019A priority Critical patent/KR102446213B1/en
Publication of KR20210125381A publication Critical patent/KR20210125381A/en
Application granted granted Critical
Publication of KR102446213B1 publication Critical patent/KR102446213B1/en

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/23Updating
    • G06F16/2372Updates performed during offline database operations
    • 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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • H04L2209/38

Abstract

The present invention relates to a blockchain conversion method and apparatus. An embodiment of the present invention provides a blockchain conversion method of an apparatus which converts off-chain into on-chain, comprising the steps of: converting an off-chain program into an on-chain smart contract using an API of an on-chain platform; determining a data storage position of the on-chain by considering how big an off-chain database is and whether an on-chain external database is operated; and storing data of the off-chain database at one or more among state data of an on-chain ledger, an internal database of the ledger and an external database of the ledger in accordance with determination of the data storage position. The present invention can easily perform conversion between the off-chain and the on-chain.

Description

블록체인 변환 방법 및 장치{BLOCKCHAIN CONVERSION METHOD AND APPARATUS}Blockchain Transformation Method and Apparatus {BLOCKCHAIN CONVERSION METHOD AND APPARATUS}

본 발명은 온체인과 오프체인 사이의 블록체인을 변환하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for converting a blockchain between on-chain and off-chain.

블록체인(blockchain)은 관리 대상 데이터를 '블록'이라고 하는 소규모 데이터들이 P2P 방식을 기반으로 생성된 체인 형태의 연결고리 기반 분산 데이터 저장 환경에 저장하여 누구라도 임의로 수정할 수 없고 누구나 변경의 결과를 열람할 수 있는 분산 컴퓨팅 기술 기반의 원장 관리 기술이다. 이는 근본적으로 분산 데이터 저장기술의 한 형태로, 지속적으로 변경되는 데이터를 모든 참여 노드에 기록한 변경 리스트로서 분산 노드의 운영자에 의한 임의 조작이 불가능하도록 고안되었다. In blockchain, small data called 'blocks' are stored in a chain-type, link-based distributed data storage environment created based on the P2P method, so that no one can arbitrarily modify it, and anyone can view the results of the change. It is a ledger management technology based on distributed computing technology that can do this. This is essentially a form of distributed data storage technology, and it is a change list that records continuously changing data to all participating nodes, and is designed to prevent arbitrary manipulation by the operator of the distributed node.

기존의 많은 응용에서 블록체인의 장점을 살리고자 하는 노력들이 많이 시도되고 있다.A lot of efforts are being made to take advantage of the advantages of blockchain in many existing applications.

하지만, 종래 서버(오프체인)를 블록체인(온체인)으로 변경하고자 하는 경우, 블록체인 플랫폼 상에서 프로그램(스마트컨트랙트)과 데이터(원장)를 새로이 구축해야 한다. 이와 같이 서버(오프체인)를 블록체인(온체인)으로 변경하기 위하여는 서버 플랫폼과 블록체인 플랫폼에 모두 능숙해야 하므로 초보자들의 변경이 용이하지 않아 어려움이 있다. However, if you want to change the conventional server (off-chain) to a blockchain (on-chain), you need to build a new program (smart contract) and data (ledger) on the blockchain platform. As such, to change the server (off-chain) to the block chain (on-chain), it is difficult for beginners to change because it is necessary to be proficient in both the server platform and the block chain platform.

또한, 필요에 따라 블록체인(온체인)상에서 수행되던 응용들을(스마트컨트랙트) 종래 서버(오프체인)의 처리 방식으로 변환하고자 할 때에도, 서버에 맞는 프로그램과 데이터베이스를 새로이 구축해야하며, 이러한 경우에도 초보자들의 변경이 용이하지 않아 어려움이 있다. In addition, if necessary, when converting applications (smart contracts) performed on the blockchain (on-chain) to the processing method of the conventional server (off-chain), it is necessary to newly build a program and database suitable for the server. It is difficult because it is not easy for beginners to change.

이와 같이, 종래 서버(오프체인)의 프로그램 및 데이터베이스와, 블록체인(온체인) 상의 프로그램(스마트컨트랙트)과 데이터(원장) 간의 상호 변환에 대한 니즈는 발생하고 있으나, 상호 변환이 용이하지 않다. As described above, there is a need for mutual conversion between the program and database of the conventional server (off-chain), and the program (smart contract) and data (ledger) on the block chain (on-chain), but the mutual conversion is not easy.

따라서, 종래 서버(오프체인)의 프로그램 및 데이터베이스와, 블록체인(온체인) 상의 프로그램(스마트컨트랙트)과 데이터(원장) 간의 변환을 용이하게 하는 장치 및 방법이 요구된다.Accordingly, there is a need for an apparatus and method for facilitating conversion between a program and database of a conventional server (off-chain) and a program (smart contract) and data (ledger) on a block chain (on-chain).

본 발명은 일반 서버(오프체인)의 프로그램 및 데이터와, 블록체인(온체인)의 스마트컨트랙트 및 원장 간의 변환 장치 및 방법을 제공하고자 한다. An object of the present invention is to provide a conversion apparatus and method between programs and data of a general server (off-chain) and smart contracts and ledgers of a block chain (on-chain).

본 발명이 해결하고자 하는 과제는 이상에서 언급한 과제(들)로 제한되지 않으며, 언급되지 않은 또 다른 과제(들)은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The problem to be solved by the present invention is not limited to the problem(s) mentioned above, and another problem(s) not mentioned will be clearly understood by those skilled in the art from the following description.

본 발명의 일 실시예에 따른 오프체인(Off-chain)을 온체인(On-chain)으로 변환하는 장치의 블록체인 변환 방법은, 상기 오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환하는 단계; 상기 오프체인의 데이터베이스의 크기 및 상기 온체인의 데이터베이스의 운용 여부를 고려하여 상기 온체인의 데이터 저장 위치를 결정하는 단계; 및 상기 데이터 저장 위치의 결정에 따라, 상기 오프체인의 데이터베이스의 데이터를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계를 포함하는 것을 특징으로 한다. In the block chain conversion method of a device for converting off-chain to on-chain according to an embodiment of the present invention, the off-chain program is converted to the on-chain using the API of the on-chain platform. converting to a smart contract on the chain; determining the on-chain data storage location in consideration of the size of the off-chain database and whether the on-chain database is operated; and storing the data of the off-chain database in any one or more of the state data of the on-chain ledger, the internal database of the ledger, and the external database of the ledger according to the determination of the data storage location. do.

일실시예에서는, 상기 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계는, 상기 오프체인의 데이터베이스를 상기 원장의 외부 데이터베이스에 저장하는 경우, 상기 외부 데이터베이스에 저장되는 데이터에 대한 해시값을 상기 원장의 상태데이터 또는 상기 원장의 내부 데이터베이스에 저장한다. In one embodiment, the step of storing the state data of the on-chain ledger in any one or more of the internal database of the ledger and the external database of the ledger comprises: When the off-chain database is stored in the external database of the ledger, A hash value for data stored in the external database is stored in the state data of the ledger or the internal database of the ledger.

일실시예에서는, 상기 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계는, 상기 오프체인의 데이터베이스에 포함된 백업 데이터 또는 데이터 변환 이력을 제외하고 나머지 데이터를 저장하는 것을 특징으로 한다. In one embodiment, the step of storing the state data of the on-chain ledger in any one or more of the internal database of the ledger and the external database of the ledger excludes backup data or data conversion history included in the off-chain database. and storing the remaining data.

일실시예에서는, 상기 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환하는 단계는, 상기 오프체인의 프로그램에 금융거래가 포함되어 있는 경우, 상기 스마트컨트랙트에서 가상화폐 거래로 변환하는 것을 특징으로 한다. In one embodiment, the converting to the on-chain smart contract using the API of the on-chain platform includes converting from the smart contract to a virtual currency transaction when the off-chain program includes a financial transaction. characterized.

일실시예에서는, 상기 온체인의 데이터 저장 위치를 결정하는 단계 이전, 상기 오프체인의 데이터베이스에 포함된 데이터 중에서 가용성 및 신뢰성 향상을 위해 중복으로 저장된 중복 데이터를 배제하고, 상기 데이터의 크기를 고려하는 단계를 더 포함하는 것을 특징으로 한다. In one embodiment, before the step of determining the on-chain data storage location, redundant data stored in duplicate is excluded from the data included in the off-chain database to improve availability and reliability, and the size of the data is considered. It is characterized in that it further comprises a step.

본 발명의 다른 실시예에 따른 온체인(On-chain)을 오프체인(Off-chain)으로 변환하는 장치의 블록체인 변환 방법은, 상기 온체인의 스마트컨트랙트를 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환하는 단계; 상기 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계; 및 상기 온체인이 외부 데이터베이스를 운용하는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계를 포함한다. In the block chain conversion method of a device for converting on-chain to off-chain according to another embodiment of the present invention, the smart contract of the on-chain is converted to the API of the off-chain platform. converting to an off-chain program; storing the data of the on-chain ledger in the off-chain database; and when the on-chain operates an external database, storing data stored in the external database in the off-chain database.

일실시예에서는, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계는, 상기 외부 데이터베이스에 저장된 데이터를 가용성 향상을 위해 데이터베이스에 중복해서 저장하도록 하는 것을 특징으로 한다. In one embodiment, the step of storing the data stored in the external database in the off-chain database is characterized in that the data stored in the external database is duplicated in the database to improve availability.

일실시예에서는, 상기 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계 및 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계는, 상기 외부 데이터베이스에 저장된 데이터를 디스크 미러링, RAID(redundant array of inexpensive disk), 파일 및 데이터베이스 이중화, 서버 이중화 중 어느 하나 이상을 포함하는 방법을 이용하여 중복해서 저장하는 것을 특징으로 한다. In one embodiment, the steps of storing the data of the on-chain ledger in the off-chain database and storing the data stored in the external database in the off-chain database include mirroring the data stored in the external database to disk. , RAID (redundant array of inexpensive disk), file and database duplication, characterized in that the redundant storage using a method including any one or more of the server duplication.

일실시예에서는, 상기 온체인의 스마트컨트랙트를 상기 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환하는 단계는, 상기 스마트컨트랙트에 가상화폐 거래가 포함되어 있는 경우, 상기 오프체인의 프로그램에서 금융거래로 변환하는 것을 특징으로 한다. In one embodiment, the step of converting the on-chain smart contract into the off-chain program using the API of the off-chain platform includes, when the smart contract includes a virtual currency transaction, in the off-chain program It is characterized in that it is converted into a financial transaction.

본 발명의 다른 실시예에 따른 블록체인 변환 장치는 변환 대상의 오프체인의 프로그램 및 데이터베이스에 접근하여 정보를 읽어들이는 엑세스부; 오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환하는 스마트컨트랙트 변환부; 및 상기 스마트컨트랙트 변환부와 연동하여, 상기 오프체인의 데이터베이스의 크기 및 상기 온체인의 데이터베이스의 운용 여부를 고려하여 상기 온체인의 데이터 저장 위치를 결정하여, 상기 오프체인의 데이터베이스의 데이터를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 원장변환부를 포함한다. A block chain conversion apparatus according to another embodiment of the present invention includes: an access unit that reads information by accessing a program and database of an off-chain object to be converted; a smart contract conversion unit that converts an off-chain program into an on-chain smart contract using the API of the on-chain platform; and in conjunction with the smart contract conversion unit, the on-chain data storage location is determined in consideration of the size of the off-chain database and whether the on-chain database is operated, and the data of the off-chain database is transferred to the on-chain. It includes a ledger transformation unit for storing state data of the ledger, the internal database of the ledger, and any one or more of the external database of the ledger.

본 발명의 다른 실시예에 따른 블록체인 변환 장치는 변환 대상의 온체인의 스마트컨트랙트 및 원장에 접근하여 정보를 읽어들이는 엑세스부; 상기 온체인의 스마트컨트랙트를 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환하는 프로그램 변환부; 및 상기 프로그램 변환부와 연동하여, 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하고, 상기 온체인이 외부 데이터베이스를 운용하는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 데이터베이스 변환부를 포함하는 것을 특징으로 한다. A block chain conversion apparatus according to another embodiment of the present invention includes: an access unit that reads information by accessing the on-chain smart contract and ledger of the conversion target; a program conversion unit that converts the on-chain smart contract into an off-chain program using an API of an off-chain platform; and the on-chain ledger data is stored in the off-chain database by interworking with the program conversion unit, and when the on-chain operates an external database, the data stored in the external database is stored in the off-chain database It is characterized in that it includes a database conversion unit.

본 발명의 일 실시예에 따른 블록체인 변환 방법 및 장치를 이용하여 오프체인과 온체인 간의 변환을 용이하게 수행할 수 있다. Conversion between off-chain and on-chain can be easily performed using the block chain conversion method and apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 블록체인 변환 방법 및 장치는 저비용으로 빠른 시간내에 온체인과 오프체인의 변환을 수행할 수 있게 한다.A block chain conversion method and apparatus according to an embodiment of the present invention enables on-chain and off-chain conversion to be performed in a short time at low cost.

도 1은 본 발명의 일 실시예에 따른 블록체인 변환을 설명하기 위한 개념도이다.
도 2는 본 발명의 일 실시예에 따른 오프체인을 온체인으로 변환하는 변환장치의 구성을 나타낸 블록도이다.
도 3은 본 발명의 일 실시예에 따른 오프체인을 온체인으로 변환하기 위한 변환장치의 블록체인 변환 방법을 설명하기 위한 흐름도이다.
도 4는 본 발명의 일 실시예에 따른 온체인을 오프체인으로 변환하는 변환장치의 구성을 나타낸 블록도이다.
도 5는 본 발명의 일 실시예에 따른 온체인을 오프체인으로 변환하기 위한 변환장치의 블록체인 변환 방법을 설명하기 위한 흐름도이다.
1 is a conceptual diagram for explaining blockchain transformation according to an embodiment of the present invention.
2 is a block diagram showing the configuration of a conversion device for converting off-chain to on-chain according to an embodiment of the present invention.
3 is a flowchart illustrating a block chain conversion method of a conversion device for converting off-chain to on-chain according to an embodiment of the present invention.
4 is a block diagram showing the configuration of a conversion device for converting on-chain to off-chain according to an embodiment of the present invention.
5 is a flowchart illustrating a block chain conversion method of a conversion device for converting on-chain to off-chain according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is mentioned that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세하게 설명한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 블록체인 변환을 설명하기 위한 개념도이다.1 is a conceptual diagram for explaining blockchain transformation according to an embodiment of the present invention.

도 1을 참조하면 블록체인 변환 장치(100)에 의해 오프체인 및 온체인 변환이 수행됨을 알 수 있다. Referring to FIG. 1 , it can be seen that off-chain and on-chain conversion are performed by the block chain conversion device 100 .

본 발명의 일 실시예에서, 블록체인 변환 시스템의 오프체인(Off-chain)은 블록체인이 아닌 서버 플랫폼을 따르고, 프로그램과 데이터베이스(또는 파일 시스템)을 포함한다. In one embodiment of the present invention, the off-chain of the blockchain conversion system follows a server platform rather than a blockchain, and includes a program and a database (or file system).

블록체인 변환 시스템의 온체인(On-chain)은 블록체인 플랫폼을 따르고, 스마트컨트랙트 및 원장을 포함한다. 또한, 온체인은 외부의 데이터베이스를 더 포함할 수 있다.The on-chain of the blockchain transformation system follows the blockchain platform and includes smart contracts and ledgers. In addition, the on-chain may further include an external database.

본 발명의 일 실시예에 따른 블록체인 변환 장치(100)가, 오프체인을 온체인으로 변환하는 경우, 오프체인의 프로그램을 온체인의 스마트컨트랙트로 변환하고, 오프체인의 데이터베이스를 온체인의 원장 및/또는 외부 데이터베이스로 변환한다. When the block chain conversion apparatus 100 according to an embodiment of the present invention converts off-chain to on-chain, it converts off-chain programs into on-chain smart contracts, and converts off-chain databases into on-chain ledgers. and/or to an external database.

오프체인의 프로그램은 일반 서버 플랫폼의 비즈니스 로직을 처리하는 명령어 모음으로, 데이터베이스(또는 파일)에 저장된 데이터에 접근하여 쿼리 또는 업데이트 등을 수행한다. An off-chain program is a set of commands that process the business logic of a general server platform, and performs queries or updates by accessing data stored in a database (or file).

오프체인의 데이터베이스는 일반 서버 플랫폼의 프로그램에 의해 관리되는 데이터의 집합이다. 본 발명의 일 실시예에서는 오프체인의 데이터베이스로 기재하고 있으나, 데이터베이스 대신에 파일로 구성될 수 있다. An off-chain database is a set of data managed by a program of a general server platform. In an embodiment of the present invention, it is described as an off-chain database, but it may be composed of a file instead of a database.

블록체인 방식의 블록체인 플랫폼은 스마트컨트랙트와 원장을 포함한다. A blockchain-based blockchain platform includes smart contracts and ledgers.

스마트컨트랙트(smart contract)는 서버 방식의 프로그램에 대응하며, 블록체인 플랫폼의 비즈니스 로직을 처리하고 클라이언트 어플리케이션에서 제출한 트랜잭션을 통해 공유 원장(ledger) 상태를 관리하는 명령어 모음으로서, 여기서 비즈니스 로직은 블록체인 기반으로 금융거래, 부동산 계약, 공증 등 다양한 형태의 계약을 체결하고 이행하는 것을 말한다. 스마트컨트랙트의 크기는 스마트컨트랙트에 해당하는 파일 또는 데이터의 크기를 의미하며, 스마트컨트랙트의 실행에 필요한 연산량은 스마트컨트랙트가 실행되기 위하여 노드에게 요구되는 연산량을 의미할 수 있다.A smart contract corresponds to a server-type program, and is a set of commands that processes the business logic of the blockchain platform and manages the shared ledger state through the transaction submitted by the client application, where the business logic is a block It refers to the conclusion and execution of various types of contracts such as financial transactions, real estate contracts, and notarizations based on chains. The size of the smart contract means the size of a file or data corresponding to the smart contract, and the amount of computation required for the execution of the smart contract may mean the amount of computation required for a node to execute the smart contract.

원장(ledger)은 서버 방식의 데이터베이스에 대응하며, 블록체인의 최초블록(genesis block)이후의 모든 트랜잭션에 대한 정보를 저장한 데이터일 수 있다. The ledger corresponds to a server-type database, and may be data that stores information about all transactions after the genesis block of the block chain.

본 발명의 일 실시예에 따른 블록체인 변환 장치(100)는, 온체인을 오프체인으로 변환하는 경우, 온체인의 스마트컨트랙트를 오프체인의 프로그램으로 변환하고, 온체인의 원장 및/또는 외부 데이터베이스를 오프체인의 데이터베이스로 변환한다. The block chain conversion apparatus 100 according to an embodiment of the present invention converts an on-chain smart contract into an off-chain program, when converting on-chain to off-chain, and on-chain ledger and/or external database to an off-chain database.

본 발명의 일 실시예에 따른 블록체인 변환 장치(100)는 데스크탑PC, 노트북PC, 서버컴퓨터, 스마트폰 및 태블리PC 등과 같은 컴퓨팅 장치에 탑재될 수 있다.The block chain conversion device 100 according to an embodiment of the present invention may be mounted on a computing device such as a desktop PC, a notebook PC, a server computer, a smart phone, and a tablet PC.

도 2는 본 발명의 일 실시예에 따른 오프체인을 온체인으로 변환하는 변환장치의 구성을 나타낸 블록도이다. 2 is a block diagram showing the configuration of a conversion device for converting off-chain to on-chain according to an embodiment of the present invention.

도 2를 참조하면 블록체인 변환 장치(100)는 엑세스부(110), 스마트컨트랙트 변환부(120) 및 원장변환부(130)를 포함할 수 있다. Referring to FIG. 2 , the block chain conversion apparatus 100 may include an access unit 110 , a smart contract conversion unit 120 , and a ledger conversion unit 130 .

엑세스부(110)는 변환 대상의 오프체인의 프로그램 및 데이터베이스에 접근하여 정보를 읽어들인다. The access unit 110 reads information by accessing the off-chain program and database to be converted.

변환부(120)는 엑세스부(110)를 통해 수신된 오프인의 정보를 온체인으로 변환한다. The conversion unit 120 converts off-in information received through the access unit 110 into on-chain.

스마트컨트랙트 변환부(120)는 오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환한다. The smart contract conversion unit 120 converts the off-chain program into the on-chain smart contract using the API of the on-chain platform.

원장변환부(130)는 스마트컨트랙트 변환부(120)와 연동하여 오프체인의 데이터베이스에 저장된 데이터를 온체인 플랫폼에 맞게 변환한다. 온체인 플랫폼은 필요에 따라 원장 외부의 데이터베이스를 운용할 수 있다.The ledger conversion unit 130 works with the smart contract conversion unit 120 to convert data stored in the off-chain database to fit the on-chain platform. The on-chain platform can operate a database outside the ledger as needed.

원장변환부(130)는 오프체인의 데이터베이스에 포함된 백업 데이터 또는 데이터 변환 이력을 제외하고 나머지 데이터만 저장한다. 이는 블록체인은 자체적으로 데이터가 중복되어 저장되므로, 오프체인 플랫폼에서 필요에 의해 사용하였던 변화된 이력이나 백업 데이터는 온체인에서는 더 이상의 불필요하기 때문이다. The ledger conversion unit 130 stores only the remaining data except for the backup data or data conversion history included in the off-chain database. This is because the block chain itself stores redundant data, so the changed history or backup data used as needed in the off-chain platform is no longer unnecessary in the on-chain.

원장변환부(130)는 오프체인의 데이터베이스의 크기 및 상기 온체인(On-chain)의 외부 데이터베이스의 운용 여부를 고려하여 상기 온체인(On-chain)의 데이터 저장 위치를 결정한다. The ledger conversion unit 130 determines the on-chain data storage location in consideration of the size of the off-chain database and whether the on-chain external database is operated.

원장변환부(130)는 오프체인의 데이터베이스에 포함된 데이터 중에서 가용성 및 신뢰성 향상을 위해 중복으로 저장된 중복 데이터를 배제하고, 상기 데이터의 크기를 고려한다. 블록체인(온체인)은 자체적으로 데이터를 중복하여 저장하기 때문이다. The ledger conversion unit 130 excludes redundant data stored in duplicate to improve availability and reliability among data included in the off-chain database, and considers the size of the data. This is because the blockchain (on-chain) itself stores data redundantly.

원장변환부(130)는 데이터 저장 위치의 결정에 따라, 상기 오프체인의 데이터베이스를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상을 이용하여 저장한다. The ledger conversion unit 130 stores the off-chain database by using any one or more of the state data of the on-chain ledger, the internal database of the ledger, and the external database of the ledger according to the determination of the data storage location.

원장변환부(130)는 해시값 생성 프로그램을 포함할 수 있다. 해시값이란 복사된 디지털 증거의 동일성을 입증하기 위해 파일 특성을 축약한 암호같은 수치이다. The ledger conversion unit 130 may include a hash value generating program. A hash value is a password-like number that abbreviates the characteristics of a file to prove the identity of the copied digital evidence.

원장변환부(130)는 오프체인의 데이터베이스를 상기 원장의 외부 데이터베이스에 저장하는 경우, 해시값 생성 프로그램을 구동시켜 상기 외부 데이터베이스에 저장되는 데이터에 대한 해시값을 생성한다. 원장변환부(130)는 생성된 해시값을, 상기 원장의 상태데이터 또는 상기 원장의 내부 데이터베이스에 저장하고 실질 데이터를 원장의 외부 데이터베이스에 저장한다. 추후, 해시값에 의해 외부 데이터베이스에 저장된 데이터의 동일성을 입증할 수 있다. When the off-chain database is stored in the external database of the ledger, the ledger conversion unit 130 generates a hash value for data stored in the external database by driving a hash value generating program. The ledger transformation unit 130 stores the generated hash value in the state data of the ledger or the internal database of the ledger, and stores the actual data in the external database of the ledger. Later, the identity of the data stored in the external database can be verified by the hash value.

원장변환부(130)는 오프체인의 데이터베이스에 포함된 백업 데이터 또는 데이터 변환 이력을 제외하고 나머지 데이터만 저장한다. The ledger conversion unit 130 stores only the remaining data except for the backup data or data conversion history included in the off-chain database.

도 3은 본 발명의 일 실시예에 따른 오프체인을 온체인으로 변환하기 위한 변환장치의 블록체인 변환 방법을 설명하기 위한 흐름도이다.3 is a flowchart illustrating a block chain conversion method of a conversion device for converting off-chain to on-chain according to an embodiment of the present invention.

단계 S100에서는, 블록체인 변환 장치는 복수의 종류의 블록체인 중에서 한 종류의 블록체인을 선정할 수 있다. 이를 위하여, 블록체인 변환 장치는 작업자에게 블록체인 선정을 위한 인터페이스를 제공하고, 작업자는, 인터페이스를 통해 오프체인 플랫폼의 프로그램 적용 대상, 금융거래포함 유무, 블록체인의 확장성과 성능을 고려하여, 복수의 종류의 블록체인 중에서 한 종류의 블록체인을 선택하여 입력할 수 있다. In step S100, the block chain conversion device may select one type of block chain from among a plurality of types of block chains. To this end, the block chain conversion device provides an interface for selecting a block chain to the worker, and the worker, through the interface You can select and input one type of block chain from among the types of block chains.

블록체인의 종류는 퍼블릭 블록체인, 프라이빗 블록체인, 컨소시엄 블록체인으로 구분된다. Blockchain types are divided into public blockchains, private blockchains, and consortium blockchains.

간단히 설명하면, 퍼블릭 블록체인은 제3자의 제어를 받지 않는 탈중앙화의 정도가 가장 높은 블록체인이다. Simply put, a public blockchain is a blockchain with the highest degree of decentralization that is not controlled by a third party.

프라이빗 블록체인은 다 중심화 시스템으로, 참여할 수 있는 노드를 엄격하게 관리하고 노드의 수도 적어, 블록체인이 협의를 달성하는 시간 및 거래의 속도가 빠르다. The private blockchain is a multi-centralized system, and the number of nodes that can participate is strictly managed and the number of nodes is small, so the time for the blockchain to achieve consensus and the speed of transactions are fast.

컨소시엄 블록체인은 퍼블릭 블록체인과 프라이빗 블록체인의 중간 정도로 부분 탈중앙화를 실현한다. 체인의 각 노드에는 일반적으로 서로 대응하거나 관리하는 기관이나 조직이 있고, 참여자는 권한을 부여받아 네트워크에 가입하면 이익 관련 연맹이 되어 공동으로 블록체인의 운영을 유지한다. 컨소시엄 블록체인은 원가가 낮고 효율이 높은 장점을 가지고 있어, 부동산 실체간의 거래, B2B 거래 등에 적용된다. Consortium blockchain realizes partial decentralization to an intermediate degree between public and private blockchains. Each node in the chain generally has an institution or organization that responds to or manages each other, and when participants are granted permission and join the network, they become a profit-related federation and jointly maintain the operation of the blockchain. Consortium blockchain has the advantages of low cost and high efficiency, so it is applied to transactions between real estate entities and B2B transactions.

다른 변형예에서, 블록체인 변환 장치는 미리 제공된 설정 인터페이스를 통해 프로그램 적용 대상, 가상화폐 유무, 블록체인의 확장성과 성능 등에 관련된 정보를 수신하여, 복수의 블록체인 중에서 가장 적합한 블록체인을 자동 선정하도록 할 수 있다. In another variation, the block chain conversion device receives information related to the program application target, the existence of virtual currency, the scalability and performance of the block chain, etc. through a pre-provided setting interface, and automatically selects the most suitable block chain from among a plurality of block chains. can do.

예컨대, 블록체인 변환 장치는 미리 제공된 설정 인터페이스를 통해 입력되는 금융거래에 적용, 누구나 참여 가능 등의 정보를 수신한 후, 수신된 정보에 기초하여 퍼블릭 블록체인을 추천할 수 있다. 사용자는 추천된 블록체인이 퍼블릭 블록체인인 것을 확인하면, 퍼블릭 블록체인을 복수의 블록체인 중에서 가장 적합한 블록체인으로 선정한다. For example, the block chain conversion device can recommend a public block chain based on the received information after receiving information such as being applied to a financial transaction input through a pre-provided setting interface, anyone can participate, and the like. When the user confirms that the recommended blockchain is a public blockchain, the public blockchain is selected as the most suitable blockchain among multiple blockchains.

단계 S110에서는, 상기 오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환한다.In step S110, the off-chain program is converted into the on-chain smart contract using the API of the on-chain platform.

온체인 플랫폼의 API는 온체인 플랫폼에서 사용할 수 있도록 운영체제(OS) 또는 프로그래밍 언어가 제공하는 기능을 수행하기 위한 인터페이스를 의미한다. The API of the on-chain platform refers to an interface for performing functions provided by the operating system (OS) or programming language so that it can be used on the on-chain platform.

즉, 오프체인의 플랫폼에 따른 API를 온체인 플랫폼의 API로 변환하여, 오프체인의 프로그램의 데이터 처리를 온체인의 스마트컨트랙트의 데이터 처리로 변환하는 것이다. 예를 들어, 오프체인의 프로그램에서 데이터베이스(또는 파일)에 접근하여 데이터 읽기의 경우, read를 사용하는데, 오프체인의 read를 온체인에서 원장읽기인, getState로 변환하고 관련 파라미터를 변환한다. 또한 오프체인의 프로그램에서 데이터베이스 및 파일의 쓰기 동작이 write인 경우 온체인의 원장 쓰기 동작인 putState로 변환한다. That is, by converting the API according to the off-chain platform to the API of the on-chain platform, the data processing of the off-chain program is converted into the data processing of the on-chain smart contract. For example, in the case of reading data by accessing a database (or file) from an off-chain program, read is used, and the off-chain read is converted into getState, which is an on-chain ledger read, and related parameters are converted. Also, if the write operation of the database and file in the off-chain program is write, it is converted to putState, which is the on-chain ledger write operation.

또한, 오프체인 플랫폼에 대응하는 파라미터를 온체인 플랫폼에 대응하는 파라미터로 변환한다. 다만 해당 파라미터가 오프체인에만 해당하는 파라미터인지 판단하고, 오프체인에만 해당하는 파라미터인 경우에 파라미터를 변경하지 않고 무시한다. In addition, the parameter corresponding to the off-chain platform is converted into the parameter corresponding to the on-chain platform. However, it is determined whether the corresponding parameter is an off-chain only parameter, and if it is an off-chain only parameter, it is ignored without changing the parameter.

예를 들어, 오프체인이 금융거래를 다루고 있는 경우, 오프체인의 금융거래(카드정산, 은행이체 등)는 온체인의 가상화폐 거래로 대체된다. 다만, 오프체인의 금융거래에서 요구되었던 사용자 인증 기능(예를 들어 공인인증서 등)은 온체인으로 변환할 때 필요하지 않는 기능이므로 무시된다. 온체인은 자체에 사용자 인증기능이 포함되어 있기 때문이다. For example, if off-chain financial transactions are handled, off-chain financial transactions (card settlement, bank transfer, etc.) are replaced with on-chain virtual currency transactions. However, user authentication functions (eg, public certificates) required for off-chain financial transactions are ignored as they are not required when converting to on-chain. This is because on-chain itself includes a user authentication function.

또한, 오프체인의 데이터베이스(또는 파일)에서 가용성 향상을 위해 데이터를 중복하여 저장하는 기능은 온체인 상에서는 더 이상 필요가 없으므로, 블록체인 변환 장치는 이와 관련된 오프체인의 명령어를 무시한다. 이러한 데이터를 중복하여 저장하는 기능은 예를 들어, 디스크 미러링, RAID, 파일 및 데이터베이스 이중화, 서버 이중화 등이 있다. In addition, the function of redundantly storing data to improve availability in the off-chain database (or file) is no longer required on-chain, so the blockchain conversion device ignores the related off-chain command. A function of redundantly storing such data includes, for example, disk mirroring, RAID, file and database duplication, and server duplication.

다른 예로, 블록체인 변환 장치는 오프체인의 이력 저장 또는 백업과 관련된 명령어를 무시한다. As another example, the blockchain conversion device ignores commands related to off-chain history storage or backup.

블록체인 변환 장치는 오프체인의 플랫폼 호환성과 관련된 명령어를 무시한다. 오프체인을 구성하는 하드웨어, 운영체제, 미들웨어, 데이터베이스들이 서로 상이한 플랫폼에 의해 운용되는 경우, 이들을 상호호환시키기 위하여, 별도의 변환기나 소프트웨어 게이트웨이를 부가하는 반면 온체인의 스마트컨트랙드의 경우 상호호환성 문제를 갖지 않기 때문이다. The blockchain conversion device ignores commands related to off-chain platform compatibility. When the hardware, operating system, middleware, and databases composing off-chain are operated by different platforms, a separate converter or software gateway is added to make them mutually compatible, whereas on-chain smart contract interoperability problem because it does not have

다음, 단계 S120에서는, 상기 오프체인의 데이터베이스의 크기 및 상기 온체인(On-chain)의 데이터베이스의 운용 여부를 고려하여 상기 온체인(On-chain)의 데이터 저장 위치를 결정한다. Next, in step S120, the on-chain data storage location is determined in consideration of the size of the off-chain database and whether the on-chain database is operated.

블록체인 변환 장치는 오프체인의 데이터베이스(또는 파일)에 저장된 데이터를 온체인이 억세스 할 수 있는 상태의 저장 형식으로 변환한다. The blockchain conversion device converts the data stored in the off-chain database (or file) into a storage format that can be accessed by the on-chain.

이를 위하여 블록체인 변환 장치는 데이터 저장 위치를 결정하기 위하여 먼저 온체인이 원장의 데이터베이스를 운용하는 여부를 판단한다. To this end, the blockchain conversion device first determines whether the on-chain operates the database of the ledger in order to determine the data storage location.

예를 들어, 온체인이 원장의 내부 데이터베이스를 운용하는 경우, 블록체인 변환 장치는 데이터베이스의 크기를 확인한다. 데이터베이스의 크기를 확인 할 때, 오프체인의 데이터베이스에 포함된 데이터 중에서 가용성 및 신뢰성 향상을 위해 중복으로 저장된 중복 데이터를 배제한 나머지 데이터의 크기만을 고려한다. For example, if the on-chain operates the internal database of the ledger, the blockchain conversion device checks the size of the database. When checking the size of the database, only the size of the remaining data, excluding redundant data stored in duplicate, is considered in order to improve availability and reliability among the data included in the off-chain database.

온체인이 내부 데이터베이스를 운용하지만, 데이터베이스의 크기가 미리 설정된 크기 미만인 경우, 오프체인의 데이터베이스에 저장된 데이터의 저장위치를 온체인 원장의 데이터베이스로 결정한다. If the on-chain operates an internal database, but the size of the database is less than the preset size, the storage location of the data stored in the off-chain database is determined as the database of the on-chain ledger.

온체인이 내부 데이터베이스를 운용하지만, 오프체인의 데이터베이스의 크기가 미리 설정된 크기 이상인 경우, 데이터의 저장위치를 외부 데이터베이스로 결정한다. 또한, 외부 데이터베이스에 저장되는 데이터의 해시값의 저장위치를 원장 내부 데이터베이스로 결정한다. If the on-chain operates an internal database, but the size of the off-chain database is larger than a preset size, the data storage location is determined as an external database. In addition, the storage location of the hash value of the data stored in the external database is determined as the internal database of the ledger.

이러한 경우, 스마트컨트랙트가 데이터를 억세스할 때, 먼저 데이터의 키값으로 원장의 내부 데이터베이스를 검색하여, 해당 데이터의 해시값을 얻은 후, 해시값을 이용하여 원장 외부 데이터베이스를 검색한다. In this case, when a smart contract accesses data, it first searches the internal database of the ledger with the key value of the data, obtains the hash value of the data, and then searches the external database of the ledger using the hash value.

온체인이 내부 데이터베이스를 운용하지 않고, 오프체인의 데이터베이스의 크기가 미리 설정된 기준보다 작은 경우, 오프체인의 데이터베이스의 저장위치를 원장의 상태데이터로 결정한다. If the on-chain does not operate an internal database and the size of the off-chain database is smaller than a preset standard, the storage location of the off-chain database is determined as the state data of the ledger.

이러한 경우, 스마트컨트렉트는 온체인 내부에 있는 상태데이터에 직접 억세스할 수 있다. In this case, the smart contract can directly access the state data inside the on-chain.

다만, 단계 S100에서 블록체인의 종류가 퍼블릭 블록체인이 선정된 경우에도, 데이터베이스를 상태데이터에 저장하지 않도록 설정할 수 있다. 퍼블릭 블록체인의 경우, 온체인 트랜잭션 처리시 비용과 스토리지 비용에 따른 수수료 부담이 크기 때문이다. However, even when a public block chain is selected as the type of block chain in step S100, it is possible to set not to store the database in the state data. This is because, in the case of public blockchains, the burden of fees for on-chain transaction processing and storage costs is large.

온체인이 내부 데이터베이스를 운용하지 않고 오프체인의 데이터베이스의 크기가 미리 설정된 기준보다 이상인 경우 데이터의 저장위치를 외부 데이터베이스로 결정한다. 또한, 외부 데이터베이스에 저장되는 데이터의 해시값의 저장위치를 원장의 상태데이터로 결정한다. If the on-chain does not operate an internal database and the size of the off-chain database is larger than a preset standard, the data storage location is determined as an external database. In addition, the storage location of the hash value of the data stored in the external database is determined as the state data of the ledger.

이러한 경우, 스마트컨트랙트가 데이터를 억세스할 때, 먼저 데이터의 키값으로 원장의 상태데이터를 검색하여, 해당 데이터의 해시값을 얻은 후, 해시값을 이용하여 원장 외부 데이터베이스를 검색한다. In this case, when a smart contract accesses data, it first searches the state data of the ledger with the key value of the data, obtains the hash value of the data, and then searches the external ledger database using the hash value.

다른 변형예에서, 블록체인 변환 장치는 데이터 저장 위치를 결정하기 위하여 온체인이 원장의 외부 데이터베이스를 운용하는지 여부를 먼저 판단한 후, 내부 데이터베이스 운용 여부를 판단할 수 있다.In another modification, the block chain conversion device may first determine whether the on-chain operates an external database of the ledger in order to determine the data storage location, and then determine whether the internal database is operated.

단계 S130에서는, 상기 데이터 저장 위치의 결정에 따라, 상기 오프체인의 데이터베이스를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장한다. In step S130, according to the determination of the data storage location, the off-chain database is stored in any one or more of the state data of the on-chain ledger, the internal database of the ledger, and the external database of the ledger.

오프체인의 데이터베이스에 포함된 백업 데이터 또는 데이터 변환 이력을 제외하고 나머지 데이터만 저장한다. Except for the backup data or data conversion history included in the off-chain database, only the rest of the data is stored.

블록체인 변환 장치는 오프체인에서 데이터의 변환된 이력을 저장하지 않으므로, 블록체인에 데이터의 변환 이력을 저장할 수 없다. 따라서, 블록체인 변환 장치는 제너시스 블록과 유사한 형태로 상태시작을 합의한다. 변환 작업이 끝나고 본격적으로 블록체인으로 동작을 한 이후에만 블록체인은 변환된 이력을 관리한다. Since the blockchain conversion device does not store the conversion history of data off-chain, it cannot store the conversion history of data in the blockchain. Therefore, the blockchain transformation device agrees on the state initiation in a form similar to that of the Genesis block. The block chain manages the converted history only after the conversion work is completed and the block chain operates in earnest.

도 4는 본 발명의 일 실시예에 따른 온체인을 오프체인으로 변환하는 변환장치의 구성을 나타낸 블록도이다. 4 is a block diagram showing the configuration of a conversion device for converting on-chain to off-chain according to an embodiment of the present invention.

도 4를 참조하면 블록체인 변환 장치(101)는 엑세스부(111) 및 프로그램변환부(121) 및 데이터베이스변환부(131)를 포함한다.Referring to FIG. 4 , the block chain conversion device 101 includes an access unit 111 , a program conversion unit 121 , and a database conversion unit 131 .

엑세스부(111)는 변환 대상의 온체인의 스마트컨트랙트 및 원장에 접근하여 정보를 읽어들인다. The access unit 111 reads information by accessing the on-chain smart contract and ledger to be converted.

프로그램 변환부(121)는 온체인의 스마트컨트랙트를 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환한다. 프로그램 변환부(121)는 블록체인 원장 명령어는 데이터베이스 명령어로 변환한다. The program conversion unit 121 converts the on-chain smart contract into the off-chain program using the API of the off-chain platform. The program conversion unit 121 converts blockchain ledger commands into database commands.

데이터베이스 변환부(131)는 프로그램 변환부(121)와 연동하여, 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장한다. The database conversion unit 131 works with the program conversion unit 121 to store the data of the on-chain ledger in the off-chain database.

이 때 데이터베이스 변환부(131)는 원장에 해시값을 통해 외부 데이터베이스 운용여부를 판단할 수 있다. At this time, the database conversion unit 131 may determine whether to operate an external database through a hash value in the ledger.

데이터베이스 변환부(131)는 온체인이 외부 데이터베이스를 운용한다고 판단되는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장한다. 이 때, 데이터베이스 변환부(131)는 외부 데이터베이스에 저장된 데이터를 가용성 향상을 위해 오프체인의 데이터베이스에 중복해서 저장할 수 있다. When it is determined that the on-chain operates an external database, the database conversion unit 131 stores data stored in the external database in the off-chain database. At this time, the database conversion unit 131 may store the data stored in the external database redundantly in the off-chain database in order to improve availability.

데이터베이스 변환부(131)는 상기 외부 데이터베이스에 저장된 데이터를 디스크 미러링, RAID(redundant array of inexpensive disk), 파일 및 데이터베이스 이중화, 서버 이중화 중 어느 하나 이상을 포함하는 방법을 이용하여 중복해서 저장한다. The database conversion unit 131 stores the data stored in the external database redundantly using a method including any one or more of disk mirroring, redundant array of inexpensive disk (RAID), file and database duplication, and server duplication.

한편, 데이터베이스 변환부(131)는 온체인에 저장된 데이터 변환 이력은 오프체인에서 사용하지 않으므로, 별도로 보관하거나, 폐기한다. On the other hand, since the database conversion unit 131 does not use the data conversion history stored in the on-chain in the off-chain, it is separately stored or discarded.

데이터베이스 변환부(131)는 온체인의 스마트컨트랙트에 가상화폐 거래가 포함되어 있는 경우, 상기 오프체인의 프로그램에서 금융거래로 변환한다. When a virtual currency transaction is included in an on-chain smart contract, the database conversion unit 131 converts it into a financial transaction in the off-chain program.

데이터베이스 변환부(131)는 프로그램에 금융거래를 추가하는 경우, 금융거래의 보안을 위한 사용자 인증 기능과 관련된 기능을 추가할 수 있다. 예를 들어, 공인인증서 인증을 위한 사용자 인터페이스를 추가하거나, 공인인증서 서버와의 통신 인터페이스를 추가할 수 있다. When a financial transaction is added to the program, the database conversion unit 131 may add a function related to a user authentication function for security of the financial transaction. For example, a user interface for authentication of a public certificate may be added, or a communication interface with a public certificate server may be added.

참고로, 여러 플랫폼(하드웨어, 운영체제, 미들웨어, 데이터베이스)에서 개발되는 프로그램은 상호 운영성에서 문제가 되는 경우가 있고, 이러한 경우, 별도의 변환기나 게이트웨이를 통하여 변환을 수행한다. 그러나, 본 발명의 일 실시예에 따라 블록체인을 이용한 스마트컨트랙트를 일반 프로그램으로 변환시에는 상호 호환성에 문제가 없다. For reference, programs developed on multiple platforms (hardware, operating system, middleware, database) sometimes have problems in interoperability, and in this case, conversion is performed through a separate converter or gateway. However, there is no problem in interoperability when converting a smart contract using a block chain into a general program according to an embodiment of the present invention.

도 5는 본 발명의 일 실시예에 따른 온체인을 오프체인으로 변환하기 위한 변환장치의 블록체인 변환 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a block chain conversion method of a conversion device for converting on-chain to off-chain according to an embodiment of the present invention.

단계 S210에서는, 온체인의 스마트컨트랙트를 상기 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환한다. In step S210, the on-chain smart contract is converted into the off-chain program using the API of the off-chain platform.

스마트컨트랙트에 가상화폐 거래가 포함되어 있는 경우, 오프체인의 프로그램에서 금융거래로 변환하고, 공인인증과 같은 사용자 인증 기능을 추가한다. If a smart contract includes a virtual currency transaction, it is converted into a financial transaction in an off-chain program, and user authentication functions such as public authentication are added.

단계 S220에서는, 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장한다. In step S220, the on-chain ledger data is stored in the off-chain database.

단계 S230에서는, 온체인이 외부 데이터베이스를 운용하는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장한다.In step S230, when the on-chain operates an external database, data stored in the external database is stored in the off-chain database.

상기 외부 데이터베이스에 저장된 데이터를 가용성 향상을 위해 데이터베이스에 중복해서 저장한다. 이 때, 상기 외부 데이터베이스에 저장된 데이터를 디스크 미러링, RAID(redundant array of inexpensive disk), 파일 및 데이터베이스 이중화, 서버 이중화 중 어느 하나 이상을 포함하는 방법을 이용하여 중복해서 저장한다. Data stored in the external database is redundantly stored in the database to improve availability. In this case, the data stored in the external database is redundantly stored using a method including any one or more of disk mirroring, redundant array of inexpensive disk (RAID), file and database duplication, and server duplication.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다.Meanwhile, the above-described embodiments of the present invention can be written as a program that can be executed on a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium.

상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 를 포함한다.The computer-readable recording medium includes a magnetic storage medium (eg, ROM, floppy disk, hard disk, etc.) and an optically readable medium (eg, CD-ROM, DVD, etc.).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far, with respect to the present invention, the preferred embodiments have been looked at. Those of ordinary skill in the art to which the present invention pertains will understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention. Therefore, the disclosed embodiments are to be considered in an illustrative rather than a restrictive sense. The scope of the present invention is indicated in the claims rather than the foregoing description, and all differences within the scope equivalent thereto should be construed as being included in the present invention.

Claims (11)

오프체인(Off-chain)을 온체인(On-chain)으로 변환하는 장치의 블록체인 변환 방법으로서,
상기 오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환하는 단계;
상기 오프체인의 데이터베이스의 크기 및 상기 온체인의 데이터베이스의 운용 여부를 고려하여 상기 온체인의 데이터 저장 위치를 결정하는 단계; 및
상기 데이터 저장 위치의 결정에 따라, 상기 오프체인의 데이터베이스의 데이터를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계
를 포함하는 것을 특징으로 하는 블록체인 변환 방법.
As a block chain conversion method of a device that converts off-chain to on-chain,
converting the off-chain program into the on-chain smart contract using the on-chain platform API;
determining the on-chain data storage location in consideration of the size of the off-chain database and whether the on-chain database is operated; and
Storing the data of the off-chain database in any one or more of the state data of the on-chain ledger, the internal database of the ledger, and the external database of the ledger according to the determination of the data storage location;
A block chain transformation method comprising a.
제1항에 있어서,
상기 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계는,
상기 오프체인의 데이터베이스를 상기 원장의 외부 데이터베이스에 저장하는 경우, 상기 외부 데이터베이스에 저장되는 데이터에 대한 해시값을 상기 원장의 상태데이터 또는 상기 원장의 내부 데이터베이스에 저장하는 것을 특징으로 하는 블록체인 변환 방법.
According to claim 1,
The step of storing the state data of the on-chain ledger in any one or more of the internal database of the ledger and the external database of the ledger comprises:
When the off-chain database is stored in the external database of the ledger, a hash value of the data stored in the external database is stored in the state data of the ledger or the internal database of the ledger. .
제1항에 있어서,
상기 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 단계는,
상기 오프체인의 데이터베이스에 포함된 백업 데이터 또는 데이터 변환 이력을 제외하고 나머지 데이터를 저장하는 것을 특징으로 하는 블록체인 변환 방법.
According to claim 1,
The step of storing the state data of the on-chain ledger in any one or more of the internal database of the ledger and the external database of the ledger comprises:
A block chain conversion method, characterized in that the remaining data is stored except for the backup data or data conversion history included in the off-chain database.
제1항에 있어서,
상기 온체인 플랫폼의 API를 이용하여 상기 온체인의 스마트컨트랙트로 변환하는 단계는,
상기 오프체인의 프로그램에 금융거래가 포함되어 있는 경우, 상기 스마트컨트랙트에서 가상화폐 거래로 변환하는 것을 특징으로 하는 블록체인 변환 방법.
According to claim 1,
The step of converting to the on-chain smart contract using the API of the on-chain platform includes:
When a financial transaction is included in the off-chain program, the block chain conversion method, characterized in that the smart contract is converted into a virtual currency transaction.
제1항에 있어서,
상기 온체인의 데이터 저장 위치를 결정하는 단계 이전,
상기 오프체인의 데이터베이스에 포함된 데이터 중에서 가용성 및 신뢰성 향상을 위해 중복으로 저장된 중복 데이터를 배제하고, 상기 데이터의 크기를 고려하는 단계를 더 포함하는 것을 특징으로 하는 블록체인 변환 방법.
According to claim 1,
Before determining the on-chain data storage location,
Block chain transformation method, characterized in that it further comprises the step of excluding redundant data stored in duplicate to improve availability and reliability from among the data included in the off-chain database, and considering the size of the data.
온체인(On-chain)을 오프체인(Off-chain)으로 변환하는 장치의 블록체인 변환 방법으로서,
상기 온체인의 스마트컨트랙트를 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환하는 단계;
상기 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계; 및
상기 온체인이 외부 데이터베이스를 운용하는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계
를 포함하는 블록체인 변환 방법.
As a block chain conversion method of a device that converts on-chain to off-chain,
converting the on-chain smart contract into an off-chain program using an API of an off-chain platform;
storing the data of the on-chain ledger in the off-chain database; and
Storing data stored in the external database in the off-chain database when the on-chain operates an external database
A blockchain transformation method that includes
제6항에 있어서,
상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계는,
상기 외부 데이터베이스에 저장된 데이터를 가용성 향상을 위해 데이터베이스에 중복해서 저장하도록 하는 것을 특징으로 하는 블록체인 변환 방법.
7. The method of claim 6,
Storing the data stored in the external database in the off-chain database includes:
A block chain transformation method, characterized in that the data stored in the external database is stored redundantly in the database to improve availability.
제7항에 있어서,
상기 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계 및 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 단계는,
상기 외부 데이터베이스에 저장된 데이터를 디스크 미러링, RAID(redundant array of inexpensive disk), 파일 및 데이터베이스 이중화, 서버 이중화 중 어느 하나 이상을 포함하는 방법을 이용하여 중복해서 저장하는 것을 특징으로 하는 블록체인 변환 방법.
8. The method of claim 7,
The steps of storing the on-chain ledger data in the off-chain database and storing the data stored in the external database in the off-chain database include:
A block chain conversion method, characterized in that the data stored in the external database is stored in duplicate by using a method including any one or more of disk mirroring, RAID (redundant array of inexpensive disk), file and database duplication, and server duplication.
제8항에 있어서,
상기 온체인의 스마트컨트랙트를 상기 오프체인 플랫폼의 API를 이용하여 상기 오프체인의 프로그램으로 변환하는 단계는,
상기 스마트컨트랙트에 가상화폐 거래가 포함되어 있는 경우, 상기 오프체인의 프로그램에서 금융거래로 변환하는 것을 특징으로 하는 블록체인 변환 방법.
9. The method of claim 8,
The step of converting the on-chain smart contract into the off-chain program using the API of the off-chain platform includes:
When the smart contract includes a virtual currency transaction, the block chain conversion method, characterized in that it is converted into a financial transaction in the off-chain program.
변환 대상의 오프체인(Off-chain)의 프로그램 및 데이터베이스에 접근하여 정보를 읽어들이는 엑세스부;
오프체인의 프로그램을 온체인 플랫폼의 API를 이용하여 온체인(On-chain)의 스마트컨트랙트로 변환하는 스마트컨트랙트 변환부; 및
상기 스마트컨트랙트 변환부와 연동하여, 상기 오프체인의 데이터베이스의 크기 및 상기 온체인의 데이터베이스의 운용 여부를 고려하여 상기 온체인의 데이터 저장 위치를 결정하여, 상기 오프체인의 데이터베이스의 데이터를 온체인 원장의 상태데이터, 상기 원장의 내부 데이터베이스 및 상기 원장의 외부 데이터베이스 중 어느 하나 이상에 저장하는 원장변환부
를 포함하는 블록체인 변환 장치.
an access unit that reads information by accessing an off-chain program and database to be converted;
a smart contract conversion unit that converts an off-chain program into an on-chain smart contract using the API of the on-chain platform; and
In conjunction with the smart contract conversion unit, the on-chain data storage location is determined in consideration of the size of the off-chain database and whether the on-chain database is operated, and the data of the off-chain database is stored in the on-chain ledger. Ledger transformation unit to store the state data of the ledger in any one or more of the internal database of the ledger and the external database of the ledger
A block chain conversion device comprising a.
변환 대상의 온체인의 스마트컨트랙트 및 원장에 접근하여 정보를 읽어들이는 엑세스부;
상기 온체인의 스마트컨트랙트를 오프체인 플랫폼의 API를 이용하여 오프체인의 프로그램으로 변환하는 프로그램 변환부; 및
상기 프로그램 변환부와 연동하여, 온체인의 원장의 데이터를 상기 오프체인의 데이터베이스에 저장하고, 상기 온체인이 외부 데이터베이스를 운용하는 경우, 상기 외부 데이터베이스에 저장된 데이터를 상기 오프체인의 데이터베이스에 저장하는 데이터베이스 변환부
를 포함하는 것을 특징으로 하는 블록체인 변환 장치.


an access unit that reads information by accessing the on-chain smart contract and ledger to be converted;
a program conversion unit that converts the on-chain smart contract into an off-chain program using the API of the off-chain platform; and
In conjunction with the program conversion unit, the on-chain ledger data is stored in the off-chain database, and when the on-chain operates an external database, the data stored in the external database is stored in the off-chain database. database converter
A block chain conversion device comprising a.


KR1020200043019A 2020-04-08 2020-04-08 Blockchain conversion method and apparatus KR102446213B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200043019A KR102446213B1 (en) 2020-04-08 2020-04-08 Blockchain conversion method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200043019A KR102446213B1 (en) 2020-04-08 2020-04-08 Blockchain conversion method and apparatus

Publications (2)

Publication Number Publication Date
KR20210125381A true KR20210125381A (en) 2021-10-18
KR102446213B1 KR102446213B1 (en) 2022-09-22

Family

ID=78271453

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200043019A KR102446213B1 (en) 2020-04-08 2020-04-08 Blockchain conversion method and apparatus

Country Status (1)

Country Link
KR (1) KR102446213B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024064819A1 (en) * 2022-09-21 2024-03-28 3Dns, Inc. Blockchain-based domain name registrar and management system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089506A (en) * 2018-01-23 2019-07-31 박동화 System and method for e-contract with shared and distributed ledger coupled with outer storage devices
KR20190132160A (en) * 2018-05-18 2019-11-27 주식회사 비즈모델라인 Method for Providing Cryptocurrency Trading Platform by using Smart Contract

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089506A (en) * 2018-01-23 2019-07-31 박동화 System and method for e-contract with shared and distributed ledger coupled with outer storage devices
KR20190132160A (en) * 2018-05-18 2019-11-27 주식회사 비즈모델라인 Method for Providing Cryptocurrency Trading Platform by using Smart Contract

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Abdeljalil Beniiche, A Study of Blockchain Oracles, 2020.3.19. <URL:https://arxiv.org/abs/2004.07140> 1부.* *
Zonyin Shae and Jeffrey Tsai, Transform Blockchain into Distributed Parallel Computing Architecture for Precision Medicine, 2018 IEEE 38th International Conference on Distributed Computing Systems, 2018.7.2. <DOI: 10.1109/ICDCS.2018.00129> 1부.* *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024064819A1 (en) * 2022-09-21 2024-03-28 3Dns, Inc. Blockchain-based domain name registrar and management system

Also Published As

Publication number Publication date
KR102446213B1 (en) 2022-09-22

Similar Documents

Publication Publication Date Title
JP7447081B2 (en) Upgradeable securities token
JP7451565B2 (en) A system or method for enforcing the right to be forgotten on a metadata-driven blockchain using a shared secret and read agreement
US11743137B2 (en) Systems, methods, and apparatuses for implementing a metadata driven rules engine on blockchain using distributed ledger technology (DLT)
US20200252205A1 (en) Systems, methods, and apparatuses for implementing a multi tenant blockchain platform for managing einstein platform decisions using distributed ledger technology (dlt)
Zhang et al. Towards Dependable, Scalable, and Pervasive Distributed Ledgers with Blockchains.
AU2020261982B2 (en) Extracting data from a blockchain network
JP6867481B2 (en) Platform for atomic movement of smart assets within blockchain networks
US11102003B2 (en) Ledger-independent token service
US11341118B2 (en) Atomic application of multiple updates to a hierarchical data structure
CN111488393B (en) virtual blockchain
US11853291B2 (en) Privacy preserving architecture for permissioned blockchains
JP6804715B2 (en) Platform for atomic movement of smart assets within blockchain networks
US11627122B2 (en) Inter-system linking method and node
US20220027319A1 (en) Data deduplication in blockchain platforms
US10346373B1 (en) Merging and vending partial database schemas
US11943360B2 (en) Generative cryptogram for blockchain data management
KR102446213B1 (en) Blockchain conversion method and apparatus
JP2024512256A (en) Reducing transaction aborts within an execution-ordering-validation blockchain model
JP2022088326A (en) Method of selectively updating world state database in block chain network, system therefor, and computer program therefor
JP2023538497A (en) editable blockchain
US11966489B2 (en) Data certification process for cloud database platform
US20240054133A1 (en) Data Certification Process for Updates to Data in Cloud Database Platform
US20230185951A1 (en) Data Certification Process for Cloud Database Platform
CN109997166B (en) System and method for intercepting intelligent contracts
WO2023114164A1 (en) Data certification process for cloud database platform

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E90F Notification of reason for final refusal