KR20220151534A - Blockchain database mapping method and blockchain system to drive them - Google Patents

Blockchain database mapping method and blockchain system to drive them Download PDF

Info

Publication number
KR20220151534A
KR20220151534A KR1020220014783A KR20220014783A KR20220151534A KR 20220151534 A KR20220151534 A KR 20220151534A KR 1020220014783 A KR1020220014783 A KR 1020220014783A KR 20220014783 A KR20220014783 A KR 20220014783A KR 20220151534 A KR20220151534 A KR 20220151534A
Authority
KR
South Korea
Prior art keywords
blockchain
smart contract
block chain
abstract
unit
Prior art date
Application number
KR1020220014783A
Other languages
Korean (ko)
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 주식회사 오퍼스엠
Publication of KR20220151534A publication Critical patent/KR20220151534A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1834Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided are a blockchain database operating method and a blockchain system for performing the same so that an RDB-style lattice model data management method can be easily used on the blockchain system. A blockchain database mapping method according to an embodiment of the present invention comprises: a step of generating a table structure by using a user-defined tag by a client; a step of receiving an input of a target blockchain to be set and used by the client; a step of constructing a smart contract corresponding to the table structure by a migrator; a step of installing the smart contract constructed by the migrator on an abstract blockchain unit which provides a common API; and a step of transmitting data between the abstract blockchain unit and the target blockchain by an interface corresponding to the received target blockchain.

Description

블록체인 데이터베이스 매핑방법 및 이를 구동하기 위한 블록체인 시스템{BLOCKCHAIN DATABASE MAPPING METHOD AND BLOCKCHAIN SYSTEM TO DRIVE THEM}Blockchain database mapping method and blockchain system for driving it {BLOCKCHAIN DATABASE MAPPING METHOD AND BLOCKCHAIN SYSTEM TO DRIVE THEM}

본 발명은 블록체인 데이터베이스 매핑 방법 및 이를 구동하기 위한 블록체인 시스템에 관한 것이며, 구체적으로 블록체인의 종류에 관계없이 공통화된 방법으로 용이하게 기존의 블록체인을 데이터베이스로 사용할 수 있게 하여 주는 블록체인 데이터베이스 매핑 방법 및 이를 구동하기 위한 블록체인 시스템에 관한 것이다.The present invention relates to a block chain database mapping method and a block chain system for driving the same, and specifically, a block chain database that allows an existing block chain to be easily used as a database in a common way regardless of the type of block chain It relates to a mapping method and a blockchain system for driving it.

비트코인을 시작으로 다양한 종류의 블록체인 플랫폼이 생겨나면서, 엔터프라이즈 영역에서 사용할 수 있는 콘소시엄형의 블록체인도 뒤따라 등장을 했다. 엔터프라이즈 시스템에서의 블록체인은 화폐이동이라는 비트코인 본연의 목적보다는 분산 데이터 공유로서의 조직간 신뢰비용의 축소를 목적으로 한다. 기업에서 이런 분산데이터베이스 용도로 사용하기 위해서는 RDB 스타일의 격자형 모형의 데이터 관리방식을 사용해 왔다. As various types of blockchain platforms emerged, starting with Bitcoin, consortium-type blockchains that could be used in the enterprise area followed suit. Blockchain in an enterprise system aims to reduce the cost of trust between organizations as a distributed data sharing rather than the original purpose of Bitcoin, which is money transfer. In order to use this kind of distributed database in enterprises, the RDB-style lattice model data management method has been used.

따라서 종래의 시스템에서는 스마트 컨트랙트를 이용한 장부의 저장을 격자 형태로 로우/컬럼/인덱스를 가진 테이블 구조로 만들었으며, 해당 테이블 구조에 데이터를 삽입하고 쿼리하는 기술로서, 최근에 직접 SQL문을 입력하는 형태에서 객체를 직접 테이블로 매핑하는 JPA기술 등이 각광을 받고 있다.Therefore, in the conventional system, the storage of ledgers using smart contracts was made into a table structure with rows/columns/indexes in a lattice form, and as a technology for inserting and querying data in the table structure, recently directly inputting SQL statements JPA technology, which directly maps objects from forms to tables, is in the limelight.

한편 기업에서 RDB 스타일의 격자형 모형의 데이터 관리방식을 신뢰성을 위해 블록체인 시스템 상에서 사용하기 위해서는 각각의 블록체인 시스템을 위한 언어와 빌드 시스템 등을 배워야 하는데, 블록체인 전문가가 따로 없는 기업에서는 해당 전문가를 갖추지 않는 이상 블록체인 시스템 상에서 RDB 스타일의 격자형 모형의 데이터 관리방식을 적용하기 힘들다는 문제가 존재한다.On the other hand, in order for a company to use the RDB-style lattice model data management method on a blockchain system for reliability, it is necessary to learn the language and build system for each blockchain system. There is a problem that it is difficult to apply the RDB-style lattice model data management method on the blockchain system unless you have

종래기술인 등록특허 제10-2354736호에 의하면, 블록체인 기반의 데이터베이스 구축을 이용한 스타일링 서비스 제공방법 및 장치가 개시되어 있으나, 이러한 데이터베이스 구축을 위해서는 블록체인 시스템에 정통한 전문가가 동원되어야 하는 문제점이 있다.According to Patent Registration No. 10-2354736, which is a prior art, a method and apparatus for providing a styling service using a blockchain-based database construction are disclosed, but there is a problem in that an expert familiar with the blockchain system must be mobilized to build such a database.

블록체인 시스템 상에서 RDB 스타일의 격자형 모형의 데이터 관리방식을 손쉽게 이용할 수 있도록 블록체인 기반 데이터베이스 운영방법 및 이를 구동하기 위한 블록체인 시스템을 제공한다. Provides a blockchain-based database operation method and a blockchain system to drive it so that you can easily use the RDB-style lattice model data management method on the blockchain system.

상기한 과제를 해결하기 위해, 본 발명의 실시예에 따른 블록체인 데이터베이스 매핑 방법은, 클라이언트에 의해 사용자정의 태그를 이용하여 테이블 구조가 생성되는 단계; 클라이언트에 의해 설정되어 사용될 대상블록체인을 입력받는 단계; 마이그레이터에 의해 상기 테이블 구조에 대응하는 스마트 컨트랙트가 구성되는 단계; 공통API를 제공하는 추상블록체인부에 상기 마이그레이터에 의해 구성된 스마트 컨트랙트가 설치되는 단계; 상기 입력받은 대상블록체인에 대응하는 인터페이스에 의해 상기 추상블록체인부와 대상블록체인 사이에 데이터가 전송되는 단계를 포함한다.In order to solve the above problems, a block chain database mapping method according to an embodiment of the present invention includes the steps of generating a table structure using a user-defined tag by a client; Step of receiving an input of a target blockchain to be set and used by a client; Forming a smart contract corresponding to the table structure by the migrator; Installing a smart contract configured by the migrator in an abstract blockchain unit that provides a common API; and transmitting data between the abstract block chain unit and the target block chain by an interface corresponding to the received target block chain.

또한 실시예에 있어서, 상기 사용자정의 태그는 테이블을 생성하는 생성태그, 테이블에 데이터를 입력하는 입력태그, 테이블에 저장된 데이터를 변경하는 변경태그, 테이블에 저장된 데이터를 삭제하는 삭제태그를 포함한다.In an embodiment, the user-defined tag includes a create tag for creating a table, an input tag for inputting data into the table, a change tag for changing data stored in the table, and a delete tag for deleting data stored in the table.

또한 실시예에 있어서, 상기 마이그레이터는 상기 추상블록체인부에 스마트 컨트랙트를 설치하고, 상기 클라이언트에 의해 구성된 테이블 구조에 대응하는 스마트 컨트랙트의 주소를 생성하여 상기 추상블록체인부에 전송한다.In an embodiment, the migrator installs a smart contract in the abstract block chain unit, generates a smart contract address corresponding to a table structure configured by the client, and transmits it to the abstract block chain unit.

또한 실시예에 있어서, 상기 테이블 구조는 테이블명, 컬럼명, 인덱스, 제약사항을 포함하며, 상기 스마트 컨트랙트는 대상블록체인에 저장된 데이터와 대응하는 테이블명 및 컬럼명을 이용하여 해쉬코드를 생성한다.In an embodiment, the table structure includes table names, column names, indexes, and constraints, and the smart contract generates a hash code using table names and column names corresponding to data stored in the target blockchain. .

또한 실시예에 있어서, 상기 테이블 구조는 복수 개의 컬럼명 중 1개의 프라이머리 컬럼명을 포함하며, 상기 스마트 컨트랙트는 상기 프라이머리 컬럼명 중 첫번째 인덱스에 대응하는 데이터를 루트노드로 하고, 프라이머리 컬럼에 속하는 데이터들의 대소를 비교하여 자식노드의 위치를 정한다.In another embodiment, the table structure includes one primary column name among a plurality of column names, and the smart contract uses data corresponding to a first index among the primary column names as a root node, and the primary column The position of the child node is determined by comparing the size of the data belonging to .

본 발명의 실시예에 따른 블록체인 시스템은, 클라이언트에 의해 입력된 사용자정의 태그를 이용하여 생성된 테이블 구조에 대응되는 스마트 컨트랙트를 구성하는 마이그레이터; 상기 마이그레이터에 의해 구성된 스마트 컨트랙트가 설치되는 추상블록체인부를 포함하고, 상기 클라이언트에 의해 입력받은 대상블록체인에 대응하는 인터페이스에 의해 상기 추상블록체인부와 대상블록체인 사이에 데이터가 전송되는 것을 특징으로 한다. A blockchain system according to an embodiment of the present invention includes a migrator configuring a smart contract corresponding to a table structure generated using a user-defined tag input by a client; An abstract blockchain unit in which a smart contract configured by the migrator is installed, and data is transmitted between the abstract blockchain unit and the target blockchain by an interface corresponding to the target blockchain input by the client. do.

본 발명은 블록체인 사용자가 높은 수준의 블록체인 지식을 습득할 필요가 없이 간단한 자바 클래스 사용만으로 복잡한 테이블을 손쉽게 활용, 배포할 수 있으므로, 기업에서는 주 목적인 비지니스 로직 및 기업 간의 신뢰비용을 줄이고 관리에 집중할 수 있게 함으로써 블록체인의 활용범위를 넓혀 갈 수 있다.In the present invention, blockchain users can easily utilize and distribute complex tables by using simple Java classes without having to acquire a high level of blockchain knowledge, so companies can reduce the cost of trust between business logic and companies, which is the main purpose, and manage them. By making it possible to focus, you can expand the scope of use of blockchain.

도 1은 본 발명의 실시예에 따른 블록체인 시스템을 설명하기 위한 도면이다.
도 2는 본 발명의 실시예에 따른 블록체인 데이터베이스 매핑방법을 설명하기 위한 플로우차트이다.
1 is a diagram for explaining a blockchain system according to an embodiment of the present invention.
2 is a flowchart for explaining a method for mapping a blockchain database according to an embodiment of the present invention.

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일 실시예를 상세히 설명하기로 한다.The above objects, features and advantages will become more apparent through the following detailed description in conjunction with the accompanying drawings, and accordingly, those skilled in the art to which the present invention belongs can easily implement the technical idea of the present invention. There will be. In addition, in describing the present invention, if it is determined that a detailed description of a known technology related to the present invention may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted. Hereinafter, a preferred embodiment according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 실시예에 따른 블록체인 시스템을 설명하기 위한 도면이다. 도 1을 참조하면, 본 발명의 실시예에 따른 블록체인 시스템은 클라이언트(100), 미들웨어시스템(200), 추상블록체인부(230), 블록체인(300)을 포함한다.1 is a diagram for explaining a blockchain system according to an embodiment of the present invention. Referring to FIG. 1 , a blockchain system according to an embodiment of the present invention includes a client 100, a middleware system 200, an abstract blockchain unit 230, and a blockchain 300.

클라이언트(100)는 사용자에 의해 설정되는 사용자정의 태그를 이용하여 테이블 구조를 생성하고, 대상블록체인이 어떠한 블록체인을 대상으로 하는지를 알 수 있도록 대상블록체인을 입력받는다. The client 100 creates a table structure using a user-defined tag set by a user, and receives a target block chain to know which block chain the target block chain is targeting.

사용자에 의해 설정되는 테이블 구조는 테이블 명칭을 의미하는 테이블명, 테이블 내 항목을 나타내는 컬럼명, 테이블 내 순서를 나타내는 인덱스, 테이블 항목의 입력문자형태 등 제약사항 등의 테이블 구성을 포함한다. 이때 블록체인 상에서 테이블명, 컬럼명을 기반으로 B TREE, HASH INDEX 등의 처리가 이루어진다. The table structure set by the user includes table configuration such as table name meaning table name, column name indicating table item, index indicating order in table, and constraints such as input text type of table item. At this time, processing such as B TREE and HASH INDEX is performed based on the table name and column name on the blockchain.

사용자정의 태그는 테이블을 생성하는 생성태그, 테이블에 데이터를 입력하는 입력태그, 테이블에 저장된 데이터를 변경하는 변경태그, 테이블에 저장된 데이터를 삭제하는 삭제태그 등의 다양한 태그들을 포함하며, 이들은 XML형태로 이루어질 수 있다. User-defined tags include various tags such as a create tag to create a table, an input tag to input data into a table, a change tag to change data stored in a table, and a delete tag to delete data stored in a table. These tags are in XML format. can be made with

미들웨어시스템(200)은 마이그레이터(210), 레저마스터(220)를 포함한다.The middleware system 200 includes a migrator 210 and a leisure master 220 .

마이그레이터(210)는 추상블록체인부(230)에 스마트 컨트랙트를 설치하고, 마이그레이터(210)는 클라이언트(100)에 의해 구성된 테이블 구조에 대응하는 스마트 컨트랙트의 주소를 생성하여, 추상블록체인부(230)에 전송한다. 또한 마이그레이터(210)에 의해 추상블록체인(230)에 전송되는 사항은 블록의 크기, 블록의 생성주기 등의 설정사항 등의 설정사항을 더 포함한다. The migrator 210 installs a smart contract in the abstract blockchain unit 230, and the migrator 210 generates the address of the smart contract corresponding to the table structure configured by the client 100, and the abstract blockchain unit 230 ) is sent to In addition, matters transmitted to the abstract block chain 230 by the migrator 210 further include settings such as block size and block generation cycle.

우선 마이그레이터(210)는 XML의 사용자정의 태그를 기반으로 테이블 구조를 생성하고, 테이블 구조를 스마트 컨트랙트에 매핑하여 테이블 구조에 대응하는 스마트 컨트랙트를 구성한다. 이때 XML의 사용자정의 태그를 기반으로 생성된 테이블 구조에는 적어도 하나의 스마트 컨트랙트의 주소가 매핑될 수 있다. 본 발명의 경우, 사용자에 의해 정의된 XML을 이용하여 테이블 구조를 생성할 수 있어 높은 수준의 블록체인 지식을 습득하지 않아도 쉽게 사용이 가능하다는 장점을 갖는다.First, the migrator 210 creates a table structure based on user-defined tags in XML, and configures a smart contract corresponding to the table structure by mapping the table structure to a smart contract. At this time, the address of at least one smart contract can be mapped to the table structure created based on the XML user-defined tag. In the case of the present invention, the table structure can be created using XML defined by the user, so it has the advantage that it can be easily used without acquiring a high level of blockchain knowledge.

마이그레이터(210)는 사용자에 의해 XML로 정의된 컬럼들과, 인덱스 및 제약사항를 기반으로 블록체인 상에 기반환경 스마트 컨트랙트를 인스톨하고, 사용자 정의 테이블 형식에 대한 스마트 컨트랙트를 구성하게 된다. 이에 따라 후술하는 추상화 블록체인(230)에서, 대상블록체인이 상이한 경우, 대상블록체인 각각에 따른 수정을 요하지 않아 사용자의 편의성을 증대시킬 수 있다. The migrator 210 installs the infrastructure smart contract on the blockchain based on the columns, indexes, and constraints defined by the user in XML, and configures the smart contract for the user-defined table format. Accordingly, in the abstract blockchain 230 to be described later, when the target blockchains are different, user convenience can be increased by not requiring modification according to each target block chain.

레저마스터부(220)는 스마트 컨트랙트에 저장된 테이블과 같은 컬럼을 갖는 객체를 만들 수 있게 해준다.The Ledger Master unit 220 makes it possible to create an object having columns such as a table stored in a smart contract.

레저마스터(220)는 오브젝트 맵퍼부(221), 쿼리DSL부(222)를 포함한다.The Ledger Master 220 includes an object mapper unit 221 and a query DSL unit 222.

오브젝트 맵퍼부(221)는 클라이언트(100)의 요청에 의해 레저마스터가 API를 이용하여 스마트 컨트랙트에 저장된 테이블과 같은 컬럼을 갖는 객체를 만들 수 있게 해준다. 복수의 정의된 클래스에 기반하여 실행 시점에 자동으로 해당 클래스의 속성과 동일한 컬럼을 갖는 테이블을 내부에 저장된 일련의 스마트 컨트랙트 집단에 의해 자동적으로 테이블로 만들어진다. The object mapper unit 221 enables the Ledger Master to create an object having the same columns as a table stored in a smart contract using an API at the request of the client 100 . Based on a plurality of defined classes, at the time of execution, a table with the same columns as the properties of the corresponding class is automatically created as a table by a series of smart contract groups stored inside.

그리고 오브젝트 맵퍼(221)는 테이블의 형태 및 내용, 그리고 검색 등의 다양한 기능을 수행할 수 있도록 Insert, query, count, findBy, addColumn, addIndex 등의 자바 메소드 형식의 데이터관리API를 구비한다. In addition, the object mapper 221 has a data management API in the form of Java methods such as insert, query, count, findBy, addColumn, and addIndex to perform various functions such as table form and content and search.

오브젝트 맵퍼(221)는 상기와 같은 데이터관리API를 이용하여 클라이언트의 요청에 의해 대상블록체인에 데이터가 저장되거나 검색될 수 있다. 사용자는 별도의 프로그램에 대한 지식없이도 미리 준비된 데이터관리API를 이용한 명령어를 통해서 쉽게 블록체인 장부상의 데이터를 관리할 수 있게 된다.The object mapper 221 can store or retrieve data from the target blockchain at the request of a client using the data management API as described above. Users can easily manage the data on the blockchain ledger through commands using the data management API prepared in advance without knowledge of a separate program.

쿼리DSL부(222)는 사용자 정의 함수형 질의를 통해 쿼리를 생성한다. 클라이언트(100)에 의해 쿼리DSL부(222)에서 제공되는 쿼리문자열이 전송되면, 쿼리DSL부(222)는 쿼리문자열을 파싱하여 스마트 컨트랙트의 인자로 넘겨주고, 스마트 컨트랙트는 인자에 대응하여 대상블록체인에 데이터를 저장하거나 해당 데이터를 검색할 수 있다. The query DSL unit 222 generates a query through a user-defined functional query. When the query string provided by the query DSL unit 222 is transmitted by the client 100, the query DSL unit 222 parses the query string and passes it to the smart contract as an argument, and the smart contract responds to the argument to the target block. You can store data on the chain or retrieve that data.

쿼리DSL부(120)는 오브젝트 맵퍼(110)에서 이용되는 정해진 API 이외의 것을 활용하기 위한 것으로서, 사용자 정의 함수형 질의를 통해 컴파일 시점에 해당 쿼리의 문제점을 파악할 수 있으며, 다양한 조합의 질의를 수행할 수 있게 된다.The query DSL unit 120 is for utilizing something other than the prescribed API used in the object mapper 110, and can identify problems in the query at the time of compilation through a user-defined functional query, and can perform various combinations of queries. be able to

오브젝트 맵퍼(110)만을 사용하면 정해진 API 이외의 것은 활용하기가 힘들어지며, API이외의 경우, 직접 조작해야 하는 문제가 있다. 이와 달리 쿼리를 직접 작성하게 되면 문자열을 사용하게 되며, 해당 문자열은 실행시점이 되어야 검증이 가능하다는 문제가 존재한다. 본 발명의 쿼리DSL부(120)을 통한 사용자 정의 함수형 질의를 통해 컴파일 시점에 해당 쿼리의 문제점을 파악할 수 있게 하며, 다양한 조합의 질의를 수행할 수 있게 된다.If only the object mapper 110 is used, it becomes difficult to utilize anything other than the designated API, and in the case of other than the API, there is a problem in that it must be directly manipulated. On the other hand, if a query is written directly, a string is used, and the problem exists that the string can be verified only at the time of execution. Through the user-defined functional query through the query DSL unit 120 of the present invention, it is possible to identify the problem of the corresponding query at the time of compilation, and to perform queries in various combinations.

추상블록체인부(230)는 대상블록체인은 아니지만, DB관련 기능을 수행하기 위한 것으로서, 테스트 서버기능 및 인터페이스기능을 포함한다. The abstract block chain unit 230 is not a target block chain, but is for performing DB-related functions, and includes a test server function and an interface function.

레저마스터(220)에서 API를 이용한 명령이 전달되면, API를 이용하여 전달된 명령, 예를 들어 테이블A의 항목B의 인덱스C를 검색하라고 명령을 수신한 추상블록체인부(230)는 레저마스터에서 제공되는 API를 이용하여 명령을 해석하고, 해석된 명령대로 블록체인(300)에 이를 전달하는 기능을 수행한다. 추상블록체인부(230)가 존재하지 않는 경우, 대상 블록체인(300)에 적용될 수 있는 전문 프로그램을 이용하여 명령을 하여야 하지만, 본 발명의 경우 추상블록체인부(230)가 DB관련 명령어를 해석하여 대상블록체인(300)에 전달하므로, 대상블록체인(300)을 조작하기 위한 특정 프로그램 언어를 사용할 필요가 없게 된다. When a command using the API is transmitted from the Ledger Master 220, the abstract block chain unit 230 that receives the command transmitted using the API, for example, a command to search the index C of item B of table A, It interprets the command using the API provided in and transmits it to the blockchain 300 according to the interpreted command. If the abstract block chain unit 230 does not exist, a command must be issued using a specialized program that can be applied to the target block chain 300, but in the case of the present invention, the abstract block chain unit 230 interprets DB-related commands. Since it is transmitted to the target block chain 300, there is no need to use a specific programming language for manipulating the target block chain 300.

상기 추상블록체인부는 블록체인의 종류와 관계없는 공통API를 제공하는 공통API부, 대상블록체인의 API를 제공하는 개별API부 및 API매칭부를 포함하며, 상기 API매칭부에서는 공통API에 적절하게 대응할 수 있는 대상블록체인의 API를 검출하여 대응하도록 한다. 이때, 검출되는 대상블록체인의 API는 복수개가 될 수 있다.The abstract blockchain unit includes a common API unit that provides a common API regardless of the type of blockchain, an individual API unit that provides an API of a target blockchain, and an API matching unit, and the API matching unit can respond appropriately to the common API. Detect and respond to the API of the target blockchain that can be used. At this time, the number of APIs of the target blockchain to be detected may be plural.

또한, 추상블록체인부(230)는 코딩 테스트 기능을 제공한다. 개발자는 코딩 전체를 테스트하는 전체테스트 시, 추상블록체인부(230) 및 블록체인(300) 모두에 대해 코딩 테스트를 수행할 수 있다. 한편, 코딩 한줄한줄마다 테스트를 수행하는 단위테스트의 경우, 개발자는 블록체인이 아니라 추상블록체인부(230)에 대해서만 코딩 테스트를 수행할 수 있다. 블록체인의 경우, 설정파일을 단위테스트 마다 매번 설치해야 하지만, 추상블록체인부(230)의 경우, 연속되는 단위테스트 시 마이그레이터(210)에 의한 설정파일의 설치가 생략될 수 있다. 이에 따라 추상블록체인부(230)에 의해 코딩의 단위테스트가 빠르게 수행될 수 있다. In addition, the abstract blockchain unit 230 provides a coding test function. A developer may perform a coding test on both the abstract block chain unit 230 and the block chain 300 during an overall test that tests the entire coding. Meanwhile, in the case of a unit test in which a test is performed for each line of coding, a developer may perform a coding test only for the abstract block chain unit 230, not for the block chain. In the case of blockchain, the setting file must be installed for each unit test, but in the case of the abstract block chain unit 230, installation of the setting file by the migrator 210 can be omitted during successive unit tests. Accordingly, unit tests of coding can be quickly performed by the abstract block chain unit 230 .

추상블록체인부(230)는 대상블록체인에 대응되는 데이터를 전송할 수 있는 인터페이스(231)를 포함한다. 입력받은 대상블록체인에 대응되는 인터페이스(231)가 추상블록체인부와 대상블록체인 사이에 데이터 전송을 수행한다. The abstract blockchain unit 230 includes an interface 231 capable of transmitting data corresponding to a target blockchain. The interface 231 corresponding to the received target block chain performs data transmission between the abstract block chain unit and the target block chain.

기업용 블록체인인 이더리움 기반의 쿼롬과 하이퍼레저 패브릭 각각의 사용방식이 상이함에 따라 각각의 사용방식에 다르지만, 본 발명은 추상블록체인부(230)를 통해 관리함으로써 마이그레이터(210)와 레저마스터(230)에서 요구하는 블록체인 API를 공통화하여 공통API로 제공할 수 있다. Although the use method of each of the enterprise blockchain, Ethereum-based Quorom and Hyperledger Fabric is different, each usage method is different, but the present invention manages through the abstract block chain unit 230 so that the migrator 210 and the ledger master ( 230) can be commonized and provided as a common API.

볼록체인(300)은 화폐이동이라는 비트코인보다는 엔터프라이즈 영역에서 사용할 수 있는 콘소시엄형 블록체인과 더 관련되어 있는 것으로서, 신뢰성있는 분산 데이터 공유를 위한 것으로서 즉, 분산데이터베이스 용도로 사용하기 위한 것이다.Convex chain 300 is more related to a consortium-type block chain that can be used in the enterprise area than Bitcoin, which is money transfer, and is for reliable distributed data sharing, that is, for use as a distributed database.

한편, 분산원장에 저장된 데이터를 효율적으로 관리하기 위해, 대용량의 파일을 효율적으로 검색하고 갱신하기 위해 B tree/Hash Index 등의 처리가 포함될 수 있다.On the other hand, in order to efficiently manage data stored in the distributed ledger, processing such as B tree/Hash Index may be included in order to efficiently search and update large-capacity files.

이와 관련하여 블록체인(300)에서 스마트 컨트랙트는 테이블 구조에서 프라이머리 컬럼명 중 첫번째 인덱스에 대응하는 데이터를 루트노드로 하고, 프라이머리 컬럼에 속하는 데이터(크기)들의 대소를 비교하여 자식노드의 위치를 결정할 수 있다. 상기와 같은 경우, 균등한 탐색 속도를 보장하고, 저장장치의 효율성을 높일 수 있다. In this regard, in the blockchain 300, the smart contract sets the data corresponding to the first index of the primary column names in the table structure as the root node, and compares the size of data (size) belonging to the primary column to determine the location of the child node. can decide In the above case, an equal search speed can be guaranteed and the efficiency of the storage device can be increased.

도 2는 본 발명의 실시예에 따른 블록체인 기반 데이터베이스 운영방법을 설명하기 위한 플로우차트이다.2 is a flowchart for explaining a method of operating a blockchain-based database according to an embodiment of the present invention.

도 2를 참조하면, 블록체인 데이터베이스 매핑방법은, 클라이언트에 의해 사용자정의 태그를 이용하여 테이블 구조가 생성되는 단계(S110); 클라이언트에 의해 설정되어 사용될 대상블록체인을 입력받는 단계(S120); 마이그레이터에 의해 상기 테이블 구조에 대응하는 스마트 컨트랙트가 구성되는 단계(S130); 추상블록체인부에 상기 마이그레이터에 의해 구성된 스마트 컨트랙트가 설치되는 단계(S140); 상기 입력받은 대상블록체인에 대응하는 인터페이스에 의해 상기 추상블록체인부와 대상블록체인 사이에 데이터가 전송되는 단계(S150)을 포함한다.Referring to FIG. 2, the blockchain database mapping method includes the steps of creating a table structure by using a user-defined tag by a client (S110); Step of receiving an input of the target blockchain set and used by the client (S120); A step of constructing a smart contract corresponding to the table structure by the migrator (S130); Installing the smart contract configured by the migrator in the abstract blockchain unit (S140); and transmitting data between the abstract block chain unit and the target block chain through an interface corresponding to the received target block chain (S150).

클라이언트가 사용자정의 태그를 입력하여 테이블 구조를 생성하는 단계(S110)에서, 사용자에 의해 설정되는 테이블 구조는 테이블 명칭을 의미하는 테이블명, 테이블 내 항목을 나타내는 컬럼명, 테이블 내 순서를 나타내는 인덱스, 테이블 항목의 입력문자형태 등 제약사항 등의 테이블 구성을 포함한다.In the step of generating a table structure by inputting a user-defined tag by the client (S110), the table structure set by the user includes a table name indicating a table name, a column name indicating an item in the table, an index indicating an order in the table, Includes table configuration such as constraints such as input text type of table item.

한편, 이러한 사용자정의 태그는 테이블을 생성하는 생성태그, 테이블에 데이터를 입력하는 입력태그, 테이블에 저장된 데이터를 변경하는 변경태그, 테이블에 저장된 데이터를 삭제하는 삭제태그 등의 다양한 태그들을 포함하며, 이들은 XML형태로 이루어질 수 있다. On the other hand, these user-defined tags include various tags such as a create tag for creating a table, an input tag for inputting data into a table, a change tag for changing data stored in a table, and a delete tag for deleting data stored in a table. These may be made in XML format.

사용자에 의해 정의된 사용자정의 태그로서 XML을 이용하여 테이블 구조를 생성할 수 있어 높은 수준의 블록체인 지식을 습득하지 않아도 쉽게 사용이 가능하다는 장점을 갖는다.As a user-defined tag defined by the user, a table structure can be created using XML, so it has the advantage of being easy to use without acquiring a high level of blockchain knowledge.

클라이언트에 의해 설정되어 사용될 대상블록체인을 입력받는 단계(S120)에서는 다양한 블록체인 중 대상으로 설정한 블록체인을 사용자에 의해 입력받는다.In step S120 of inputting the target block chain to be set and used by the client, the block chain set as the target among various block chains is input by the user.

마이그레이터에 의해 상기 테이블 구조에 대응하는 스마트 컨트랙트가 구성되는 단계(S130)에서는, XML의 사용자정의 태그를 기반으로 테이블 구조를 생성하고, 테이블 구조를 스마트 컨트랙트에 매핑하여 테이블 구조에 대응하는 스마트 컨트랙트를 구성한다In the step of configuring the smart contract corresponding to the table structure by the migrator (S130), the table structure is created based on the user-defined tags of XML, and the smart contract corresponding to the table structure is mapped to the smart contract. make up

추상블록체인부에 상기 마이그레이터에 의해 구성된 스마트 컨트랙트가 설치되는 단계(S140) 및 상기 입력받은 대상블록체인에 대응하는 인터페이스에 의해 상기 추상블록체인부와 대상블록체인 사이에 데이터가 전송되는 단계(S150)에서, 스마트 컨트랙트가 대상블록체인에 직접 설치되지 않고, 추상블록체인부에 설치된다. 이와 관려하여, 추상블록체인부(230)는 대상블록체인에 대응되는 데이터를 전송할 수 있는 인터페이스(231)를 포함한다. 입력받은 대상블록체인에 대응되는 인터페이스(231)가 추상블록체인부와 대상블록체인 사이에 데이터 전송을 수행한다. 기업용 블록체인인 이더리움 기반의 쿼롬과 하이퍼레저 패브릭 각각의 사용방식이 상이함에 따라 각각의 사용방식에 다르지만, 본 발명은 추상블록체인부(230)를 통해 관리함으로써 마이그레이터(210)와 레저마스터(230)에서 요구하는 블록체인 API를 공통화하여 제공할 수 있게 된다. The smart contract configured by the migrator is installed in the abstract block chain unit (S140), and data is transmitted between the abstract block chain unit and the target block chain by an interface corresponding to the received target block chain (S150). ), the smart contract is not installed directly on the target blockchain, but on the abstract blockchain. In this regard, the abstract block chain unit 230 includes an interface 231 capable of transmitting data corresponding to the target block chain. The interface 231 corresponding to the received target block chain performs data transmission between the abstract block chain unit and the target block chain. Although the use method of each of the enterprise blockchain, Ethereum-based Quorom and Hyperledger Fabric is different, each usage method is different, but the present invention manages through the abstract block chain unit 230 so that the migrator 210 and the ledger master ( 230), it is possible to commonize and provide the blockchain API required.

100: 클라이언트
200: 미들웨어시스템
210: 마이그레이터
220: 레저마스터
230: 추상화블록체인
300: 블록체인
100: client
200: middleware system
210: migrator
220: leisure master
230: abstraction blockchain
300: Blockchain

Claims (5)

클라이언트에 의해 사용자정의 태그를 이용하여 테이블 구조가 생성되는 단계;
클라이언트에 의해 설정되어 사용될 대상블록체인을 입력받는 단계;
마이그레이터에 의해 상기 테이블 구조에 대응하는 스마트 컨트랙트가 구성되는 단계;
공통API를 제공하는 추상블록체인부에 상기 마이그레이터에 의해 구성된 스마트 컨트랙트가 설치되는 단계;
상기 입력받은 대상블록체인에 대응하는 인터페이스에 의해 상기 추상블록체인부와 대상블록체인 사이에 데이터가 전송되는 단계를 수행하는 블록체인 데이터베이스 매핑 방법.
creating a table structure using user-defined tags by a client;
Step of receiving an input of a target blockchain to be set and used by the client;
Forming a smart contract corresponding to the table structure by the migrator;
Installing a smart contract configured by the migrator in an abstract blockchain unit that provides a common API;
A block chain database mapping method for performing a step of transmitting data between the abstract block chain unit and the target block chain by an interface corresponding to the input target block chain.
제1항에 있어서,
상기 사용자정의 태그는 테이블을 생성하는 생성태그, 테이블에 데이터를 입력하는 입력태그, 테이블에 저장된 데이터를 변경하는 변경태그, 테이블에 저장된 데이터를 삭제하는 삭제태그를 포함하는 것을 특징으로 하는 블록체인 데이터베이스 매핑 방법.
According to claim 1,
The user-defined tag includes a create tag for creating a table, an input tag for inputting data into the table, a change tag for changing data stored in the table, and a delete tag for deleting data stored in the table. mapping method.
제1항에 있어서,
상기 마이그레이터는 상기 추상블록체인부에 스마트 컨트랙트를 설치하고, 상기 클라이언트에 의해 구성된 테이블 구조에 대응하는 스마트 컨트랙트의 주소를 생성하는 하여 상기 추상블록체인부에 전송하는 것을 특징으로 하는 블록체인 데이터베이스 매핑 방법.
According to claim 1,
The migrator installs a smart contract in the abstract blockchain unit, generates a smart contract address corresponding to a table structure configured by the client, and transmits it to the abstract blockchain unit. .
제1항에 있어서,
상기 테이블 구조는 테이블명, 컬럼명, 인덱스, 제약사항을 포함하며,
상기 스마트 컨트랙트는 대상블록체인에 저장된 데이터와 대응하는 테이블명 및 컬럼명을 이용하여 해쉬코드를 생성하는 것을 특징으로 하는 블록체인 데이터베이스 매핑 방법.
According to claim 1,
The table structure includes table names, column names, indexes, and constraints,
The smart contract generates a hash code using table names and column names corresponding to data stored in the target blockchain.
제4항에 있어서,
상기 테이블 구조는 복수 개의 컬럼명 중 1개의 프라이머리 컬럼명을 포함하며,
상기 스마트 컨트랙트는 상기 프라이머리 컬럼명 중 첫번째 인덱스에 대응하는 데이터를 루트노드로 하고, 프라이머리 컬럼에 속하는 데이터들의 대소를 비교하여 자식노드의 위치를 정하는 것을 특징으로 하는 블록체인 데이터베이스 매핑 방법.
According to claim 4,
The table structure includes one primary column name among a plurality of column names,
Wherein the smart contract sets the data corresponding to the first index of the primary column names as a root node, and compares the size of data belonging to the primary column to determine the position of the child node.
KR1020220014783A 2021-05-06 2022-02-04 Blockchain database mapping method and blockchain system to drive them KR20220151534A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210058731 2021-05-06
KR1020210058731 2021-05-06

Publications (1)

Publication Number Publication Date
KR20220151534A true KR20220151534A (en) 2022-11-15

Family

ID=84042038

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220014783A KR20220151534A (en) 2021-05-06 2022-02-04 Blockchain database mapping method and blockchain system to drive them

Country Status (1)

Country Link
KR (1) KR20220151534A (en)

Similar Documents

Publication Publication Date Title
CN108052321B (en) Method for automatically generating intelligent contract of block chain based on configuration information
CN105122243B (en) Expansible analysis platform for semi-structured data
US6411974B1 (en) Method to collate and extract desired contents from heterogeneous text-data streams
CN105786808B (en) A kind of method and apparatus for distributed execution relationship type computations
CN107368503B (en) Data synchronization method and system based on button
US20140114952A1 (en) Optimizing queries of parallel databases
US7480676B2 (en) Chasing engine for data transfer
US9703768B1 (en) Object metadata query
US8230121B2 (en) Method and apparatus for identifying a device handle in a computer system
US20090144319A1 (en) External system integration into automated attribute discovery
US8799267B2 (en) Optimizing storage allocation
US7702641B2 (en) Method and system for comparing and updating file trees
CN110096891A (en) Object signature in library of object
US20140289280A1 (en) System and Method for Bi-directional Conversion of Directed Acyclic Graphs and Inter-File Branching
US7222125B2 (en) Data structure managing device, data structure managing system, data structure managing method, and recorded medium where data structure managing program is stored
US10922216B1 (en) Intelligent automation test workflow
US20170193036A1 (en) Framework for joining datasets
CN104142930A (en) Universal Delta data loading technology
CN111694547A (en) Automatic coding data processing application design tool based on data state change
JP2004110219A (en) Data processing system and join processing method
KR101877828B1 (en) User interface integrated platform system based on artificial intelligence
CN104391796A (en) Method for parsing test cases
US20230120592A1 (en) Query Generation and Processing System
Alonso et al. Towards a polyglot data access layer for a low-code application development platform
KR102461213B1 (en) Blockchain database-based operating method and blockchain system to drive them