KR20200048440A - System for providing retrieval service based on blockchain and method of the same - Google Patents

System for providing retrieval service based on blockchain and method of the same Download PDF

Info

Publication number
KR20200048440A
KR20200048440A KR1020180130535A KR20180130535A KR20200048440A KR 20200048440 A KR20200048440 A KR 20200048440A KR 1020180130535 A KR1020180130535 A KR 1020180130535A KR 20180130535 A KR20180130535 A KR 20180130535A KR 20200048440 A KR20200048440 A KR 20200048440A
Authority
KR
South Korea
Prior art keywords
blockchain
data
block
batch
transaction
Prior art date
Application number
KR1020180130535A
Other languages
Korean (ko)
Other versions
KR102448787B1 (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 KR1020180130535A priority Critical patent/KR102448787B1/en
Publication of KR20200048440A publication Critical patent/KR20200048440A/en
Application granted granted Critical
Publication of KR102448787B1 publication Critical patent/KR102448787B1/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
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1628List acknowledgements, i.e. the acknowledgement message consisting of a list of identifiers, e.g. of sequence numbers
    • 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]

Abstract

Provided is a system providing an inquiry service based on blockchain. The system comprises: a block listener module which receives a first block of the blockchain from one or more blockchain nodes constituting a blockchain network and transmits data records of the first block to a database module; and a database module which stores the one or more data records in a database, queries the database in response to an inquiry request from a client terminal, and provides the inquiry result to the client terminal. The data record includes a data field and a hash field, wherein a hash value associated with the data field value may be recorded in the hash field.

Description

블록체인 기반 조회 서비스 제공 시스템 및 그 방법 {SYSTEM FOR PROVIDING RETRIEVAL SERVICE BASED ON BLOCKCHAIN AND METHOD OF THE SAME}Blockchain based inquiry service providing system and method {SYSTEM FOR PROVIDING RETRIEVAL SERVICE BASED ON BLOCKCHAIN AND METHOD OF THE SAME}

본 발명은 블록체인 기반 조회 서비스 제공 시스템 및 그 시스템의 동작 방법에 관한 것이다. 보다 자세하게는, 블록체인에 기록된 다양한 데이터에 대해 고속의 조회 서비스를 제공할 수 있는 블록체인 기반의 조회 서비스 제공 시스템 및 그 시스템에서 수행되는 방법에 관한 것이다.The present invention relates to a blockchain-based query service providing system and a method of operating the system. More specifically, the present invention relates to a system for providing a search service based on a blockchain and a method performed in the system that can provide a high-speed search service for various data recorded on the blockchain.

블록체인(blockchain)은 지속적으로 증가하는 데이터를 특정 단위의 블록에 기록하고, P2P(peer-to-peer) 네트워크를 구성하는 각각의 노드들이 상기 블록을 체인 형태의 자료 구조로 관리하는 데이터 관리 기술 또는 상기 체인 형태의 자료 구조로 구성된 데이터 그 자체를 의미한다. 이때, 체인 형태의 자료 구조로 구성된 블록체인은, 중앙 시스템 없이 각각의 노드에서 분산 원장(distributed ledger) 형태로 운영된다.Blockchain (blockchain) is a data management technology that records continuously increasing data in blocks of a specific unit, and each node constituting a peer-to-peer (P2P) network manages the block as a data structure in the form of a chain. Or it means the data itself composed of the chain-type data structure. At this time, a blockchain composed of a chain-type data structure is operated in a distributed ledger form at each node without a central system.

블록체인 네트워크를 구성하는 각각의 블록체인 노드는 도 1에 도시된 바와 같은 체인 형태의 자료 구조로 블록들을 관리한다. 여기서, 각 블록에는 이전 블록에 대한 해시 값이 기록되며, 상기 해시 값을 통해 이전 블록이 참조될 수 있다. 따라서, 블록이 쌓일수록 블록 내에 기록된 데이터의 위변조는 어려워지고, 분산된 환경에서도 데이터의 무결성(integrity)이 보장될 수 있다.Each blockchain node constituting the blockchain network manages blocks with a chain-like data structure as shown in FIG. 1. Here, a hash value for the previous block is recorded in each block, and the previous block can be referred to through the hash value. Therefore, as the blocks are stacked, forgery and alteration of data recorded in the blocks becomes difficult, and integrity of data can be ensured even in a distributed environment.

최근에는, IoT(Internet of Things) 분야에 블록체인 기술을 접목하여, 데이터의 무결성을 보장하려는 시도가 늘어나고 있다. 그러나, 블록체인 기술의 몇 가지 한계점으로 인해, IoT 분야에 블록체인 기술을 적용하는데 어려움을 겪고 있는 실정이다.Recently, attempts are being made to ensure the integrity of data by integrating blockchain technology into the Internet of Things (IoT) field. However, due to some limitations of blockchain technology, it is difficult to apply blockchain technology to the IoT field.

첫 번째 한계점은 블록체인의 조회 성능에 관한 것이다. 블록체인의 조회 성능은 일반적인 데이터베이스와 비교할 때 매우 낮은 수준이다. 더욱이, 다수의 블록에 분산되어 있는 IoT 데이터를 조회하는 경우, 다수의 블록에 액세스하는 시간으로 인해 조회 성능은 더욱 감소될 수 있다.The first limitation is the inquiry performance of the blockchain. Blockchain's search performance is very low compared to a typical database. Moreover, when querying IoT data distributed in multiple blocks, the query performance may be further reduced due to the time to access the multiple blocks.

두 번째 한계점은 블록체인의 조회 인터페이스에 관한 것이다. 블록체인 은 데이터베이스처럼 편리하고 강력한 조회 인터페이스(e.g. SQL)를 제공하고 있지 않다. 물론, 편리한 조회 기능을 제공하는 일부 블록체인 플랫폼도 존재하나, 이 또한 기존의 데이터베이스와 비교하면 많은 차이가 있다. The second limitation relates to the inquiry interface of the blockchain. Blockchain does not provide a convenient and powerful query interface (e.g. SQL) like a database. Of course, there are some blockchain platforms that provide convenient inquiry functions, but there are also many differences compared to existing databases.

한국공개특허 제10-2018-0022507호 (18.03.06 공개)Korean Patent Publication No. 10-2018-0022507 (published on June 3, 18)

본 발명이 해결하고자 하는 기술적 과제는, 블록체인에 기록된 방대한 데이터에 대해 고성능의 조회 서비스를 제공할 수 있는 시스템 및 그 시스템에서 수행되는 방법을 제공하는 것이다.The technical problem to be solved by the present invention is to provide a system capable of providing a high-performance inquiry service for massive data recorded on a blockchain and a method performed in the system.

본 발명이 해결하고자 하는 다른 기술적 과제는, 고성능의 조회 서비스를 제공함과 동시에 데이터 무결성을 보장할 수 있는 시스템 및 그 시스템에서 수행되는 방법을 제공하는 것이다.Another technical problem to be solved by the present invention is to provide a system capable of guaranteeing data integrity while providing a high-performance inquiry service and a method performed in the system.

본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명의 기술분야에서의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the following description.

상기 기술적 과제를 해결하기 위한, 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템은, 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하고, 상기 제1 블록의 데이터 레코드를 데이터베이스 모듈로 전송하는 블록 리스너 모듈 및 상기 하나 이상의 데이터 레코드를 데이터베이스에 저장하고, 클라이언트 단말의 조회 요청에 응답하여 상기 데이터베이스를 조회하며, 상기 조회 결과를 상기 클라이언트 단말에게 제공하는 데이터베이스 모듈을 포함할 수 있다. 이때, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.To solve the above technical problem, a blockchain-based query service providing system according to an embodiment of the present invention receives a first block of the blockchain from one or more blockchain nodes constituting a blockchain network, and the A block listener module that transmits one block of data records to a database module and the one or more data records are stored in a database, and the database is queried in response to an inquiry request from a client terminal, and the inquiry result is provided to the client terminal It may include a database module. At this time, the data record includes a data field and a hash field, and a hash value associated with the data field value may be recorded in the hash field.

일 실시예에서, 상기 블록 리스너 모듈은, 블록체인 노드로부터 수신된 블록의 전송 상태 정보를 관리하되, 상기 전송 상태 정보는 상기 수신된 블록의 블록 번호와 상기 수신된 블록이 전송 완료되었는지 여부를 가리키는 플래그 정보를 포함할 수 있다.In one embodiment, the block listener module manages the transmission status information of a block received from a blockchain node, wherein the transmission status information indicates a block number of the received block and whether the received block has been successfully transmitted. Flag information may be included.

일 실시예에서, 상기 블록 리스너 모듈은, 상기 제1 블록의 수신에 응답하여, 상기 전송 상태 정보에 상기 제1 블록의 번호와 매칭되는 제1 플래그 정보를 획득하고, 상기 제1 플래그 정보에 기초하여 상기 하나 이상의 데이터 레코드를 상기 데이터베이스 모듈로 전송할 수 있다.In one embodiment, the block listener module, in response to the reception of the first block, obtains first flag information matching the number of the first block in the transmission status information, and based on the first flag information The one or more data records can be transmitted to the database module.

일 실시예에서, 상기 블록 리스너 모듈은, 상기 데이터베이스 모듈로부터 ACK 메시지를 수신함에 응답하여, 상기 제1 블록의 플래그 정보를 갱신하고, 상기 데이터베이스 모듈로부터 상기 ACK 메시지가 수신되지 않는 경우, 상기 제1 블록을 재전송할 수 있다.In one embodiment, the block listener module updates the flag information of the first block in response to receiving the ACK message from the database module, and when the ACK message is not received from the database module, the first Blocks can be retransmitted.

일 실시예에서, 상기 블록 리스너 모듈은, 상기 전송 상태 정보를 참조하여, 상기 제1 블록의 번호보다 낮은 번호를 갖는 블록 중 아직 전송이 완료되지 않은 미전송 블록을 식별하고, 상기 식별된 미전송 블록의 데이터 레코드를 상기 데이터베이스 모듈로 전송할 수 있다.In one embodiment, the block listener module, with reference to the transmission status information, identifies an untransmitted block that has not yet been transmitted among blocks having a number lower than the number of the first block, and the identified untransmitted Data records of blocks can be transmitted to the database module.

일 실시예에서, 상기 블록체인 네트워크는 복수의 채널로 구성되고, 상기 블록 리스너 모듈은, 각 블록체인 노드가 소속된 채널의 정보를 수집하고, 상기 수집된 채널 정보를 기초로 채널 별로 블록 송신을 담당하는 노드를 지정할 수 있다.In one embodiment, the blockchain network is composed of a plurality of channels, and the block listener module collects information of channels to which each blockchain node belongs, and transmits blocks for each channel based on the collected channel information. You can specify the responsible node.

일 실시예에서, 상기 블록 리스너 모듈은, 담당 채널이 서로 중복되지 않도록 채널 별로 블록 송신을 담당하는 노드를 지정할 수 있다.In one embodiment, the block listener module may designate a node responsible for block transmission for each channel so that channels in charge do not overlap with each other.

일 실시예에서, 상기 블록 리스너 모듈은, 상기 각 채널 별 블록체인 노드의 개수를 비교하고, 블록체인 노드의 개수가 상대적으로 적은 채널부터 담당 노드를 지정할 수 있다.In one embodiment, the block listener module may compare the number of blockchain nodes for each channel and designate a responsible node from a channel having a relatively small number of blockchain nodes.

일 실시예에서, 상기 하나 이상의 블록체인 노드는, 데이터 소스로부터 시간적인 선후 관계를 갖는 제1 데이터와 제2 데이터를 수신함에 응답하여, 상기 제1 데이터와 상기 제1 데이터의 제1 해시 값을 포함하는 제1 데이터 레코드를 상기 블록체인에 기록하고, 상기 제1 해시 값과 상기 제2 데이터를 기초로 상기 제2 데이터의 제2 해시 값을 생성하며, 상기 제2 데이터와 상기 제2 해시 값을 포함하는 제2 데이터 레코드를 상기 블록체인에 기록할 수 있다.In one embodiment, the one or more blockchain nodes, in response to receiving the first data and the second data having a temporal sequential relationship from the data source, the first hash value of the first data and the first data Record the first data record including the second hash value of the second data based on the first hash value and the second data, and record the second hash value with the second data It is possible to record a second data record comprising a to the blockchain.

상술한 기술적 과제를 해결하기 위한 본 발명의 다른 실시예에 따른 블록체인 기반 조회 서비스 제공 방법은, 조회 서비스 제공 시스템에서 블록체인 기반으로 조회 서비스를 제공하는 방법에 있어서, 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하는 단계, 상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하는 단계 및 클라이언트 단말의 조회 요청에 응답하여, 상기 데이터베이스를 조회하고, 상기 조회 결과를 상기 클라이언트 단말로 제공하는 단계를 포함할 수 있다. 이때, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.A method for providing a query service based on a blockchain according to another embodiment of the present invention for solving the above technical problem is a method of providing a query service based on a block chain in a query service providing system, which constitutes a blockchain network Receiving the first block of the blockchain from the above blockchain node, storing the data record of the first block in a database, and in response to an inquiry request from the client terminal, queries the database and retrieves the inquiry result It may include the step of providing to the client terminal. At this time, the data record includes a data field and a hash field, and a hash value associated with the data field value may be recorded in the hash field.

상술한 기술적 과제를 해결하기 위한 본 발명의 또 다른 실시예에 따른 컴퓨터 프로그램은, 컴퓨팅 장치와 결합되어, 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하는 단계, 상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하는 단계 및 클라이언트 단말의 조회 요청에 응답하여, 상기 데이터베이스를 조회하고, 상기 조회 결과를 상기 클라이언트 단말로 제공하는 단계를 실행시키기 위하여 컴퓨터로 판독가능한 기록매체에 저장될 수 있다. 이때, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.A computer program according to another embodiment of the present invention for solving the above-described technical problem is coupled to a computing device, receiving a first block of the blockchain from one or more blockchain nodes constituting a blockchain network , A computer readable record for executing the step of storing the data record of the first block in a database and in response to a query request from the client terminal, querying the database and providing the query result to the client terminal It can be stored on media. At this time, the data record includes a data field and a hash field, and a hash value associated with the data field value may be recorded in the hash field.

도 1은 본 발명의 몇몇 실시예에서 참조될 수 있는 블록체인의 자료 구조를 설명하기 위한 도면이다.
도 2 내지 도 4는 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템이 적용될 수 있는 예시적인 환경을 설명하기 위한 구성도이다.
도 5는 본 발명의 일 실시예에 따라 블록체인 기반 조회 제공 시스템에서 블록체인 데이터가 데이터베이스에 저장되는 과정을 설명하기 위한 흐름도이다.
도 6은 본 발명의 일 실시예에 따라 데이터 소스 별로 식별 값이 할당되는 것을 설명하기 위한 예시도이다.
도 7은 본 발명의 일 실시예에 따라 블록체인 노드에서 각 데이터에 대한 해시 값을 산출하는 방법을 설명하기 위한 예시도이다.
도 8은 본 발명의 일 실시예에 따라 블록체인 기반 조회 제공 시스템에서 조회 요청이 처리되는 과정을 설명하기 위한 흐름도이다.
도 9 및 도 10은 본 발명의 일 실시예에 따라 데이터베이스에 저장된 데이터의 무결성을 확인하는 방법을 설명하기 위한 도면이다.
도 11은 본 발명의 일 실시예에 따른 블록 리스너 모듈의 상세 기능을 설명하기 위한 블록도이다.
도 12는 본 발명의 몇몇 실시예에서 참조될 수 있는 전송 상태 정보의 예시도이다.
도 13은 본 발명의 일 실시예에 따라 블록체인 네트워크와 블록 리스너 모듈 간의 중복 트래픽을 제거하는 방법을 설명하기 위한 도면이다.
도 14 및 도 15는 본 발명의 일 실시예에 따라 블록 리스너 모듈과 데이터베이스 모듈 간의 중복 트래픽을 제거하는 방법을 설명하기 위한 도면이다.
도 16 및 도 17은 본 발명의 일 실시예에 따른 배치 프로세싱 모듈을 설명하기 위한 도면이다.
도 18 및 도 19는 본 발명의 일 실시예에 따라 배치 프로세싱 모듈을 통해 배치 트랜잭션이 처리되는 과정을 설명하기 위한 예시도이다.
도 20은 본 발명의 몇몇 실시예들에 따른 모듈 및 장치를 구현할 수 있는 예시적인 컴퓨팅 장치를 나타내는 하드웨어 구성도이다.
1 is a diagram for explaining a data structure of a blockchain that can be referred to in some embodiments of the present invention.
2 to 4 are block diagrams for explaining an exemplary environment in which a blockchain-based query service providing system according to an embodiment of the present invention can be applied.
5 is a flowchart illustrating a process of storing blockchain data in a database in a blockchain-based query providing system according to an embodiment of the present invention.
6 is an exemplary diagram for explaining that an identification value is allocated for each data source according to an embodiment of the present invention.
7 is an exemplary diagram for explaining a method of calculating a hash value for each data in a blockchain node according to an embodiment of the present invention.
8 is a flowchart illustrating a process in which a query request is processed in a blockchain-based query providing system according to an embodiment of the present invention.
9 and 10 are diagrams for explaining a method of verifying the integrity of data stored in a database according to an embodiment of the present invention.
11 is a block diagram illustrating detailed functions of a block listener module according to an embodiment of the present invention.
12 is an exemplary diagram of transmission status information that may be referred to in some embodiments of the present invention.
13 is a diagram for explaining a method of removing redundant traffic between a blockchain network and a block listener module according to an embodiment of the present invention.
14 and 15 are diagrams for explaining a method of removing redundant traffic between a block listener module and a database module according to an embodiment of the present invention.
16 and 17 are diagrams for explaining a batch processing module according to an embodiment of the present invention.
18 and 19 are exemplary views for explaining a process in which a batch transaction is processed through a batch processing module according to an embodiment of the present invention.
20 is a hardware configuration diagram illustrating an exemplary computing device capable of implementing modules and devices in accordance with some embodiments of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다. 본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Advantages and features of the present invention, and methods for achieving them will be clarified with reference to embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms, and only the embodiments allow the disclosure of the present invention to be complete, and common knowledge in the art to which the present invention pertains It is provided to completely inform the person having the scope of the invention, and the present invention is only defined by the scope of the claims.

각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.It should be noted that in adding reference numerals to the components of each drawing, the same components have the same reference numerals as possible even though they are displayed on different drawings. In addition, in describing the present invention, when it is determined that detailed descriptions of related well-known structures or functions may obscure the subject matter of the present invention, detailed descriptions thereof will be omitted.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다.Unless otherwise defined, all terms (including technical and scientific terms) used in this specification may be used in a sense that can be commonly understood by those skilled in the art to which the present invention pertains. In addition, terms defined in the commonly used dictionary are not ideally or excessively interpreted unless specifically defined. The terminology used herein is for describing the embodiments and is not intended to limit the present invention. In the present specification, the singular form also includes the plural form unless otherwise specified in the phrase.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제1, 제2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the components of the present invention, terms such as first, second, A, B, (a), and (b) may be used. These terms are only for distinguishing the component from other components, and the nature, order, or order of the component is not limited by the term. When a component is described as being "connected", "coupled" or "connected" to another component, the component may be directly connected to or connected to the other component, but another component between each component It will be understood that elements may be "connected", "coupled" or "connected".

명세서에서 사용되는 "포함한다 (comprises)" 및/또는 "포함하는 (comprising)"은 언급된 구성 요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성 요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.As used herein, "comprises" and / or "comprising" refers to the components, steps, operations and / or elements mentioned above, the presence of one or more other components, steps, operations and / or elements Or do not exclude additions.

본 명세서에 대한 설명에 앞서, 본 명세서에서 사용되는 몇몇 용어들에 대하여 명확하게 하기로 한다.Prior to the description of the present specification, some terms used in the specification will be clarified.

본 명세서에서, 블록체인 또는 블록체인 데이터란 블록체인 네트워크를 구성하는 각각의 블록체인 노드가 유지하는 데이터로, 적어도 하나의 블록이 체인 형태의 자료 구조로 구성되는 데이터를 가리킨다. 블록체인 시스템에서, 모든 블록체인 노드는 동일한 블록체인 데이터를 유지한다. 단, 멀티 채널(multi-channel) 기능을 지원하는 블록체인 시스템(e.g. 하이퍼레저 패브릭)에서는, 동일한 채널에 속한 블록체인 노드들끼리만 동일한 블록체인 데이터를 유지하게 된다.In this specification, blockchain or blockchain data is data maintained by each blockchain node constituting a blockchain network, and refers to data composed of at least one block in a chain-type data structure. In a blockchain system, all blockchain nodes maintain the same blockchain data. However, in a blockchain system (e.g. Hyper Leisure Fabric) that supports multi-channel functions, only the blockchain nodes belonging to the same channel maintain the same blockchain data.

본 명세서에서, 블록체인 네트워크란, 블록체인 알고리즘(또는 프로토콜)에 따라 동작하는 복수의 블록체인 노드로 구성된 P2P(peer-to-peer) 구조의 네트워크를 의미한다.In this specification, a blockchain network means a network of a peer-to-peer (P2P) structure composed of a plurality of blockchain nodes operating according to a blockchain algorithm (or protocol).

본 명세서에서, 블록체인 노드란, 블록체인 네트워크를 구성하고 블록체인 알고리즘(또는 프로토콜)에 따라 동작하는 컴퓨팅 노드를 의미한다. 상기 컴퓨팅 노드는 물리적 장치로 구현될 수 있으나, 가상 머신(virtual machine)과 같이 논리적 장치로 구현될 수도 있다. 상기 컴퓨팅 노드가 가상 머신으로 구현되는 경우, 하나의 물리적 장치에 복수의 블록체인 노드가 포함될 수도 있다.In this specification, a blockchain node means a computing node that configures a blockchain network and operates according to a blockchain algorithm (or protocol). The computing node may be implemented as a physical device, but may also be implemented as a logical device such as a virtual machine. When the computing node is implemented as a virtual machine, a plurality of blockchain nodes may be included in one physical device.

본 명세서에서, 트랜잭션(transaction) 또는 블록체인 트랜잭션(blockchain transaction)이란, 블록체인 환경에서 상태 변화(e.g. 잔고의 증감, 자산의 이전)를 일으키는 모든 행위, 블록체인에 기록된 상태(state) 데이터를 조회하는 모든 행위, 또는 그 행위들을 가리키는 데이터를 의미할 수 있다. 예를 들어, 상기 트랜잭션은 블록체인에 특정 데이터를 쓰는 행위, 블록체인에 기록된 특정 데이터를 읽는 행위 등을 모두 포괄할 수 있다. 상기 트랜잭션은 쓰기 타입의 트랜잭션(e.g. 상태 데이터를 추가, 수정, 삭제하는 등의 트랜잭션)과 읽기 타입의 트랜잭션(e.g. 상태 데이터를 조회하는 트랜잭션)으로 구분될 수 있다. 물론, 블록체인 플랫폼에 따라 읽기 및 쓰기 타입 외에도 다양한 타입(e.g. 실행)의 트랜잭션이 존재할 수 있고, 그와 같은 경우 상기 트랜잭션은 다양한 타입의 트랜잭션을 모두 포함할 수 있다. 또한, 당해 기술 분야에서, 상기 읽기 타입의 트랜잭션의 쿼리(query) 등의 용어와 혼용되어 사용될 수 있다. 상기 트랜잭션은 스마트 컨트랙트(smart contract)를 통해 실행(e.g. 스마트 컨트랙트에 정의된 함수 및 변수를 통해 블록체인에 접근)될 수 있으나, 이는 블록체인 플랫폼에 따라 얼마든지 달라질 수 있다.In this specification, a transaction or a blockchain transaction refers to all actions that cause a state change (eg, increase or decrease in balance, transfer of assets) in the blockchain environment, and state data recorded in the blockchain. It can mean all the actions you look up, or data that indicates those actions. For example, the transaction may include both the act of writing specific data on the blockchain and the act of reading specific data recorded on the blockchain. The transaction may be divided into a write type transaction (e.g. transaction to add, modify, delete, etc.) and a read type transaction (e.g. transaction to query state data). Of course, depending on the blockchain platform, various types (e.g. execution) of transactions may exist in addition to read and write types, and in such a case, the transactions may include all types of transactions. Further, in the art, it may be used interchangeably with terms such as a query of the read type transaction. The transaction may be executed through a smart contract (e.g. access to the blockchain through functions and variables defined in the smart contract), but this may vary depending on the blockchain platform.

본 명세서에서, 스마트 컨트랙트(smart contract)란, 블록체인 시스템에서 트랜잭션 처리에 이용되는 스크립트 또는 소프트웨어 코드를 의미한다. 보다 구체적으로, 상기 스마트 컨트랙트는 트랜잭션 처리에 이용되는 각종 조건, 상태, 상기 조건에 따른 행위를 프로그래밍 방식으로 작성한 코드로, 예를 들어, 이더리움의 스마트 컨트랙트, 하이퍼레저 패브릭의 체인코드(chain code) 등을 포함할 수 있다. 블록체인 시스템에서, 블록체인 노드는 블록체인을 통해 스마트 컨트랙트를 공유할 수 있다.In the present specification, a smart contract means a script or software code used for transaction processing in a blockchain system. More specifically, the smart contract is code that programmatically writes various conditions, states, and actions according to the conditions used in transaction processing, for example, Ethereum smart contracts, and chain codes of hyperledger fabrics. ) And the like. In a blockchain system, blockchain nodes can share smart contracts through the blockchain.

본 명세서에서, 이력 데이터(historical data)란, 시간적 순서 관계를 갖는 모든 종류의 데이터를 총칭한다. 상기 이력 데이터의 예로는 IoT 데이터와 같은 각종 시계열 데이터, 버전 개념을 갖는 데이터 등을 포함할 수 있다.In this specification, historical data collectively refers to all kinds of data having a temporal order relationship. Examples of the history data may include various time series data such as IoT data, data having a version concept, and the like.

본 명세서에서, 데이터 레코드(data record)란, 복수의 데이터 필드를 갖는 데이터 유닛(data unit)을 의미한다. 가령, 도 1에 도시된 블록체인 구조에서, 각 블록의 바디에 포함된 개별 트랜잭션 데이터가 하나의 데이터 레코드에 대응될 수 있다.In the present specification, a data record means a data unit having a plurality of data fields. For example, in the blockchain structure shown in FIG. 1, individual transaction data included in the body of each block may correspond to one data record.

본 명세서에서, 인스트럭션(instruction)이란, 기능을 기준으로 묶인 일련의 명령어들로서 컴퓨터 프로그램의 구성 요소이자 프로세서(processor)에 의해 실행되는 것을 가리킨다.In this specification, an instruction (instruction) is a set of instructions that are grouped by function, and refers to a component of a computer program and executed by a processor.

이하, 본 발명의 몇몇 실시예들에 대하여 첨부된 도면에 따라 상세하게 설명한다.Hereinafter, some embodiments of the present invention will be described in detail according to the accompanying drawings.

도 2는 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)이 적용될 수 있는 예시적인 환경을 도시한다. 특히, 도 2는 블록체인을 통해 관리되는 데이터를 제공하는 데이터 소스(data source)가 IoT 디바이스인 것을 예로써 도시하고 있다. 그러나, 이는 실시예에 따라 얼마든지 달라질 수 있으며, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.2 shows an exemplary environment in which a blockchain-based query service providing system 10 according to an embodiment of the present invention can be applied. In particular, FIG. 2 shows as an example that the data source that provides data managed through the blockchain is an IoT device. However, this may vary depending on the embodiment, and the technical scope of the present invention is not limited thereto.

도 2에 도시된 바와 같이, 상기 예시적인 환경은 조회 서비스 제공 시스템(10), 하나 이상의 IoT 디바이스(20-1 내지 20-n) 및 하나 이상의 클라이언트 단말(30)을 포함할 수 있다. 단, 이는 본 발명의 목적을 달성하기 위한 바람직한 실시예일뿐이며, 필요에 따라 일부 구성 요소가 추가되거나 삭제될 수 있음은 물론이다.As illustrated in FIG. 2, the exemplary environment may include a query service providing system 10, one or more IoT devices 20-1 to 20-n, and one or more client terminals 30. However, this is only a preferred embodiment for achieving the object of the present invention, and of course, some components may be added or deleted as necessary.

상기 예시적인 환경에서, 블록체인 기반 조회 서비스 제공 시스템(10)은 하나 이상의 클라이언트 단말(30)에게 블록체인에 기록된 데이터에 대한 고속의 조회 서비스를 제공하는 시스템이다.In the exemplary environment, the blockchain-based inquiry service providing system 10 is a system that provides one or more client terminals 30 with a high-speed inquiry service for data recorded on the blockchain.

도 3 또는 도 4에 도시된 바와 같이, 조회 서비스 제공 시스템(10)은 복수의 블록체인 노드로 구성된 블록체인 네트워크(300), 블록 리스너 모듈(200) 및 데이터베이스 모듈(100)을 포함할 수 있다. 단, 도 3 또는 도 4에 도시된 조회 서비스 제공 시스템(10)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다.3 or 4, the inquiry service providing system 10 may include a blockchain network 300 composed of a plurality of blockchain nodes, a block listener module 200, and a database module 100. . However, each of the components of the inquiry service providing system 10 shown in FIG. 3 or FIG. 4 represents functionally divided functional elements, and a plurality of components may be implemented in an integrated form in an actual physical environment. Note that there is.

가령, 블록 리스너 모듈(200)과 데이터베이스 모듈(100))은 각각 별개의 컴퓨팅 장치로 구현될 수 있고, 동일한 컴퓨팅 장치 내에서 서로 다른 로직(logic)의 형태로 구현될 수 있다. 또한, 블록 리스너 모듈(200)과 하나 이상의 블록체인 노드 또한 동일한 컴퓨팅 장치 내에서 서로 다른 로직의 형태로 구현될 수 있다.For example, the block listener module 200 and the database module 100 may each be implemented as separate computing devices, and may be implemented in different logic types within the same computing device. In addition, the block listener module 200 and one or more blockchain nodes may also be implemented in the form of different logic within the same computing device.

여기서, 상기 컴퓨팅 장치는, 노트북, 데스크톱(desktop), 랩탑(laptop) 등이 될 수 있으나, 이에 국한되는 것은 아니며 컴퓨팅 기능 및 통신 기능이 구비된 모든 종류의 장치를 포함할 수 있다. 상기 컴퓨팅 장치의 일 예는 도 20을 참조하도록 한다.Here, the computing device may be a laptop, a desktop, a laptop, or the like, but is not limited thereto, and may include all types of devices equipped with computing functions and communication functions. For an example of the computing device, refer to FIG. 20.

또한, 실제 물리적 환경에서 상기 각각의 구성 요소들은 복수의 세부 기능 요소로 분리되는 형태로 구현될 수도 있다. 예컨대, 블록 리스너 모듈(200) 또는 데이터베이스 모듈(100)의 제1 기능은 제1 컴퓨팅 장치에서 구현되고, 제2 기능은 제2 컴퓨팅 장치에서 구현될 수도 있다. 이하, 조회 서비스 제공 시스템(10)의 각 구성 요소에 대하여 설명한다.Further, in the actual physical environment, each of the components may be implemented in a form of being divided into a plurality of detailed functional elements. For example, the first function of the block listener module 200 or the database module 100 may be implemented in the first computing device, and the second function may be implemented in the second computing device. Hereinafter, each component of the inquiry service providing system 10 will be described.

블록체인 네트워크(300)는 다수의 블록체인 노드로 구성된 P2P 구조의 네트워크를 의미한다. 도 3에 도시된 바와 같이, 블록체인 네트워크(300)는 하나 이상의 IoT 디바이스(20-1 내지 20-n)가 제공하는 IoT 데이터를 블록체인에 기록하고 관리한다. 전술한 바와 같이, 상기 IoT 데이터는 시간적 선후 관계를 갖는 이력 데이터(historical data)이다. 블록체인 네트워크(300) 상에 복수의 채널이 형성된 경우라면, 각 채널 별로 별도의 블록체인이 관리되며, 각 채널에 속한 블록체인 노드 간에 합의 프로세스가 이루어진다.Blockchain network 300 refers to a network of P2P structures composed of a plurality of blockchain nodes. As shown in FIG. 3, the blockchain network 300 records and manages IoT data provided by one or more IoT devices 20-1 to 20-n on the blockchain. As described above, the IoT data is historical data having a temporal and sequential relationship. If a plurality of channels are formed on the blockchain network 300, separate blockchains are managed for each channel, and an agreement process is performed between blockchain nodes belonging to each channel.

다음으로, 블록 리스너 모듈(200)은 블록체인 네트워크(300)로부터 블록을 수신하고, 상기 블록의 데이터를 데이터베이스 모듈(100)로 전달하는 모듈(300)이다. 블록 리스너 모듈(200)의 세부 기능에 대한 자세한 설명은 도 11 내지 도 15를 참조하여 후술하도록 한다.Next, the block listener module 200 is a module 300 that receives a block from the blockchain network 300 and transfers the data of the block to the database module 100. Detailed description of the detailed function of the block listener module 200 will be described later with reference to FIGS. 11 to 15.

다음으로, 데이터베이스 모듈(100))은 블록 리스너 모듈(200)로부터 수신한 데이터를 데이터베이스(이하, "DB")에 저장하고, 데이터베이스 쿼리(이하, "DB 쿼리")에 기반한 조회 서비스를 제공한다. 이때, 상기 DB는 관계형 DB, 객체지향 DB 등 어떠한 형태로 구현되더라도 무방하다.Next, the database module 100 stores data received from the block listener module 200 in a database (hereinafter, "DB"), and provides an inquiry service based on a database query (hereinafter, "DB query"). . At this time, the DB may be implemented in any form such as a relational DB, an object-oriented DB.

도 4에 도시된 바와 같이, 데이터베이스 모듈(100)은 클라이언트 단말(30)로부터 DB 쿼리를 수신하고, 상기 DB 쿼리에 대한 조회 결과를 제공할 수 있다. 데이터베이스 모듈(100)을 통해 제공되는 조회 서비스는 다양한 이점을 갖는다. 첫 번째 이점은 DB 쿼리를 통해 강력한 조회 기능이 지원될 수 있다는 것이고, 두 번째 이점은 DB를 이용함으로써 블록체인에 비해 훨씬 더 빠른 조회 서비스가 제공될 수 있다는 것이다.As illustrated in FIG. 4, the database module 100 may receive a DB query from the client terminal 30 and provide a query result for the DB query. The inquiry service provided through the database module 100 has various advantages. The first advantage is that the powerful query function can be supported through DB query, and the second advantage is that the query service can be provided much faster than the blockchain by using DB.

다만, 별도의 데이터베이스 모듈(100)을 통해 조회 서비스를 제공하는 경우, 데이터베이스 모듈(100)에 대한 신뢰성(즉, DB에 저장된 데이터의 무결성)이 보장될 필요가 있다. 이와 관련된 실시예는 도 5 내지 도 10을 참조하여 후술하도록 한다.However, when a query service is provided through a separate database module 100, it is necessary to ensure reliability (ie, integrity of data stored in the DB) for the database module 100. Embodiments related to this will be described later with reference to FIGS. 5 to 10.

도 4에 도시된 바와 같이, 클라이언트 단말(30)은 블록체인에 기록된 데이터에 대해 직접적인 조회를 수행할 수도 있다.As shown in FIG. 4, the client terminal 30 may perform a direct inquiry on the data recorded on the blockchain.

조회 서비스 제공 시스템(10)의 각 구성 요소(100, 200, 300)에 대한 보다 자세한 설명은 도 5이하의 도면을 참조하여 보다 상세하게 설명하도록 한다.A detailed description of each component 100, 200, 300 of the inquiry service providing system 10 will be described in more detail with reference to the drawings below.

다시 도 3을 참조하면, 상기 예시적인 환경에서, 하나 이상의 클라이언트 단말(30)은 조회 서비스 제공 시스템(10)이 제공하는 조회 서비스를 이용하는 단말이다. 클라이언트 단말(30)은 어떠한 장치로 구현되더라도 무방하다.Referring back to FIG. 3, in the exemplary environment, one or more client terminals 30 are terminals using an inquiry service provided by the inquiry service providing system 10. The client terminal 30 may be implemented with any device.

상기 예시적인 환경에서, 하나 이상의 IoT 디바이스(20-1 내지 20-n)는 IoT 데이터를 제공하는 데이터 소스이다. 상기 데이터 소스의 종류는 실시예에 따라 얼마든지 달라질 수 있다. 이하의 서술에서, 참조 번호 "20"은 임의의 IoT 디바이스를 지칭하는 것으로 가정하도록 한다.In the example environment, one or more IoT devices 20-1 to 20-n are data sources that provide IoT data. The type of the data source may vary depending on the embodiment. In the following description, it is assumed that reference numeral "20" refers to any IoT device.

도 2 내지 도4에 예시된 적어도 일부의 구성 요소는 네트워크를 통해 통신할 수 있다. 여기서, 상기 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 이동 통신망(mobile radio communication network), Wibro(Wireless Broadband Internet) 등과 같은 모든 종류의 유/무선 네트워크로 구현될 수 있다.At least some of the components illustrated in FIGS. 2-4 can communicate over a network. Here, the network is a wired / wireless network of any kind, such as a local area network (LAN), a wide area network (WAN), a mobile radio communication network, a Wibro (Wireless Broadband Internet), and the like. Can be implemented.

지금까지 도 2 내지 도 4를 참조하여 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)이 적용될 수 있는 예시적인 환경에 대하여 설명하였다. 이하에서는, 상기 예시적인 환경에서 조회 서비스가 제공되는 과정에 대하여 도 5 내지 도 10을 참조하여 설명하도록 한다.So far, with reference to FIGS. 2 to 4, an exemplary environment in which a blockchain-based query service providing system 10 according to an embodiment of the present invention can be applied has been described. Hereinafter, a process in which an inquiry service is provided in the exemplary environment will be described with reference to FIGS. 5 to 10.

이해의 편의를 제공하기 위해, 블록체인에 기록된 IoT 데이터가 데이터베이스 모듈(100)에 저장되는 과정을 먼저 설명하고, 그 다음에 클라이언트 단말(30)의 조회 요청이 처리되는 과정에 대하여 설명하도록 한다.In order to provide convenience of understanding, a process in which IoT data recorded in the blockchain is stored in the database module 100 will be described first, and then a process in which the inquiry request of the client terminal 30 will be processed will be described. .

도 5는 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)에서 블록체인 데이터가 DB에 저장되는 과정을 나타내는 흐름도이다.5 is a flowchart illustrating a process in which blockchain data is stored in a DB in a blockchain-based query service providing system 10 according to an embodiment of the present invention.

도 5에 도시된 바와 같이, 상기 저장 과정은 IoT 디바이스(20)가 IoT 데이터를 제공하는 단계 S10에서 시작된다.As illustrated in FIG. 5, the storage process starts at step S10 in which the IoT device 20 provides IoT data.

본 발명의 실시예에 따르면, 각각의 IoT 데이터는 소정의 식별 값을 갖고, IoT 디바이스 별로 동일한 식별 값이 부여될 수 있다. 또한, 각각의 IoT 데이터는 이력 데이터이므로 생성 시점을 가리키는 시점 정보(e.g. 타임스탬프)를 포함할 수 있다. 이외에도, IoT 데이터를 조회하는데 이용되는 다양한 메타 정보가 IoT 데이터에 포함될 수 있다. 가령, 도 6에 도시된 바와 같이, 제1 IoT 디바이스(20-1)가 제공하는 제1 데이터(41)와 제2 데이터(43)에는 제1 식별 값("Sensor1")이 부여되고, 제2 IoT 디바이스(20-2)가 제공하는 데이터(45)에는 제1 식별 값("Sensor2")이 부여된다. 또한, 각 데이터(41 내지 45)는 타임스탬프 값을 메타 정보로 포함한다. 상기 식별 값과 타임스탬프 값은 DB에 그대로 저장되어, 특정 IoT 디바이스(20)에 의해 생성된 데이터를 조회하는데 이용될 수 있다. 예컨대, 제1 IoT 디바이스(20-1)에 의해 특정 기간 동안 생성된 데이터가 식별 값("Sensor1")과 타임 스탬프 값을 통해 조회될 수 있다.According to an embodiment of the present invention, each IoT data has a predetermined identification value, and the same identification value may be assigned to each IoT device. In addition, since each IoT data is historical data, it may include viewpoint information (e.g. timestamp) indicating a creation time point. In addition, various meta information used to query IoT data may be included in the IoT data. For example, as illustrated in FIG. 6, the first identification value (“Sensor1”) is assigned to the first data 41 and the second data 43 provided by the first IoT device 20-1, and The first identification value ("Sensor2") is assigned to the data 45 provided by the 2 IoT device 20-2. In addition, each data 41 to 45 includes a timestamp value as meta information. The identification value and the timestamp value are stored in the DB as it is, and can be used to query data generated by the specific IoT device 20. For example, data generated during a specific period by the first IoT device 20-1 may be inquired through an identification value (“Sensor1”) and a time stamp value.

단계 S20에서, 블록체인 네트워크(300)는 제공받은 IoT 데이터를 블록에 기록하고, 합의(consensus)를 거쳐 상기 블록을 블록체인에 추가한다. 당해 기술 분야의 당업자라면 블록체인 노드가 블록체인 프로토콜에 따라 데이터를 블록에 기록하고 전파하며, 합의를 통해 블록을 블록체인에 추가하는 과정을 자명하게 알 수 있을 것이므로, 이에 대한 자세한 설명은 생략하도록 한다.In step S20, the blockchain network 300 records the IoT data provided in the block, and adds the block to the blockchain through consensus. A person skilled in the art will clearly understand the process of a blockchain node writing and disseminating data to a block according to the blockchain protocol, and adding the block to the blockchain through consensus, so detailed descriptions thereof will be omitted. do.

본 단계 S20에서, 블록체인 노드는 각 IoT 데이터(e.g. 도 6의 41, 43, 45)에 대한 해시 값을 생성하고, 상기 해시 값과 상기 IoT 데이터를 포함하는 데이터 레코드를 블록체인에 기록할 수 있다. 상기 해시 값은 추후 DB에 저장된 데이터의 무결성을 확인하기 위해 이용될 수 있다. 가령, 클라이언트 단말(30)은 DB 조회 결과에 포함된 해시 값과 블록체인에 기록된 해시 값을 비교함으로써 DB 데이터의 무결성을 확인할 수 있다.In this step S20, the blockchain node can generate a hash value for each IoT data (eg, 41, 43, 45 in FIG. 6) and record a data record including the hash value and the IoT data in the blockchain. have. The hash value can be used later to check the integrity of the data stored in the DB. For example, the client terminal 30 may check the integrity of the DB data by comparing the hash value included in the DB search result with the hash value recorded in the blockchain.

또한, 본 발명의 실시예에 따르면, 블록체인 노드는 이전 데이터의 해시 값에 기반하여 현재 데이터의 해시 값을 산출할 수 있다. 가령, 도 7에 도시된 바와 같이, 1번째 데이터(51-1)의 해시 값(53-1)은 1번째 데이터(51-1)의 이전 데이터의 해시 값("prevHashVal")과 데이터(51-1)에 기초하여 산출될 수 있고, 2번째 데이터(51-2)의 해시 값(53-2)은 이전 데이터(51-1)의 해시 값(53-1)과 데이터(51-2)에 기초하여 산출될 수 있다. 동일하게, n번째 데이터(51-n)의 해시 값(53-n)은 n-1번째 데이터의 해시 값(53-n-1)과 데이터(51-n)에 기초하여 생성될 수 있다. 이와 같이, 체인 형태로 이력 데이터의 해시 값이 산출됨에 따라 데이터의 무결성이 효율적으로 검증될 수 있는데 이에 대한 설명은 도 9 및 도 10을 참조하여 후술하도록 한다.In addition, according to an embodiment of the present invention, the blockchain node may calculate the hash value of the current data based on the hash value of the previous data. For example, as illustrated in FIG. 7, the hash value 53-1 of the first data 51-1 is the hash value (“prevHashVal”) and data 51 of the previous data of the first data 51-1. -1), and the hash value 53-2 of the second data 51-2 is the hash value 53-1 and the data 51-2 of the previous data 51-1. It can be calculated based on. Similarly, the hash value 53-n of the n-th data 51-n may be generated based on the hash value 53-n-1 of the n-1st data and the data 51-n. As described above, as the hash value of the historical data is calculated in the form of a chain, the integrity of the data can be efficiently verified. The description thereof will be described later with reference to FIGS. 9 and 10.

단계 S30에서, 블록체인 네트워크(300)는 상기 블록을 블록 리스너 모듈(200)로 전송한다. 즉, 블록체인 네트워크(300)를 구성하는 하나 이상의 블록체인 노드가 상기 블록을 블록 리스너 모듈(200)로 전송한다.In step S30, the blockchain network 300 transmits the block to the block listener module 200. That is, at least one blockchain node constituting the blockchain network 300 transmits the block to the block listener module 200.

단계 S40에서, 블록 리스너 모듈(200)은 수신된 블록에 포함된 하나 이상의 데이터 레코드를 데이터베이스 모듈(100)로 전송한다. 이때, 블록 리스너 모듈(200)은 블록의 전송 상태 정보에 기초하여 상기 전송을 수행할 수 있는데, 이에 대한 자세한 설명은 도 11 내지 도 13을 참조하여 후술하도록 한다.In step S40, the block listener module 200 transmits one or more data records included in the received block to the database module 100. At this time, the block listener module 200 may perform the transmission based on the transmission status information of the block, and a detailed description thereof will be described later with reference to FIGS. 11 to 13.

단계 S50에서, 데이터베이스 모듈(100)은 수신한 데이터 레코드를 DB에 저장한다.In step S50, the database module 100 stores the received data record in the DB.

도 8은 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)에서 조회 요청이 처리되는 과정을 나타내는 흐름도이다.8 is a flowchart illustrating a process in which an inquiry request is processed in the blockchain-based inquiry service providing system 10 according to an embodiment of the present invention.

도 8에 도시된 바와 같이, 상기 조회 요청 처리 과정은 클라이언트 단말(30)이 DB 조회를 요청하는 단계 S110에서 시작된다. 상기 DB 조회 요청은 DB 쿼리를 전송함으로써 이루어질 수 있는데, 클라이언트 단말(30)은 SQL(Structured Query Language) 등의 언어에 기반하여 DB 쿼리를 생성할 수 있다. 따라서, 클라이언트는 손쉽게 원하는 데이터를 조회할 수 있게 되고, 조회 서비스 제공 시스템(10)은 DB 기반으로 강력한 조회 서비스를 제공할 수 있게 된다.As illustrated in FIG. 8, the inquiry request processing process starts at step S110 in which the client terminal 30 requests a DB inquiry. The DB inquiry request may be made by transmitting a DB query, and the client terminal 30 may generate a DB query based on a language such as SQL (Structured Query Language). Therefore, the client can easily inquire the desired data, and the inquiry service providing system 10 can provide a powerful inquiry service based on the DB.

단계 S120에서, 데이터베이스 모듈(100)은 상기 DB 쿼리로 DB를 조회하고 조회 결과를 클라이언트 단말(30)로 제공한다. 이때, 상기 조회 결과는 데이터뿐만 아니라 상기 데이터의 무결성을 검증하기 위한 해시 값을 포함한다.In step S120, the database module 100 queries the DB with the DB query and provides the inquiry result to the client terminal 30. At this time, the inquiry result includes not only data, but also hash values for verifying the integrity of the data.

상기 조회 결과에 대한 무결성을 검증하고 싶은 경우, 클라이언트 단말(30)은 단계 S130 내지 S150을 더 수행할 수 있다. 구체적으로, 클라이언트 단말(30)은 블록체인에 기록된 데이터의 해시 값을 조회하고(S130, S140), 블록체인에 기록된 해시 값과 조회 결과에 포함된 해시 값을 비교함으로써 DB 데이터에 대한 무결성을 확인할 수 있다(S150).If it is desired to verify the integrity of the inquiry result, the client terminal 30 may further perform steps S130 to S150. Specifically, the client terminal 30 inquires the hash value of the data recorded in the blockchain (S130, S140), and compares the hash value recorded in the blockchain and the hash value included in the search result to ensure the integrity of the DB data. It can be confirmed (S150).

본 발명의 실시예에 따르면, 시간적 선후 관계를 갖는 n개의 데이터로 구성된 이력 데이터(e.g. 특정 기간 동안의 수집된 IoT 데이터)를 조회한 경우, 클라이언트 단말(30)은 2번의 해시 값 비교를 통해 전체 데이터의 무결성을 확인할 수 있다. 구체적으로, 도 9에 도시된 바와 같이, 클라이언트 단말(30)은 첫 번째 데이터의 해시 값을 비교하는 단계(S151), 마지막 데이터에 대한 해시 값을 연산하는 단계(153) 및 마지막 데이터에 대한 해시 값을 비교하는 단계(S155)만을 수행함으로써 조회된 전체 데이터에 대한 무결성을 확인할 수 있다. 이는, 도 7에 도시된 바와 같이 체인 형태로 해시 값이 산출되는 경우, 어느 하나의 데이터라도 위조 또는 변조되면 마지막 데이터의 해시 값이 달라지기 때문이다. 마지막 데이터의 해시 값은 도 10에 도시된 바와 같이 조회된 이력 데이터(61, 63, 65)에 대해 순차적으로 해시 연산을 수행함으로써 구해질 수 있는데, 이는 도 7에서 설명한 바와 같으므로 더 이상의 설명은 생략하도록 한다. 본 실시예에 따르면, 조회 결과로 획득된 데이터의 개수에 관계 없이 2번의 해시 값 비교를 통해 전체 데이터의 무결성이 확인될 수 있다. 다시 말하면, 최대 2번의 블록 액세스를 통해 첫 번째와 마지막 데이터의 해시 값만 획득하면, 전체 데이터의 무결성이 바로 검증될 수 있다. 따라서, 별도의 DB를 통해 고속의 조회 서비스를 제공함과 동시에, 성능 저하 없이 DB 데이터의 무결성 또한 보장될 수 있다.According to an embodiment of the present invention, when querying historical data (eg, IoT data collected during a specific period) composed of n data having temporal and sequential relationships, the client terminal 30 performs a whole through comparison of two hash values. You can check the integrity of the data. Specifically, as illustrated in FIG. 9, the client terminal 30 compares the hash value of the first data (S151), calculates the hash value for the last data (153), and hash for the last data By performing only the step of comparing the values (S155), it is possible to check the integrity of the entire data. This is because when the hash value is calculated in the form of a chain as shown in FIG. 7, if any one data is forged or modulated, the hash value of the last data is changed. The hash value of the last data can be obtained by sequentially performing a hash operation on the searched history data (61, 63, 65) as shown in FIG. 10. It should be omitted. According to this embodiment, regardless of the number of data obtained as a result of the inquiry, the integrity of the entire data can be confirmed through two hash value comparisons. In other words, if only the hash values of the first and last data are obtained through up to two block accesses, the integrity of the entire data can be immediately verified. Therefore, while providing a high-speed inquiry service through a separate DB, integrity of DB data can be guaranteed without deteriorating performance.

지금까지 도 5 내지 도 10을 참조하여 블록체인 기반 조회 시스템(10)을 통해 조회 서비스가 제공되는 과정에 대하여 설명하였다. 이하에서는, 도 11 내지 도 15를 참조하여 블록 리스너 모듈(200)의 세부 기능에 대하여 상세하게 설명하도록 한다.So far, with reference to FIGS. 5 to 10, the process of providing the inquiry service through the blockchain-based inquiry system 10 has been described. Hereinafter, detailed functions of the block listener module 200 will be described in detail with reference to FIGS. 11 to 15.

도 11은 본 발명의 일 실시예에 따른 블록 리스너 모듈(200)을 나타내는 블록도이다.11 is a block diagram illustrating a block listener module 200 according to an embodiment of the present invention.

도 11에 도시된 바와 같이, 블록 리스너 모듈(200)은 블록 수신부(210), 데이터 송수신부(230), 전송 상태 정보 관리부(250), 블록 요청부(270) 및 담당 노드 지정부(290)를 포함할 수 있다. 다만, 도 11에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 11에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다. 또한, 도 11에 도시된 블록 리스너 모듈(200)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다. 또는, 각각의 구성 요소가 복수의 세부 기능 요소로 분리되는 형태로 구현될 수도 있다.As illustrated in FIG. 11, the block listener module 200 includes a block receiving unit 210, a data transmitting and receiving unit 230, a transmission status information management unit 250, a block requesting unit 270, and a responsible node designation unit 290. It may include. However, only components related to the embodiment of the present invention are illustrated in FIG. 11. Therefore, it can be seen that a person skilled in the art to which the present invention belongs may further include other general-purpose components in addition to the components shown in FIG. 11. In addition, it is noted that each component of the block listener module 200 shown in FIG. 11 is a functionally-divided functional element, and a plurality of components may be implemented in an integrated form in an actual physical environment. . Alternatively, each component may be implemented in a form that is divided into a plurality of detailed functional elements.

블록 수신부(210)는 하나 이상의 블록체인 노드로부터 블록을 수신한다.The block receiving unit 210 receives blocks from one or more blockchain nodes.

다음으로, 데이터 송수신부(230)는 상기 블록에 포함된 하나 이상의 데이터 레코드를 데이터베이스 모듈(100)로 전송한다. 또한, 데이터 송수신부(230)는 데이터베이스 모듈(100)로부터 ACK(ACKnowledgement) 메시지를 수신할 수 있다. 데이터베이스 모듈(100)은 특정 블록에 대한 데이터 레코드를 전부 수신하거나, 상기 데이터 레코드 전부를 DB에 저장 완료한 경우, 상기 ACK 메시지를 전송할 수 있다. 데이터 송수신부(230)의 동작에 대한 추가적인 내용은 전송 상태 정보 관리부(250)와 함께 설명하도록 한다.Next, the data transmitting and receiving unit 230 transmits one or more data records included in the block to the database module 100. Also, the data transmitting and receiving unit 230 may receive an ACK (ACKnowledgement) message from the database module 100. The database module 100 may transmit the ACK message when all data records for a specific block are received or when all the data records are stored in the DB. Additional contents of the operation of the data transmission / reception unit 230 will be described together with the transmission status information management unit 250.

다음으로, 전송 상태 정보 관리부(250)는 블록 단위로 전송 상태 정보를 관리한다. 상기 전송 상태 정보는 각 블록이 데이터베이스 모듈(100)로 전송 완료되었는지 여부를 가리키는 플래그 정보를 포함할 수 있다. 이때, 각 블록의 식별자로 블록 번호로 이용될 수 있으나, 별도의 식별자가 이용되더라도 무방하다. 블록체인 네트워크(300)에 복수의 채널이 형성된 경우라면, 도 12에 도시된 바와 같이, 각 채널 별로 블록에 대한 전송 상태 정보가 관리될 수 있다. 실시예에 따라, 전송 상태 정보 관리부(250)는 데이터 레코드 단위로 전송 상태 정보를 관리할 수도 있다.Next, the transmission status information management unit 250 manages the transmission status information in units of blocks. The transmission status information may include flag information indicating whether each block has been transmitted to the database module 100. At this time, it may be used as a block number as an identifier of each block, but a separate identifier may be used. If a plurality of channels are formed in the blockchain network 300, as shown in FIG. 12, transmission status information for a block may be managed for each channel. According to an embodiment, the transmission status information management unit 250 may manage the transmission status information in units of data records.

데이터 송수신부(230)가 데이터베이스 모듈(100)로부터 특정 블록에 대한 ACK 메시지를 수신하면, 전송 상태 정보 관리부(250)는 상기 특정 블록에 대한 전송 완료 플래그를 "Y"로 설정할 수 있다. 가령, 도 12에 도시된 블록(1)의 상태 정보(71)는 데이터베이스 모듈(100)로부터 블록(1)에 대한 ACK 메시지가 수신되었다는 것을 의미하는 것일 수 있다.When the data transmitting and receiving unit 230 receives an ACK message for a specific block from the database module 100, the transmission status information management unit 250 may set the transmission completion flag for the specific block to "Y". For example, the status information 71 of the block 1 shown in FIG. 12 may mean that an ACK message for the block 1 has been received from the database module 100.

본 발명의 실시예에 따르면, 데이터 송수신부(230)는 블록 전송 전에 해당 블록의 전송 완료 플래그를 확인함으로써 중복 전송을 방지할 수 있다. 즉, 데이터 송수신부(230)는 블록체인 노드로부터 동일한 블록이 수신되더라도 중복 전송을 하지 않을 수 있다. 가령, 도 13에 도시된 바와 같이, 제1 블록체인 노드(301)는 채널 A, B 및 C에 속하고, 제2 블록체인 노드(303)는 채널 A 및 B에 속하며, 제3 블록체인 노드(305)는 채널 A 및 C에 속한다고 가정하자. 그러면, 각 블록체인 노드(301 내지 305)는 소속 채널에서 신규 블록이 생성될 때마다 상기 신규 블록을 블록 리스너 모듈(200)로 전송할 것이므로, 데이터 송수신부(230)는 동일한 블록을 중복 수신 및 전송하게 된다. 이와 같은 경우, 데이터 송수신부(230)는 각 블록의 전송 상태 정보에 기초하여 전송을 수행함으로써(즉, 전송 완료 플래그가 "N"인 경우에만 전송함으로써), 도 13에 도시된 바와 같이 동일한 블록이 데이터베이스 모듈(100)로 중복 전송되는 것을 방지할 수 있다. 이에 따라, 중복 전송에 따른 불필요한 컴퓨팅 비용 및 네트워크 비용이 절감될 수 있다.According to an embodiment of the present invention, the data transmitting and receiving unit 230 may prevent a duplicate transmission by checking a transmission completion flag of the corresponding block before transmitting the block. That is, the data transmitting and receiving unit 230 may not transmit duplicates even if the same block is received from the blockchain node. For example, as shown in FIG. 13, the first blockchain node 301 belongs to channels A, B, and C, and the second blockchain node 303 belongs to channels A and B, and the third blockchain node Assume that 305 belongs to channels A and C. Then, each blockchain node 301 to 305 will transmit the new block to the block listener module 200 each time a new block is created in the belonging channel, so the data transmitting and receiving unit 230 receives and transmits the same block in duplicate. Is done. In this case, the data transmitting and receiving unit 230 performs transmission based on the transmission state information of each block (that is, only by transmitting only when the transmission completion flag is "N"), and the same block as shown in FIG. Duplicate transmission to the database module 100 can be prevented. Accordingly, unnecessary computing cost and network cost due to redundant transmission may be reduced.

또한, 본 발명의 실시예에 따르면, 데이터 송수신부(230)는 블록의 전송 상태 정보(즉, 전송 완료 플래그)에 기초하여 미전송 블록에 대한 재전송을 수행할 수 있다. 가령, 도 12에 도시된 블록(2)이 이미 전송을 시도한 블록이라고 가정하자. 그러나, 블록(2)의 전송 상태 정보(73)의 전송 완료 플래그가 "N"으로 되어있으므로, 데이터 송수신부(230)는 해당 블록(2)에 대한 재전송을 수행할 수 있다. 데이터 송수신부(230)는 재전송 타이머를 이용하여 재전송을 수행할 수 있을 것이나, 상기 재전송은 어떠한 방식으로 구현되더라도 무방하다.In addition, according to an embodiment of the present invention, the data transmission / reception unit 230 may perform retransmission on the untransmitted block based on the transmission status information (ie, the transmission completion flag) of the block. For example, assume that block 2 shown in FIG. 12 is a block that has already attempted transmission. However, since the transmission completion flag of the transmission status information 73 of the block 2 is set to “N”, the data transmission / reception unit 230 may perform retransmission for the corresponding block 2. The data transmitting and receiving unit 230 may perform retransmission using a retransmission timer, but the retransmission may be implemented in any way.

다음으로, 블록 요청부(270)는 블록체인 노드에게 특정 블록을 요청한다. 가령, 블록 리스너 모듈(200)이 장애 발생 후 복구된 경우, 블록 요청부(270)는 각 블록의 전송 상태 정보를 참조하여 미전송 블록을 식별하고, 상기 미전송 블록을 블록체인 노드에게 요청할 수 있다. 가령, 도 12에 도시된 블록(2)의 전송 상태 정보(73)를 참조하면, 다음 블록(3)이 전송 완료되었음에도 불구하고, 블록(2)은 전송되지 않은 상태인 것을 확인할 수 있다. 이와 같은 경우, 블록 요청부(270)는 블록(2)을 채널(A)에 속한 블록체인 노드에게 요청하고, 데이터 송수신부(230)는 블록(2)을 데이터베이스 모듈(100)로 다시 전송할 수 있다.Next, the block request unit 270 requests a specific block from the blockchain node. For example, when the block listener module 200 is recovered after a failure, the block requester 270 identifies the untransmitted block by referring to the transmission state information of each block, and requests the untransmitted block to the blockchain node. have. For example, referring to the transmission status information 73 of the block 2 shown in FIG. 12, it can be confirmed that the block 2 is not transmitted even though the next block 3 is completed. In this case, the block request unit 270 requests the block 2 to the blockchain node belonging to the channel (A), and the data transmitting and receiving unit 230 can transmit the block 2 back to the database module 100. have.

그러나, 본 발명의 다른 실시예에 따르면, 블록 리스너 모듈(200)은 수신한 블록을 캐시(cache)와 같은 임시 저장소에 저장하고, ACK 메시지를 수신할 때 수신된 ACK 메시지에 대응되는 블록을 제거하도록 동작할 수도 있다. 이와 같은 경우, 블록체인 노드에게 미전송 블록을 요청할 필요가 없으므로, 블록 요청부(270)를 제외하고 블록 리스너 모듈(200)이 구현될 수도 있다.However, according to another embodiment of the present invention, the block listener module 200 stores the received block in a temporary storage such as a cache, and removes a block corresponding to the received ACK message when receiving the ACK message. It might work. In this case, since there is no need to request an untransmitted block from the blockchain node, the block listener module 200 may be implemented except for the block request unit 270.

다시 도 11을 참조하면, 담당 노드 지정부(290)는 채널 별로 담당 노드를 지정한다. 여기서, 상기 담당 노드는 소속된 채널의 블록을 블록 리스너 모듈(200)로 전송하도록 지정된 블록체인 노드를 의미한다. 담당 노드를 설정하는 이유는 도 13에 도시된 바와 같이 블록체인 노드(301 내지 305)와 블록 리스너 모듈(200) 간에 블록 전송이 중복되는 것을 방지하기 위해서이다. 즉, 블록의 전송 상태 정보를 이용함으로써 블록 리스너 모듈(200)과 데이터베이스 모듈(100) 간의 중복 트래픽은 제거되었으나, 여전히 블록체인 노드와 블록 리스너 모듈(200) 사이에는 중복 트래픽이 존재하다. 따라서, 중복 트래픽에 따른 비효율성을 추가로 제거하기 위해, 각 채널 별로 담당 노드를 지정하는 것으로 이해될 수 있다. 담당 노드 지정부(290)의 구체적인 동작에 대하여 도 14 및 도 15를 참조하여 부연 설명한다.Referring back to FIG. 11, the responsible node designation unit 290 designates a responsible node for each channel. Here, the responsible node means a blockchain node designated to transmit a block of the channel to which it belongs to the block listener module 200. The reason for setting the responsible node is to prevent overlapping of block transmission between the blockchain nodes 301 to 305 and the block listener module 200 as shown in FIG. 13. That is, duplicate traffic between the block listener module 200 and the database module 100 is removed by using the transmission state information of the block, but there is still duplicate traffic between the blockchain node and the block listener module 200. Therefore, in order to further eliminate inefficiencies due to duplicate traffic, it may be understood that a node responsible for each channel is designated. The detailed operation of the node designating unit 290 will be described in detail with reference to FIGS. 14 and 15.

담당 노드 지정부(290)는 블록체인 노드가 소속된 채널의 정보를 수집하고, 수집된 채널 정보를 기초로 채널 별로 담당 노드를 지정할 수 있다. 이때, 각 블록체인 노드의 채널 정보를 수집하는 방식은 어떠한 방식이 되더라도 무방하다.The responsible node designation unit 290 may collect information of a channel to which the blockchain node belongs, and designate a responsible node for each channel based on the collected channel information. At this time, the method of collecting the channel information of each blockchain node may be any method.

본 발명의 실시예에 따르면, 담당 노드 지정부(290)는 담당 채널이 서로 중복되지 않도록 채널 별로 담당 노드를 지정할 수 있다. 담당 노드를 지정하는 일 예는 도 14 및 도 15 도시되어 있다. 이하, 도 14 및 도 15를 참조하여 담당 노드를 지정하는 예시적인 방법에 대하여 부연 설명하도록 한다.According to an embodiment of the present invention, the responsible node designation unit 290 may designate the responsible node for each channel so that the responsible channels do not overlap with each other. 14 and 15 are examples of designating a responsible node. Hereinafter, an exemplary method of designating a responsible node will be described in detail with reference to FIGS. 14 and 15.

도 14에 도시된 표(81)는 도 15에 도시된 환경에서 수집된 채널 정보를 도시하고 있다. 담당 노드 지정부(290)는 수집된 채널 정보(81)를 기초로 각 채널 별로 소속된 노드의 개수를 산출하고, 이를 토대로 표(83)와 같은 정보를 생성할 수 있다.Table 81 shown in FIG. 14 shows channel information collected in the environment shown in FIG. 15. The responsible node designation unit 290 may calculate the number of nodes belonging to each channel based on the collected channel information 81, and generate information as shown in Table 83 based on this.

다음으로, 담당 노드 지정부(290)는 표(83)와 같은 정보를 기반으로 노드의 개수가 상대적으로 적은 채널부터 순차적으로 담당 노드를 지정할 수 있다. 구체적으로, 소속된 노드의 수가 가장 적은 채널(B or C)부터 담당 노드가 지정되는데, 도 14는 채널(B)부터 담당 노드가 지정된 것을 예로써 도시하고 있다. 다음으로, 채널(B)을 제외한 나머지 채널(A, C) 중에서 노드의 수가 더 적은 채널(C)의 담당 노드가 제3 블록체인 노드(315)로 지정될 수 있다. 동일하게, 남은 채널(A)의 담당 노드가 제1 블록체인 노드(311)로 지정될 수 있다. 이와 같은 방식으로, 담당 채널이 서로 중복되지 않도록 담당 노드가 지정될 수 있다.Next, the responsible node designation unit 290 may sequentially designate the responsible node from a channel having a relatively small number of nodes based on the information shown in Table 83. Specifically, the responsible node is designated from the channel (B or C) having the smallest number of nodes, and FIG. 14 shows that the responsible node is designated from the channel B as an example. Next, among the remaining channels A and C except for the channel B, a node in charge of the channel C having a smaller number of nodes may be designated as the third blockchain node 315. Similarly, the node in charge of the remaining channel A may be designated as the first blockchain node 311. In this way, the responsible node can be designated so that the responsible channels do not overlap with each other.

도 15는 채널 별로 담당 노드가 지정된 이후, 블록체인 노드(311 내지 315)와 블록 리스너 모듈(200) 간의 블록 전송을 도시하고 있다. 도 15에 도시된 바와 같이, 블록 리스너 모듈(200)이 특정 채널을 담당하는 블록체인 노드(311 내지 315)로부터 각 채널의 블록을 수신함으로써, 블록 리스너 모듈(200)과 블록체인 노드(311 내지 315) 간의 중복 트래픽이 제거될 수 있다.15 shows block transmission between the block chain nodes 311 to 315 and the block listener module 200 after a corresponding node is designated for each channel. As shown in FIG. 15, the block listener module 200 receives blocks of each channel from the block chain nodes 311 to 315 in charge of a specific channel, thereby allowing the block listener module 200 and the block chain nodes 311 to Duplicate traffic between 315) may be removed.

한편, 도 11에 도시된 모든 구성 요소(210 내지 290)가 블록 리스너 모듈(200)의 필수 구성 요소는 아님에 유의하여야 한다. 즉, 블록 리스너 모듈(200)은 도 11에 도시된 구성 요소(210 내지 290) 중 일부만으로 구현될 수도 있다.Meanwhile, it should be noted that not all components 210 to 290 illustrated in FIG. 11 are essential components of the block listener module 200. That is, the block listener module 200 may be implemented with only some of the components 210 to 290 illustrated in FIG. 11.

도 11에 도시된 각 구성 요소(210 내지 290)는 소프트웨어(Software) 또는, FPGA(Field Programmable Gate Array)나 ASIC(Application-Specific Integrated Circuit)와 같은 하드웨어(Hardware)를 의미할 수 있다. 그렇지만, 상기 구성 요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(Addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고, 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다. 상기 구성 요소들 안에서 제공되는 기능은 더 세분화된 구성 요소에 의하여 구현될 수 있으며, 복수의 구성 요소들을 합하여 특정한 기능을 수행하는 하나의 구성 요소로 구현될 수도 있다.Each component 210 to 290 illustrated in FIG. 11 may mean software or hardware such as a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). However, the above components are not limited to software or hardware, and may be configured to be in an addressable storage medium, or may be configured to execute one or more processors. The functions provided in the above components may be implemented by more detailed components, or may be implemented as a single component that performs a specific function by combining a plurality of components.

지금까지 도 11 내지 도 15를 참조하여 본 발명의 일 실시예에 따른 블록 리스너 모듈(200)의 세부 기능에 대하여 설명하였다. 이하에서는, 블록체인 네트워크의 트랜잭션 처리 성능을 향상시킬 수 있는 본 발명의 실시예에 대하여 도 16 내지 도 19를 참조하여 설명하도록 한다.So far, the detailed functions of the block listener module 200 according to an embodiment of the present invention have been described with reference to FIGS. 11 to 15. Hereinafter, an embodiment of the present invention capable of improving the transaction processing performance of the blockchain network will be described with reference to FIGS. 16 to 19.

실시간으로 발생하는 방대한 양의 IoT 데이터를 블록체인에 기록하기 위해서는 블록체인 네트워크의 트랜잭션 처리 성능이 매우 중요하다. 트랜잭션 처리 성능을 개선하기 위해, 도 16에 도시된 바와 같이, 조회 서비스 제공 시스템(10)은 배치 프로세싱 모듈(400)을 더 포함할 수 있다.In order to record massive amounts of IoT data generated in real time on the blockchain, the transaction processing performance of the blockchain network is very important. In order to improve transaction processing performance, as shown in FIG. 16, the inquiry service providing system 10 may further include a batch processing module 400.

배치 프로세싱 모듈(400)은 블록체인 트랜잭션을 배치 형태로 처리하기 위한 모듈이다. 가령, IoT 디바이스(20-1 내지 20-n)가 제공하는 각각의 IoT 데이터를 블록체인에 기록하는 것이 하나의 쓰기 트랜잭션으로 처리된다고 할 때, 배치 프로세싱 모듈(400)은 다수 쓰기 트랜잭션을 배치 형태로 일괄 처리할 수 있다. 그렇게 함으로써, 블록체인 네트워크(300)의 트랜잭션 처리 성능이 크게 향상될 수 있다. 프로세싱 모듈(400)은 별도의 컴퓨팅 장치로 구현될 수 있고, 특정 컴퓨팅 장치 내에서 로직의 형태로 구현될 수도 있다.The batch processing module 400 is a module for processing a blockchain transaction in a batch form. For example, when it is said that writing each IoT data provided by the IoT devices 20-1 to 20-n to the blockchain is processed as one write transaction, the batch processing module 400 batch-writes multiple write transactions. Can be batch processed. By doing so, the transaction processing performance of the blockchain network 300 can be greatly improved. The processing module 400 may be implemented as a separate computing device, or may be implemented in the form of logic within a specific computing device.

본 발명의 실시예에 따르면, 배치 프로세싱 모듈(400)은 도 17에 도시된 바와 같은 기능 요소들로 구성될 수 있다. 이하, 도 17을 참조하여 배치 프로세싱 모듈(400)의 세부 기능 요소에 대하여 설명하도록 한다.According to an embodiment of the present invention, the batch processing module 400 may be composed of functional elements as shown in FIG. 17. Hereinafter, detailed functional elements of the batch processing module 400 will be described with reference to FIG. 17.

도 17을 참조하면, 배치 프로세싱 모듈(400)은 분류부(410), 배치 생성부(430), 핸들러부(450) 및 결과 제공부(470) 및 배치 사이즈 조정부(490)을 포함할 수 있다. 다만, 도 17에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 17에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다. 또한, 도 17에 도시된 배치 프로세싱 모듈(400)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 적어도 하나의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다.Referring to FIG. 17, the batch processing module 400 may include a classification unit 410, a batch generation unit 430, a handler unit 450 and a result providing unit 470 and a batch size adjustment unit 490. . However, only components related to the embodiment of the present invention are illustrated in FIG. 17. Therefore, it can be seen that a person skilled in the art to which the present invention belongs may further include other general-purpose components in addition to the components shown in FIG. 17. In addition, it is noted that each component of the batch processing module 400 shown in FIG. 17 is functionally divided functional elements, and at least one component may be embodied in an integrated form in an actual physical environment. do.

각 구성 요소를 살펴보면, 분류부(410)은 요청된 트랜잭션을 소정의 분류 기준에 따라 분류한다. 이때, 상기 소정의 분류 기준은 스마트 컨트랙트의 식별자, 채널 식별자 및/또는 트랜잭션의 타입, 트랜잭션의 중요도 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. 여기서, 상기 트랜잭션의 타입은 전술한 바와 같이 다양하게 정의될 수 있으나, 이해의 편의를 제공하기 위해, 쓰기 타입과 읽기 타입으로 구분된다고 가정하여 설명을 이어가도록 한다. 그러나, 본 발명의 기술적 범위가 특정 타입의 트랜잭션에 한정되는 것은 아님에 유의하여야 한다.Looking at each component, the classification unit 410 classifies the requested transaction according to a predetermined classification criterion. In this case, the predetermined classification criterion may include an identifier of a smart contract, a channel identifier and / or a type of transaction, and the importance of the transaction, but is not limited thereto. Here, the type of the transaction may be variously defined as described above, but in order to provide convenience for understanding, it is assumed that it is divided into a write type and a read type, and the description is continued. However, it should be noted that the technical scope of the present invention is not limited to a specific type of transaction.

보다 자세하게는, 분류부(410)은 각 트랜잭션을 채널, 스마트 컨트랙트, 트랜잭션 타입, 및/또는 중요도 별로 분류(e.g. 제1 채널의 제1 스마트 컨트랙트를 이용하는 쓰기 타입 트랜잭션으로 분류)하고, 분류 결과를 배치 생성부(430)에게 제공할 수 있다.In more detail, the classification unit 410 classifies each transaction by channel, smart contract, transaction type, and / or importance (eg, classified as a write type transaction using the first smart contract of the first channel), and classifies the result of the classification. It can be provided to the batch generation unit 430.

본 발명의 실시예에 따르면, 중요도가 높은 일부 트랜잭션은 배치 프로세싱을 통해 처리되지 않고, 개별적으로 처리될 수 있다. 예를 들어, 분류부(410)가 트랜잭션의 중요도에 기초하여 복수의 트랜잭션을 중요도가 낮은 제1 트랜잭션 그룹과 중요도가 높은 제2 트랜잭션 그룹으로 분류한다고 가정하자. 그러면, 상기 제1 트랜잭션 그룹에 소속된 제1 블록체인 트랜잭션은 배치 생성부(430)에 의해 배치 형태로 처리될 수 있다. 또한, 상기 제2 트랜잭션 그룹에 소속된 제2 트랜잭션은 곧바로 핸들러부(450)로 전달되어 개별적으로 처리될 수 있다. 본 실시예에 따르면, 중요도가 높은 트랜잭션이 보다 신속하게 처리될 수 있는 바, 트랜잭션 중요도에 따른 차등적인 처리 서비스가 제공될 수 있다.According to an embodiment of the present invention, some high-priority transactions are not processed through batch processing, but can be processed individually. For example, assume that the classification unit 410 classifies a plurality of transactions into a first transaction group having a low importance and a second transaction group having a high importance based on the importance of the transaction. Then, the first blockchain transaction belonging to the first transaction group may be processed in a batch form by the batch generation unit 430. In addition, the second transaction belonging to the second transaction group may be directly transferred to the handler unit 450 and processed individually. According to this embodiment, since a transaction with high importance can be processed more quickly, a differential processing service according to transaction importance can be provided.

다음으로, 배치 생성부(430)는 분류부(410)에 의해 분류된 복수의 트랜잭션을 종합하여 배치 트랜잭션을 생성한다. 구체적으로, 배치 생성부(430)는 상기 분류된 트랜잭션 각각을 분류 결과에 대응되는 배치 큐(batch queue)에 삽입한다. 예를 들어, 배치 생성부(430)는 제1 분류 결과로 분류된 제1 트랜잭션을 제1 배치 큐에 삽입하고, 제2 분류 결과로 분류된 제2 트랜잭션을 제2 배치 큐에 삽입할 수 있다. 또한, 배치 생성부(430)는 특정 배치 큐(e.g. 제1 배치 큐 or 제2 배치 큐)가 소정의 배치 생성 조건을 만족한다는 판정에 응답하여 상기 특정 배치 큐에 포함된 트랜잭션을 종합하여 배치 트랜잭션을 생성할 수 있다.Next, the batch generation unit 430 synthesizes a plurality of transactions classified by the classification unit 410 to generate a batch transaction. Specifically, the batch generation unit 430 inserts each of the classified transactions into a batch queue corresponding to the classification result. For example, the batch generation unit 430 may insert the first transaction classified as the first classification result into the first batch queue, and insert the second transaction classified as the second classification result into the second batch queue. . In addition, the batch generation unit 430 aggregates the transactions included in the specific batch queue in response to a determination that a specific batch queue (eg, the first batch queue or the second batch queue) satisfies a predetermined batch creation condition, and then batch transactions. Can generate

상기 배치 큐는 배치 트랜잭션을 생성하기 전까지 트랜잭션을 보관하는 장소를 의미하며, 일종의 트랜잭션 버퍼(buffer) 또는 트랜잭션 풀(pool)의 개념으로 이해될 수 있다. 버퍼 큐의 명칭에서 알 수 있듯이, 상기 배치 큐는 큐 기반의 자료구조로 구현될 수 있을 것이나, 본 발명의 범위가 이에 한정되는 것은 아니며, 얼마든지 다양한 형태의 자료구조로 구현될 수 있다.The batch queue means a place to store transactions until a batch transaction is generated, and may be understood as a concept of a kind of transaction buffer or transaction pool. As can be seen from the name of the buffer queue, the batch queue may be implemented as a queue-based data structure, but the scope of the present invention is not limited thereto, and may be implemented as various types of data structures.

상기 배치 생성 조건은 배치 타이머(batch timer)에 기초한 제1 조건, 트랜잭션의 데이터 크기에 기초한 제2 조건, 트랜잭션의 개수에 기초한 제3 조건, 트랜잭션 간의 연관성 존재 여부에 기초한 제4 조건 등을 포함할 수 있다. 또한, 상기 소정의 배치 생성 조건은 상기 제1 조건 내지 상기 제4 조건의 조합에 기초하여 정의될 수 있는 제5 조건을 더 포함할 수도 있다. 이하, 이해의 편의를 제공하기 위해, 각 배치 생성 조건에 따라 배치 트랜잭션이 생성되는 과정을 부연 설명하도록 한다.The batch generation condition may include a first condition based on a batch timer, a second condition based on the data size of the transaction, a third condition based on the number of transactions, a fourth condition based on whether there is an association between transactions, and the like. Can be. In addition, the predetermined batch generation condition may further include a fifth condition that can be defined based on a combination of the first condition to the fourth condition. Hereinafter, in order to provide convenience of understanding, a process in which a batch transaction is generated according to each batch generation condition will be described in detail.

제1 실시예에서, 배치 생성부(430)는 배치 타이머의 만료 이벤트에 응답하여 특정 배치 큐의 트랜잭션을 종합하여 배치 트랜잭션을 생성할 수 있다. 이때, 배치 타이머는 배치 큐 별로 존재할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 각 배치 큐의 타이머 주기는 동일할 수도 있고, 상이할 수도 있다. 예를 들어, 우선순위가 높은 배치 큐의 타이머 주기는 상대적으로 짧게 설정되고, 우선순위가 낮은 배치 큐의 타이머 주기는 상대적으로 길게 설정될 수 있다. 이를 통해, 차등적인 트랜잭션 처리 서비스가 제공될 수 있다. 본 실시예에 따르면, 배치 프로세싱에 따른 트랜잭션 대기 시간이 일정 시간(e.g. 배치 타이머 주기) 내로 제한될 수 있다. 따라서, 배치 프로세싱으로 인해 일부 개별 트랜잭션의 처리가 지연되는 문제가 완화될 수 있다.In the first embodiment, the batch generation unit 430 may generate a batch transaction by synthesizing transactions in a specific batch queue in response to an expiration event of the batch timer. At this time, the batch timer may exist for each batch queue, but the scope of the present invention is not limited thereto. The timer period of each batch queue may be the same or different. For example, the timer period of the batch queue with a high priority may be set relatively short, and the timer period of the batch queue with a low priority may be set relatively long. Through this, a differential transaction processing service can be provided. According to the present embodiment, the transaction waiting time according to the batch processing may be limited within a predetermined time (e.g. batch timer period). Therefore, the problem that processing of some individual transactions is delayed due to batch processing can be alleviated.

제2 실시예에서, 배치 생성부(430)는 특정 배치 큐에 포함된 전체 트랜잭션의 데이터 크기가 임계 값 이상이라는 판정에 응답하여 배치 트랜잭션을 생성할 수 있다. 이때, 상기 전체 트랜잭션의 데이터 크기는 개별 트랜잭션의 데이터 크기의 합으로 산출될 수 있고, 상기 개별 트랜잭션의 데이터 크기는 예를 들어 블록체인에 기록되는 트랜잭션 데이터의 크기를 의미하는 것일 수 있다. 그러나, 본 발명의 범위가 이에 한정되는 것은 아니다. 상기 임계 값은 기 설정된 고정 값 또는 상황에 따라 변동되는 변동 값일 수 있다. 예를 들어, 상기 임계 값은 블록의 최대 크기에 기초하여 설정되는 고정 값일 수 있다. 다른 예를 들어, 상기 임계 값은 해당 배치 큐의 우선순위에 기초하여 설정된 고정 값 또는 변동 값일 수 있다. 또 다른 예를 들어, 상기 임계 값은 배치 프로세싱 장치(100)의 부하가 클수록 더 큰 값으로 설정되는 변동 값일 수 있다. 본 실시예에 따르면, 하나의 배치 트랜잭션에 지나치게 많은 데이터가 포함되는 것이 방지될 수 있는 바, 배치 트랜잭션의 처리 실패 확률이 감소될 수 있다.In the second embodiment, the batch generation unit 430 may generate a batch transaction in response to a determination that the data size of all transactions included in a specific batch queue is greater than or equal to a threshold. At this time, the data size of the entire transaction may be calculated as the sum of the data sizes of the individual transactions, and the data size of the individual transactions may mean, for example, the size of transaction data recorded in the blockchain. However, the scope of the present invention is not limited to this. The threshold value may be a preset fixed value or a fluctuating value that varies depending on the situation. For example, the threshold value may be a fixed value set based on the maximum size of the block. For another example, the threshold value may be a fixed value or a variable value set based on the priority of the corresponding batch queue. For another example, the threshold value may be a variable value that is set to a larger value as the load of the batch processing apparatus 100 increases. According to this embodiment, since it is possible to prevent excessive data from being included in one batch transaction, the probability of processing failure of the batch transaction can be reduced.

제3 실시예에서, 배치 생성부(430)는 특정 배치 큐에 포함된 트랜잭션의 개수가 배치 사이즈의 설정 값을 만족한다는 판정에 응답하여 배치 트랜잭션을 생성할 수 있다. 이때, 상기 설정 값은 상황에 따라 변동되는 변동 값일 수 있다. 예를 들어, 상기 설정 값은 해당 배치 큐의 우선순위가 높을수록 더 작은 값으로 설정되는 변동 값일 수 있다. 다른 예를 들어, 상기 설정 값은 배치 프로세싱 모듈(400)의 부하, 트랜잭션 처리 소요 시간 등과 같은 트랜잭션 처리 상황에 따라 조정되는 변동 값일 수 있다.In the third embodiment, the batch generation unit 430 may generate a batch transaction in response to a determination that the number of transactions included in a specific batch queue satisfies a set value of the batch size. At this time, the set value may be a fluctuation value that fluctuates depending on the situation. For example, the setting value may be a variable value that is set to a smaller value as the priority of the corresponding batch queue is higher. For another example, the set value may be a variable value adjusted according to a transaction processing situation, such as a load of the batch processing module 400 and a transaction processing time.

제4 실시예에서, 배치 생성부(430)는 트랜잭션 간의 연관성에 기초하여 배치 트랜잭션을 생성할 수 있다. 구체적으로, 배치 프로세싱 모듈(400)은 특정 트랜잭션의 연관 트랜잭션이 존재하는지 여부를 판정한다. 이때, 상기 연관 트랜잭션은 상기 특정 트랜잭션과 연관성이 존재하는 트랜잭션을 의미하는 것으로, 예를 들어, 상기 특정 트랜잭션과 동일한 상태 데이터의 식별키를 포함하는 트랜잭션일 수 있다. 즉, 상기 특정 트랜잭션과 동일한 상태 데이터에 접근하는 트랜잭션들은 상기 특정 트랜잭션과 연관성이 존재하는 연관 트랜잭션으로 판정될 수 있다. 연관 트랜잭션이 존재한다고 판정된 경우 배치 생성부(430)는 다양한 방식으로 배치 프로세싱을 수행할 수 있다. 구체적인 예시는 다음과 같다.In the fourth embodiment, the batch generation unit 430 may generate a batch transaction based on the association between transactions. Specifically, the batch processing module 400 determines whether an associated transaction of a specific transaction exists. In this case, the associated transaction means a transaction that has an association with the specific transaction, and may be, for example, a transaction including an identification key of the same state data as the specific transaction. That is, transactions accessing the same state data as the specific transaction may be determined as an associated transaction that has an association with the specific transaction. When it is determined that there is an associated transaction, the batch generation unit 430 may perform batch processing in various ways. The specific example is as follows.

제4-1 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션을 서로 다른 배치 트랜잭션으로 생성하여 처리할 수 있다.In the 4-1 embodiment, the batch generation unit 430 may generate and process the first transaction and the second transaction with association as different batch transactions.

제4-2 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션을 제외한 나머지 트랜잭션을 기초로 배치 트랜잭션을 생성하고, 상기 제1 트랜잭션 및 상기 제2 트랜잭션을 개별적으로 처리할 수 있다.In the 4-2 embodiment, the batch generating unit 430 generates a batch transaction based on the remaining transactions excluding the first transaction and the second transaction, and the first transaction and the second transaction are individually Can be treated as

제4-3 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션 중에서 상기 제1 트랜잭션은 배치 형태로 처리하고, 상기 제2 트랜잭션은 개별적으로 처리할 수 있다. 즉, 배치 생성부(430)는 트랜잭션의 충돌이 일어나지 않는 범위 내에서 연관성이 존재하는 복수의 트랜잭션 중 일부 트랜잭션을 배치 형태로 처리할 수 있다.In the 4-3 embodiment, the batch generation unit 430 may process the first transaction in a batch form among the first and second transactions in which an association exists, and the second transaction may be individually processed. That is, the batch generation unit 430 may process some of the plurality of transactions in which a correlation exists within a range in which no collision of transactions occurs.

제4-4 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션과 제2 트랜잭션이 결합 가능한지 여부를 판정하고, 결합 가능하다는 판정에 응답하여 상기 제1 트랜잭션과 상기 제2 트랜잭션이 결합된 제3 트랜잭션을 생성할 수 있다. 여기서, 상기 제3 트랜잭션의 실행 결과가 상기 제1 트랜잭션 및 상기 제2 트랜잭션을 실행한 결과와 동일하다면, 상기 제3 트랜잭션을 생성하는 방법은 어떠한 방식으로 수행되더라도 무방하다. 또한, 배치 생성부(430)는 상기 제3 트랜잭션을 배치 형태 또는 개별적으로 처리할 수 있다.In the 4-4 embodiment, the batch generation unit 430 determines whether the first transaction and the second transaction, which are related, are combinable, and responds to the determination that they are combinable, the first transaction and the second transaction You can create this combined third transaction. Here, if the execution result of the third transaction is the same as the result of executing the first transaction and the second transaction, the method of generating the third transaction may be performed in any way. In addition, the batch generation unit 430 may process the third transaction in a batch form or individually.

전술한 실시예들에 따르면, 트랜잭션 간의 연관성을 고려하여 충돌이 일어나지 않는 범위 내에서 배치 프로세싱이 이루어질 수 있다. 이에 따라, 트랜잭션 처리의 안정성이 떨어지는 문제가 완화될 수 있다. 이상의 실시예에서, 이해의 편의를 위해, 2개의 트랜잭션 간에 연관성이 존재하는 경우를 가정하여 설명하였으나, 당해 기술 분야의 통상의 기술자라면 3개 이상 다수의 트랜잭션 사이에 연관성이 존재하는 경우에도 동일 또는 유사한 방식으로 처리될 수 있음을 자명하게 이해할 수 있다.According to the above-described embodiments, batch processing may be performed within a range in which collision does not occur in consideration of association between transactions. Accordingly, the problem of poor stability of transaction processing can be alleviated. In the above embodiments, for the convenience of understanding, it has been described on the assumption that there is an association between two transactions, but a person skilled in the art is the same or if there is an association between three or more transactions It can be clearly understood that it can be handled in a similar way.

다음으로, 핸들러부(450)는 블록체인 네트워크(300)와 연동하여 개별 트랜잭션 또는 배치 트랜잭션을 일괄 처리한다. 핸들러부(450)는 송신 핸들러(151) 및 수신 핸들러(153)를 포함할 수 있다.Next, the handler 450 interoperates with the blockchain network 300 to collectively process individual or batch transactions. The handler unit 450 may include a transmission handler 151 and a reception handler 153.

송신 핸들러(151)는 배치 트랜잭션 등 데이터에 대한 전반적인 송신 처리를 수행한다. 구체적으로, 송신 핸들러(151)는 배치 트랜잭션이 생성됨에 응답하여, 상기 생성된 배치 트랜잭션을 블록체인 네트워크(300)로 전달할 수 있다. 또한, 송신 핸들러(151)는 블록체인 노드에 의해 서명된 배치 트랜잭션의 실행 결과(e.g. endorsement)를 합의 노드로 전송하거나, 처리 실패된 배치 트랜잭션을 재시도하는 등의 동작을 더 수행할 수 있다.The transmission handler 151 performs overall transmission processing for data such as a batch transaction. Specifically, the transmission handler 151 may transmit the generated batch transaction to the blockchain network 300 in response to the batch transaction being generated. In addition, the transmission handler 151 may further perform an operation such as sending the execution result (e.g. endorsement) of the batch transaction signed by the blockchain node to the consensus node or retrying the batch transaction that has failed processing.

수신 핸들러(153)는 배치 트랜잭션의 처리 결과 등과 같이 블록체인 네트워크(300)로부터 수신되는 데이터에 대한 전반적인 처리를 수행한다. 구체적으로, 수신 핸들러(153)는 개별 트랜잭션 또는 배치 트랜잭션에 대한 처리 결과를 수신함에 응답하여 상기 처리 결과를 결과 제공부(470)로 제공한다. 또한, 수신 핸들러(153)는 블록체인 네트워크(300)로부터 서명된 배치 트랜잭션의 처리 결과를 수신하고, 이를 송신 핸들러(151)로 전달하는 등의 동작을 더 수행할 수 있다.The reception handler 153 performs overall processing on data received from the blockchain network 300, such as a result of processing a batch transaction. Specifically, the reception handler 153 provides the result of the processing to the result providing unit 470 in response to receiving the result of processing for an individual transaction or a batch transaction. In addition, the reception handler 153 may further perform operations such as receiving the processing result of the signed batch transaction from the blockchain network 300 and passing it to the transmission handler 151.

다음으로, 결과 제공부(470)는 수신 핸들러(153)로부터 개별 트랜잭션 또는 배치 트랜잭션에 대한 처리 결과를 수신하고, 상기 처리 결과를 요청 단말(500)로 제공한다. 보다 자세하게는, 결과 제공부(470)는 배치 트랜잭션에 대한 처리 결과를 개별 트랜잭션 단위로 구분하고, 구분된 처리 결과를 각각의 요청 단말(500)로 제공할 수 있다. 예를 들어, 결과 제공부(470)는 요청 단말(500)의 식별자, 트랜잭션 식별자, 요청 단말(500)의 주소 등으로 구성된 참조 테이블을 생성하고, 상기 참조 테이블을 이용하여 개별 트랜잭션의 처리 결과를 해당 요청 단말(500)로 제공할 수 있다. 다만, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.Next, the result providing unit 470 receives the processing result for the individual transaction or the batch transaction from the reception handler 153, and provides the processing result to the requesting terminal 500. In more detail, the result providing unit 470 may divide the processing result for the batch transaction into individual transaction units, and provide the separated processing result to each requesting terminal 500. For example, the result providing unit 470 generates a reference table consisting of an identifier of the requesting terminal 500, a transaction identifier, an address of the requesting terminal 500, and the like, and uses the reference table to process the result of processing an individual transaction. It can be provided to the request terminal 500. However, the technical scope of the present invention is not limited thereto.

다음으로 배치 사이즈 조정부(490)는 트랜잭션 처리 상황을 모니터링하고, 모니터링 결과를 기초로 배치 사이즈의 설정 값을 가변적으로 조정한다. 또한, 배치 사이즈 조정부(490)는 상기 모니터링 결과를 기초로 배치 프로세싱 기능을 활성화하거나 비활성화할 수 있다. 여기서, 배치 프로세싱 기능을 비활성화하는 것은 배치 사이즈의 설정 값을 "1"로 조정함으로써 수행될 수 있을 것이나, 얼마든지 다른 방식으로 수행되더라도 무방하다.Next, the batch size adjusting unit 490 monitors the transaction processing status, and variably adjusts the setting value of the batch size based on the monitoring result. In addition, the batch size adjusting unit 490 may activate or deactivate the batch processing function based on the monitoring result. Here, deactivating the batch processing function may be performed by adjusting the set value of the batch size to "1", but it may be performed in any other way.

상기 트랜잭션 처리 상황과 연관된 모니터링 지표는 단위 시간 동안 들어오는 트랜잭션 개수, 나가는 트랜잭션 개수, 트랜잭션 처리 소요 시간, 트랜잭션의 대기 시간 등을 포함할 수 있다. 그러나, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.The monitoring indicator associated with the transaction processing status may include the number of incoming transactions during the unit time, the number of outgoing transactions, the transaction processing time, and the transaction waiting time. However, the technical scope of the present invention is not limited thereto.

예를 들어, 배치 사이즈 조정부(490)는 들어오는 트랜잭션의 개수가 임계치 이상인 경우 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.For example, the batch size adjusting unit 490 may activate the batch function or increase the batch size when the number of incoming transactions is greater than or equal to a threshold. In the opposite case, the batch function may be deactivated or the batch size may be reduced.

다른 예를 들어, 배치 사이즈 조정부(490)는 나가는 트랜잭션의 개수가 임계치 이상인 경우 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.For another example, when the number of outgoing transactions is greater than or equal to a threshold, the batch size adjusting unit 490 may activate the batch function or increase the batch size. In the opposite case, the batch function may be deactivated or the batch size may be reduced.

또 다른 예를 들어, 배치 사이즈 조정부(490)는 트랜잭션의 처리 소요 시간이 임계치 이상인 경우, 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.For another example, the batch size adjusting unit 490 may activate the batch function or increase the batch size when the transaction processing time is greater than or equal to a threshold. In the opposite case, the batch function may be deactivated or the batch size may be reduced.

또 다른 예를 들어, 배치 사이즈 조정부(490)는 트랜잭션 대기 시간(e.g. 치 큐에서의 대기 시간)이 임계치 이상인 경우, 배치 기능을 비활성화하거나 배치 사이즈를 감소시킬 수 있다. 반대의 경우, 배치 기능이 활성화되거나 배치 사이즈가 증가될 수 있다.For another example, the batch size adjusting unit 490 may deactivate the batch function or reduce the batch size when the transaction waiting time (e.g. waiting time in the value queue) is greater than or equal to a threshold. In the opposite case, the batch function can be activated or the batch size can be increased.

도 17에 도시된 각 구성 요소 또한 소프트웨어(Software) 또는, FPGA(Field Programmable Gate Array)나 ASIC(Application-Specific Integrated Circuit)과 같은 하드웨어(Hardware)를 의미할 수 있다. 그렇지만, 상기 구성 요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(Addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고, 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다. 상기 구성 요소들 안에서 제공되는 기능은 더 세분화된 구성 요소에 의하여 구현될 수 있으며, 복수의 구성 요소들을 합하여 특정한 기능을 수행하는 하나의 구성 요소로 구현될 수도 있다.Each component shown in FIG. 17 may also refer to software or hardware such as a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). However, the above components are not limited to software or hardware, and may be configured to be in an addressable storage medium, or may be configured to execute one or more processors. The functions provided in the above components may be implemented by more detailed components, or may be implemented as a single component that performs a specific function by combining a plurality of components.

이하에서는, 보다 이해의 편의를 제공하기 위해, 배치 프로세싱 모듈(400)를 통해 쓰기 타입 트랜잭션이 처리되는 과정에 대하여 도 18 및 도 19를 참조하여 설명하도록 한다. 도 18 및 도 19는 배치 사이즈의 설정 값이 "3"인 경우를 예로써 도시하고 있다.Hereinafter, a process in which a write type transaction is processed through the batch processing module 400 will be described with reference to FIGS. 18 and 19 in order to provide a more convenient understanding. 18 and 19 show an example in which the setting value of the batch size is "3".

도 18은 본 발명의 일 실시예에 따라 쓰기 타입 트랜잭션이 처리되는 과정을 도시한다.18 illustrates a process in which a write type transaction is processed according to an embodiment of the present invention.

도 18을 참조하면, 배치 프로세싱 모듈(400)은 복수의 쓰기 타입 트랜잭션(Txw1, Txw2, Txw3)을 종합하여 배치 트랜잭션(410)을 생성한다. 자세하게는, 분류부(410)의 분류 결과에 따라 배치 생성부(430)이 쓰기 타입 트랜잭션(Txw1, Txw2, Txw3)을 동일한 배치 큐에 삽입하고, 상기 배치 큐에 삽입된 쓰기 타입 트랜잭션(Txw1, Txw2, Txw3)의 개수가 배치 사이즈의 설정 값을 만족한다는 판정에 응답하여 배치 트랜잭션(410)이 생성될 수 있다.Referring to FIG. 18, the batch processing module 400 synthesizes a plurality of write type transactions Txw1, Txw2, and Txw3 to generate a batch transaction 410. In detail, according to the classification result of the classification unit 410, the batch generation unit 430 inserts write type transactions Txw1, Txw2, and Txw3 into the same batch queue, and write type transactions Txw1 inserted into the batch queue. A batch transaction 410 may be generated in response to the determination that the number of Txw2 and Txw3) satisfies the set value of the batch size.

다음으로, 배치 프로세싱 모듈(400)은 블록체인 네트워크(300)로 배치 트랜잭션(410)의 처리를 요청한다. 그러면, 블록체인 네트워크(300)를 구성하는 블록체인 노드(320, 330)는 배치 트랜잭션(410)에 대한 합의 프로세스를 수행하고, 배치 트랜잭션(410)의 실행 결과를 블록체인(323, 333) 상에 기록한다.Next, the batch processing module 400 requests processing of the batch transaction 410 to the blockchain network 300. Then, the blockchain nodes (320, 330) constituting the blockchain network (300) perform the consensus process for the batch transaction (410), and the execution result of the batch transaction (410) on the blockchain (323, 333). Record in

도 18에 도시된 바와 같이, 각 블록체인 노드(323, 333)는 배치 트랜잭션(410)을 처리하기 위한 처리 모듈(321, 331)를 포함할 수 있다. 처리 모듈(321, 331)은 스마트 컨트랙트를 이용하여 배치 트랜잭션(410)의 실행 결과를 트랜잭션 별(또는 상태 데이터 별)로 구분하고, 구분된 실행 결과를 기초하여 블록체인을 갱신하는 동작을 수행할 수 있다. 이때, 배치 트랜잭션(410)의 실행 결과는 블록체인 노드의 서명(signature), 개별 트랜잭션의 식별자, 상태 데이터의 식별키(A, B, C)와 값(1, 2, 3) 등을 포함할 수 있다. 따라서, 처리 모듈(321, 331)은 식별키(A, B, C) 및/또는 트랜잭션의 식별자를 이용하여 배치 트랜잭션(410)의 실행 결과를 트랜잭션 별(또는 상태 별)로 구분할 수 있다.18, each blockchain node 323 and 333 may include processing modules 321 and 331 for processing the batch transaction 410. The processing modules 321 and 331 classify the execution result of the batch transaction 410 by transaction (or state data) using a smart contract, and perform an operation of updating the blockchain based on the separated execution result. Can be. At this time, the execution result of the batch transaction 410 may include a signature of a blockchain node, an identifier of an individual transaction, an identification key (A, B, C) and a value (1, 2, 3) of state data, etc. Can be. Accordingly, the processing modules 321 and 331 may classify the execution result of the batch transaction 410 by transaction (or state) by using the identification keys (A, B, C) and / or the identifier of the transaction.

다음으로, 배치 프로세싱 모듈(400)은 블록체인 네트워크(300)로부터 배치 트랜잭션(410)에 대한 처리 결과를 수신하고, 수신된 처리 결과를 해당 요청 단말(500)로 제공한다.Next, the batch processing module 400 receives the processing result for the batch transaction 410 from the blockchain network 300 and provides the received processing result to the corresponding request terminal 500.

이때, 상기 처리 결과가 실패를 가리키는 경우, 배치 프로세싱 모듈(400)의 핸들러부(450)는 배치 트랜잭션(410)의 처리를 재시도할 수 있다.At this time, when the processing result indicates failure, the handler unit 450 of the batch processing module 400 may retry processing of the batch transaction 410.

도 19는 하이퍼레저 패브릭과 같이 별도의 합의 노드가 존재하는 환경에서 쓰기 타입의 배치 트랜잭션이 처리되는 과정을 도시하고 있다. 상기 합의 노드(e.g. 하이퍼레저 패브릭의 "orderer")는 는 스마트 컨트랙트의 실행 결과에 대한 주요 합의 프로세스를 수행하는 노드를 의미한다.19 shows a process in which a write type batch transaction is processed in an environment where a separate consensus node exists, such as a hyperledger fabric. The consensus node (e.g. "orderer" of hyperledger fabric) means a node that performs a main consensus process on the execution result of the smart contract.

도 19에 도시된 바와 같이, 배치 프로세싱 모듈(400)은 배치 트랜잭션(420)을 생성하고, 생성된 배치 트랜잭션(420)을 블록체인 노드(340)로 전송한다. 또한, 배치 프로세싱 모듈(400)은 블록체인 노드(340)로부터 배치 트랜잭션(420)의 실행 결과를 수신한다. 상기 실행 결과는, 전술한 바와 같이, 배치 트랜잭션(420)에 대한 블록체인 노드의 서명, 상태 데이터의 식별키(A, B, C)와 값(1, 2, 3) 등을 포함할 수 있다.As shown in FIG. 19, the batch processing module 400 generates a batch transaction 420 and transmits the generated batch transaction 420 to the blockchain node 340. In addition, the batch processing module 400 receives the execution result of the batch transaction 420 from the blockchain node 340. As described above, the execution result may include the signature of the blockchain node for the batch transaction 420, the identification keys (A, B, C) and the values (1, 2, 3) of the state data, and the like. .

다음으로, 배치 프로세싱 모듈(400)은 상기 수신된 실행 결과를 별도의 합의 노드(360)에게 제출(submit)한다. 그러면, 합의 노드(360)는 블록체인 노드(340)의 실행 결과를 토대로 배치 트랜잭션(420)을 검증하고, 상기 실행 결과를 신규 블록에 기록하며, 신규 블록을 블록체인 네트워크(300) 상에 전파한다. 마지막으로, 신규 블록을 수신한 각 블록체인 노드(340, 350)는 처리 모듈(341, 351)를 통해 배치 트랜잭션(420)의 실행 결과를 트랜잭션 별(또는 상태 데이터 별)로 구분하고, 구분된 실행 결과를 바탕으로 블록체인을 갱신한다.Next, the batch processing module 400 submits the received execution result to a separate consensus node 360. Then, the consensus node 360 verifies the batch transaction 420 based on the execution result of the blockchain node 340, records the execution result in a new block, and propagates the new block on the blockchain network 300. do. Finally, each blockchain node (340, 350) that receives the new block divides the execution result of the batch transaction (420) into transaction-specific (or state data-specific) through processing modules 341 and 351, and separates Blockchain is updated based on the execution result.

도 18 및 도 19를 참조하여 설명한 바와 같이, 배치 프로세싱 모듈(400)을 통해 트랜잭션이 처리되는 경우, 복수의 트랜잭션이 배치 프로세싱을 통해 일괄 처리될 수 있다. 즉, 개별 트랜잭션 단위로 합의 프로세스가 수행되는 것이 아니라, 배치 트랜잭션 단위로 합의 프로세스가 수행됨으로써, 복수의 트랜잭션이 일괄 처리될 수 있다. 이에 따라, 트랜잭션 처리 성능이 급격하게 향상될 수 있다. 이상적인 환경이라면, 트랜잭션 처리 성능은 배치 사이즈에 비례하여 향상될 수 있을 것이다.As described with reference to FIGS. 18 and 19, when a transaction is processed through the batch processing module 400, a plurality of transactions may be batch processed through batch processing. That is, the consensus process is not performed in units of individual transactions, but the consensus process is performed in units of batch transactions, so that a plurality of transactions can be batch processed. Accordingly, the transaction processing performance can be dramatically improved. In an ideal environment, transaction processing performance may be improved in proportion to the batch size.

지금까지 도 16 내지 도 19를 참조하여 블록체인 네트워크의 트랜잭션 처리 성능을 향상시키기 위해 고안된 배치 트랜잭션 모듈(400)에 대하여 상세하게 설명하였다. 이하에서는, 본 발명의 다양한 실시예들에 따른 모듈 또는 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치에 대하여 설명하도록 한다.The batch transaction module 400 designed to improve the transaction processing performance of the blockchain network has been described in detail with reference to FIGS. 16 to 19. Hereinafter, an exemplary computing device capable of implementing modules or devices according to various embodiments of the present invention will be described.

도 20은 본 발명의 몇몇 실시예들에 따른 각종 모듈(e.g. 100, 200, 400) 또는 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치(500)를 나타내는 하드웨어 구성도이다.20 is a hardware configuration diagram illustrating an exemplary computing device 500 capable of implementing various modules (e.g. 100, 200, 400) or devices according to some embodiments of the invention.

도 20을 참조하면, 컴퓨팅 장치(500)는 하나 이상의 프로세서(510), 버스(510), 네트워크 인터페이스(570), 프로세서(510)에 의하여 수행되는 컴퓨터 프로그램을 로드(load)하는 메모리(530)와, 컴퓨터 프로그램(591)을 저장하는 스토리지(590)를 포함할 수 있다. 다만, 도 20에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 20에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다.Referring to FIG. 20, the computing device 500 includes one or more processors 510, a bus 510, a network interface 570, and a memory 530 that loads computer programs performed by the processor 510. And, it may include a storage 590 for storing the computer program 591. However, only components related to the embodiment of the present invention are illustrated in FIG. 20. Accordingly, it can be seen that a person skilled in the art to which the present invention pertains may further include other general-purpose components in addition to the components shown in FIG. 20.

프로세서(510)는 컴퓨팅 장치(500)의 각 구성의 전반적인 동작을 제어한다. 프로세서(510)는 CPU(Central Processing Unit), MPU(Micro Processor Unit), MCU(Micro Controller Unit), GPU(Graphic Processing Unit) 또는 본 발명의 기술 분야에 잘 알려진 임의의 형태의 프로세서를 포함하여 구성될 수 있다. 또한, 프로세서(510)는 본 발명의 실시예들에 따른 방법을 실행하기 위한 적어도 하나의 애플리케이션 또는 프로그램에 대한 연산을 수행할 수 있다. 컴퓨팅 장치(500)는 하나 이상의 프로세서를 구비할 수 있다.The processor 510 controls the overall operation of each component of the computing device 500. The processor 510 includes a CPU (Central Processing Unit), an MPU (Micro Processor Unit), an MCU (Micro Controller Unit), a GPU (Graphic Processing Unit), or any type of processor well known in the art. Can be. Also, the processor 510 may perform operations on at least one application or program for executing the method according to the embodiments of the present invention. Computing device 500 may include one or more processors.

메모리(530)는 각종 데이터, 명령 및/또는 정보를 저장한다. 메모리(530)는 본 발명의 실시예들에 따른 블록체인 기반 조회 서비스 제공 방법을 실행하기 위하여 스토리지(590)로부터 하나 이상의 프로그램(591)을 로드할 수 있다. 메모리는 RAM과 같은 휘발성 메모리로 구현될 수 있을 것이나, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.The memory 530 stores various data, commands and / or information. The memory 530 may load one or more programs 591 from the storage 590 in order to execute a method for providing a blockchain-based inquiry service according to embodiments of the present invention. The memory may be implemented as a volatile memory such as RAM, but the technical scope of the present invention is not limited thereto.

버스(510)는 컴퓨팅 장치(500)의 구성 요소 간 통신 기능을 제공한다. 버스(510)는 주소 버스(Address Bus), 데이터 버스(Data Bus) 및 제어 버스(Control Bus) 등 다양한 형태의 버스로 구현될 수 있다.The bus 510 provides communication functions between components of the computing device 500. The bus 510 may be implemented as various types of buses, such as an address bus, a data bus, and a control bus.

네트워크 인터페이스(570)는 컴퓨팅 장치(500)의 유무선 인터넷 통신을 지원한다. 또한, 네트워크 인터페이스(570)는 인터넷 통신 외의 다양한 통신 방식을 지원할 수도 있다. 이를 위해, 네트워크 인터페이스(570)는 본 발명의 기술 분야에 잘 알려진 통신 모듈을 포함하여 구성될 수 있다.The network interface 570 supports wired and wireless Internet communication of the computing device 500. Also, the network interface 570 may support various communication methods other than Internet communication. To this end, the network interface 570 may include a communication module well known in the technical field of the present invention.

스토리지(590)는 상기 하나 이상의 프로그램(591)을 비임시적으로 저장할 수 있다. 스토리지(590)는 ROM(Read Only Memory), EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM), 플래시 메모리 등과 같은 비휘발성 메모리, 하드 디스크, 착탈형 디스크, 또는 본 발명이 속하는 기술 분야에서 잘 알려진 임의의 형태의 컴퓨터로 읽을 수 있는 기록 매체를 포함하여 구성될 수 있다.The storage 590 may store the one or more programs 591 non-temporarily. The storage 590 is a non-volatile memory such as a read only memory (ROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EPMROM), a flash memory, a hard disk, a removable disk, or well in the art. And any known form of computer-readable recording media.

컴퓨터 프로그램(591)은 메모리(530)에 로드될 때, 프로세서(510)로 하여금 본 발명의 다양한 실시예들에 따른 방법 및/또는 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함할 수 있다. 즉, 프로세서(510)는 상기 하나 이상의 인스트럭션들을 실행함으로써 본 발명의 다양한 실시예들에 따른 방법 및/또는 동작을 수행할 수 있다.Computer program 591, when loaded into memory 530, may include one or more instructions that cause processor 510 to perform a method and / or operation according to various embodiments of the present invention. That is, the processor 510 may perform the method and / or operation according to various embodiments of the present invention by executing the one or more instructions.

예를 들어, 컴퓨터 프로그램(591)이 블록 리스너 모듈(200)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 블록 리스너 모듈(200)이 구현될 수 있다.For example, if the computer program 591 includes one or more instructions to perform the operation of the block listener module 200, the block listener module 200 according to an embodiment of the present invention through the computing device 500 This can be implemented.

다른 예를 들어, 컴퓨터 프로그램(591)이 데이터베이스 모듈(100)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 데이터베이스 모듈(100)이 구현될 수 있다.For another example, if the computer program 591 includes one or more instructions to perform the operation of the database module 100, the database module 100 according to an embodiment of the present invention through the computing device 500 Can be implemented.

또 다른 예를 들어, 컴퓨터 프로그램(591)이 배치 프로세싱 모듈(400)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 배치 프로세싱 모듈(400)이 구현될 수 있다.For another example, if the computer program 591 includes one or more instructions to perform the operation of the batch processing module 400, the batch processing module according to an embodiment of the present invention through the computing device 500 ( 400) can be implemented.

또 다른 예를 들어, 컴퓨터 프로그램(591)이 블록체인 노드의 동작을 의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 블록체인 노드가 구현될 수 있다.For another example, when the computer program 591 includes one or more instructions to perform the operation of the operation of the blockchain node, the blockchain node according to the embodiment of the present invention is provided through the computing device 500. Can be implemented.

지금까지 도 20을 참조하여 본 발명의 다양한 실시예들에 따른 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치(500)에 대하여 설명하였다.So far, an exemplary computing device 500 capable of implementing devices according to various embodiments of the present invention has been described with reference to FIG. 20.

지금까지 도 1 내지 도 20을 참조하여 본 발명의 다양한 실시예들 및 그 실시예들에 따른 효과들은 언급하였다. 본 발명의 효과들은 이상에서 언급한 효과들로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.So far, various embodiments of the present invention and effects according to the embodiments have been described with reference to FIGS. 1 to 20. The effects of the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

지금까지 도 1 내지 도 20을 참조하여 설명된 본 발명의 개념은 컴퓨터가 읽을 수 있는 매체 상에 컴퓨터가 읽을 수 있는 코드로 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록 매체는, 예를 들어 이동형 기록 매체(CD, DVD, 블루레이 디스크, USB 저장 장치, 이동식 하드 디스크)이거나, 고정식 기록 매체(ROM, RAM, 컴퓨터 구비 형 하드 디스크)일 수 있다. 상기 컴퓨터로 읽을 수 있는 기록 매체에 기록된 상기 컴퓨터 프로그램은 인터넷 등의 네트워크를 통하여 다른 컴퓨팅 장치에 전송되어 상기 다른 컴퓨팅 장치에 설치될 수 있고, 이로써 상기 다른 컴퓨팅 장치에서 사용될 수 있다.The concepts of the present invention described so far with reference to FIGS. 1 to 20 may be embodied as computer readable codes on a computer readable medium. The computer-readable recording medium may be, for example, a removable recording medium (CD, DVD, Blu-ray Disc, USB storage device, removable hard disk), or a fixed recording medium (ROM, RAM, computer-equipped hard disk). Can be. The computer program recorded on the computer-readable recording medium may be transmitted to another computing device through a network such as the Internet and installed on the other computing device, and thus used on the other computing device.

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합되거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다.In the above, even if all the components constituting the embodiments of the present invention are described as being combined or operated as one, the present invention is not necessarily limited to these embodiments. That is, within the object scope of the present invention, all of the components may be selectively combined and operated.

도면에서 동작들이 특정한 순서로 도시되어 있지만, 반드시 동작들이 도시된 특정한 순서로 또는 순차적 순서로 실행되어야만 하거나 또는 모든 도시 된 동작들이 실행되어야만 원하는 결과를 얻을 수 있는 것으로 이해되어서는 안 된다. 특정 상황에서는, 멀티태스킹 및 병렬 처리가 유리할 수도 있다. 더욱이, 위에 설명한 실시예들에서 다양한 구성들의 분리는 그러한 분리가 반드시 필요한 것으로 이해되어서는 안 되고, 설명된 프로그램 컴포넌트들 및 시스템들은 일반적으로 단일 소프트웨어 제품으로 함께 통합되거나 다수의 소프트웨어 제품으로 패키지 될 수 있음을 이해하여야 한다.Although the operations in the drawings are shown in a specific order, it should not be understood that the operations must be performed in a specific order or in a sequential order, or that all the illustrated actions must be executed to obtain a desired result. In certain situations, multitasking and parallel processing may be advantageous. Moreover, the separation of various configurations in the above-described embodiments should not be understood as such separation is necessary, and the described program components and systems may generally be integrated together into a single software product or packaged into multiple software products. It should be understood that there is.

이상 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로 이해해야만 한다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.Although the embodiments of the present invention have been described with reference to the accompanying drawings, a person skilled in the art to which the present invention pertains may be implemented in other specific forms without changing the technical concept or essential features of the present invention. Can understand. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and not restrictive. The scope of protection of the present invention should be interpreted by the claims below, and all technical spirits within the equivalent range should be interpreted as being included in the scope of the present invention.

Claims (12)

블록체인 기반으로 조회 서비스를 제공하는 시스템에 있어서,
블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하고, 상기 제1 블록의 데이터 레코드를 데이터베이스 모듈로 전송하는 블록 리스너 모듈; 및
상기 하나 이상의 데이터 레코드를 데이터베이스에 저장하고, 클라이언트 단말의 조회 요청에 응답하여 상기 데이터베이스를 조회하며, 상기 조회 결과를 상기 클라이언트 단말에게 제공하는 데이터베이스 모듈을 포함하되,
상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고,
상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록되는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
In a system that provides inquiry service based on blockchain,
A block listener module that receives a first block of the blockchain from one or more blockchain nodes constituting a blockchain network, and transmits data records of the first block to a database module; And
And a database module storing the one or more data records in a database, querying the database in response to an inquiry request from a client terminal, and providing the inquiry result to the client terminal.
The data record includes a data field and a hash field,
In the hash field, characterized in that a hash value associated with the data field value is recorded.
Blockchain based inquiry service provision system.
제1 항에 있어서,
상기 블록 리스너 모듈은,
블록체인 노드로부터 수신된 블록의 전송 상태 정보를 관리하되,
상기 전송 상태 정보는 상기 수신된 블록의 블록 번호와 상기 수신된 블록이 전송 완료되었는지 여부를 가리키는 플래그 정보를 포함하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 1,
The block listener module,
Manage the transmission status information of the block received from the blockchain node,
The transmission status information includes a block number of the received block and flag information indicating whether the received block has been transmitted,
Blockchain based inquiry service provision system.
제2 항에 있어서,
상기 블록 리스너 모듈은,
상기 제1 블록의 수신에 응답하여, 상기 전송 상태 정보에 상기 제1 블록의 번호와 매칭되는 제1 플래그 정보를 획득하고, 상기 제1 플래그 정보에 기초하여 상기 하나 이상의 데이터 레코드를 상기 데이터베이스 모듈로 전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 2,
The block listener module,
In response to the reception of the first block, obtain first flag information matching the number of the first block in the transmission status information, and based on the first flag information, the one or more data records to the database module Characterized by transmitting,
Blockchain based inquiry service provision system.
제2 항에 있어서,
상기 블록 리스너 모듈은,
상기 데이터베이스 모듈로부터 ACK 메시지를 수신함에 응답하여, 상기 제1 블록의 플래그 정보를 갱신하고,
상기 데이터베이스 모듈로부터 상기 ACK 메시지가 수신되지 않는 경우, 상기 제1 블록을 재전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 2,
The block listener module,
In response to receiving the ACK message from the database module, update the flag information of the first block,
If the ACK message is not received from the database module, characterized in that for retransmitting the first block,
Blockchain based inquiry service provision system.
제2 항에 있어서,
상기 블록 리스너 모듈은,
상기 전송 상태 정보를 참조하여, 상기 제1 블록의 번호보다 낮은 번호를 갖는 블록 중 아직 전송이 완료되지 않은 미전송 블록을 식별하고, 상기 식별된 미전송 블록의 데이터 레코드를 상기 데이터베이스 모듈로 전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 2,
The block listener module,
With reference to the transmission status information, an untransmitted block that has not yet been transmitted among blocks having a number lower than the number of the first block is identified, and the data record of the identified untransmitted block is transmitted to the database module. Characterized by,
Blockchain based inquiry service provision system.
제1 항에 있어서,
상기 블록체인 네트워크는 복수의 채널로 구성되고,
상기 블록 리스너 모듈은,
각 블록체인 노드가 소속된 채널의 정보를 수집하고, 상기 수집된 채널 정보를 기초로 채널 별로 블록 송신을 담당하는 노드를 지정하는 것을 특징을 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 1,
The blockchain network is composed of a plurality of channels,
The block listener module,
Characterized in that it collects information of a channel to which each blockchain node belongs, and designates a node responsible for block transmission for each channel based on the collected channel information.
Blockchain based inquiry service provision system.
제6 항에 있어서,
상기 블록 리스너 모듈은,
담당 채널이 서로 중복되지 않도록 채널 별로 블록 송신을 담당하는 노드를 지정하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
The method of claim 6,
The block listener module,
Characterized in that the node responsible for block transmission for each channel is designated so that the responsible channels do not overlap with each other,
Blockchain based inquiry service provision system.
제6 항에 있어서,
상기 블록 리스너 모듈은,
상기 각 채널 별 블록체인 노드의 개수를 비교하고, 블록체인 노드의 개수가 상대적으로 적은 채널부터 담당 노드를 지정하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
The method of claim 6,
The block listener module,
Comparing the number of blockchain nodes for each channel, and designating a node in charge from a channel having a relatively small number of blockchain nodes,
Blockchain based inquiry service provision system.
제1 항에 있어서,
상기 하나 이상의 블록체인 노드는,
데이터 소스로부터 시간적인 선후 관계를 갖는 제1 데이터와 제2 데이터를 수신함에 응답하여, 상기 제1 데이터와 상기 제1 데이터의 제1 해시 값을 포함하는 제1 데이터 레코드를 상기 블록체인에 기록하고, 상기 제1 해시 값과 상기 제2 데이터를 기초로 상기 제2 데이터의 제2 해시 값을 생성하며, 상기 제2 데이터와 상기 제2 해시 값을 포함하는 제2 데이터 레코드를 상기 블록체인에 기록하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
According to claim 1,
The one or more blockchain nodes,
In response to receiving the first data and the second data having a temporal and sequential relationship from a data source, a first data record including the first hash value of the first data and the first data is recorded on the blockchain and , Generates a second hash value of the second data based on the first hash value and the second data, and records a second data record including the second data and the second hash value in the blockchain Characterized by,
Blockchain based inquiry service provision system.
제9 항에 있어서,
상기 데이터 소스는 IoT(Internet of Things) 디바이스이고,
상기 제1 데이터 및 상기 제2 데이터는 상기 IoT 디바이스에 의해 생성된 데이터인 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
The method of claim 9,
The data source is an Internet of Things (IoT) device,
The first data and the second data is characterized in that the data generated by the IoT device,
Blockchain based inquiry service provision system.
제10 항에 있어서,
제1 IoT 디바이스에 의해 생성된 제1 복수의 데이터 각각에는 제1 식별 값이 포함되고,
제2 IoT 디바이스에 의해 생성된 제2 복수의 데이터 각각에는 제2 식별 값이 포함되며,
상기 데이터베이스 모듈은,
상기 제1 식별 값을 상기 제1 복수의 데이터에 매칭하여 상기 데이터베이스에 저장하고, 상기 제2 식별 값을 상기 제2 복수의 데이터에 매칭하여 상기 데이터베이스에 저장하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.
The method of claim 10,
Each of the first plurality of data generated by the first IoT device includes a first identification value,
Each of the second plurality of data generated by the second IoT device includes a second identification value,
The database module,
The first identification value is matched to the first plurality of data and stored in the database, and the second identification value is matched to the second plurality of data and stored in the database.
Blockchain based inquiry service provision system.
조회 서비스 제공 시스템에서 블록체인 기반으로 조회 서비스를 제공하는 방법에 있어서,
블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하는 단계;
상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하는 단계; 및
클라이언트 단말의 조회 요청에 응답하여, 상기 데이터베이스를 조회하고, 상기 조회 결과를 상기 클라이언트 단말로 제공하는 단계를 포함하되,
상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고,
상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록되는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 방법.
In the method of providing the inquiry service based on the blockchain in the inquiry service provision system,
Receiving a first block of the blockchain from one or more blockchain nodes constituting a blockchain network;
Storing data records of the first block in a database; And
In response to the inquiry request of the client terminal, including the step of querying the database, and providing the inquiry result to the client terminal,
The data record includes a data field and a hash field,
In the hash field, characterized in that a hash value associated with the data field value is recorded.
Blockchain based inquiry service provision method.
KR1020180130535A 2018-10-30 2018-10-30 System for providing retrieval service based on blockchain and method of the same KR102448787B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180130535A KR102448787B1 (en) 2018-10-30 2018-10-30 System for providing retrieval service based on blockchain and method of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180130535A KR102448787B1 (en) 2018-10-30 2018-10-30 System for providing retrieval service based on blockchain and method of the same

Publications (2)

Publication Number Publication Date
KR20200048440A true KR20200048440A (en) 2020-05-08
KR102448787B1 KR102448787B1 (en) 2022-09-28

Family

ID=70677694

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180130535A KR102448787B1 (en) 2018-10-30 2018-10-30 System for providing retrieval service based on blockchain and method of the same

Country Status (1)

Country Link
KR (1) KR102448787B1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859456A (en) * 2020-07-30 2020-10-30 重庆倍来电新能源有限公司 Fully trusted data system solution
CN112632121A (en) * 2020-12-15 2021-04-09 京东数字科技控股股份有限公司 Block chain data acquisition method and device
CN113129146A (en) * 2021-03-31 2021-07-16 南京质子链科技有限公司 Intelligent contract transaction processing method, equipment and storage medium
KR20210145415A (en) * 2020-05-25 2021-12-02 한국전자통신연구원 Apparatus and Method for Providing Sensor Data based on Blockchain
CN113792102A (en) * 2021-08-03 2021-12-14 德方智链科技(深圳)有限公司 Service processing method based on block chain, electronic device and storage medium
KR102362855B1 (en) * 2020-12-14 2022-02-14 (주)지엠티 Method and apparatus for ensuring continuity and forgery prevention of exchange data between ships and land stations based on blockchain and maritime digital platform system
CN116645116A (en) * 2023-06-12 2023-08-25 碳融汇(北京)技术有限公司 Painting and calligraphy collection traceability system based on block chain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180022507A (en) 2016-08-24 2018-03-06 김보석 Method for providing document delivery service that is based on the block chain
KR20180085570A (en) * 2017-01-19 2018-07-27 주식회사 케이티 Apparatus for managing data using block chain and method thereof
KR20180113140A (en) * 2017-04-05 2018-10-15 삼성에스디에스 주식회사 System for processing data based on blockchain and Operating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180022507A (en) 2016-08-24 2018-03-06 김보석 Method for providing document delivery service that is based on the block chain
KR20180085570A (en) * 2017-01-19 2018-07-27 주식회사 케이티 Apparatus for managing data using block chain and method thereof
KR20180113140A (en) * 2017-04-05 2018-10-15 삼성에스디에스 주식회사 System for processing data based on blockchain and Operating method thereof

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210145415A (en) * 2020-05-25 2021-12-02 한국전자통신연구원 Apparatus and Method for Providing Sensor Data based on Blockchain
CN111859456A (en) * 2020-07-30 2020-10-30 重庆倍来电新能源有限公司 Fully trusted data system solution
KR102362855B1 (en) * 2020-12-14 2022-02-14 (주)지엠티 Method and apparatus for ensuring continuity and forgery prevention of exchange data between ships and land stations based on blockchain and maritime digital platform system
CN112632121A (en) * 2020-12-15 2021-04-09 京东数字科技控股股份有限公司 Block chain data acquisition method and device
CN112632121B (en) * 2020-12-15 2024-04-16 京东科技控股股份有限公司 Block chain data acquisition method and device
CN113129146A (en) * 2021-03-31 2021-07-16 南京质子链科技有限公司 Intelligent contract transaction processing method, equipment and storage medium
CN113129146B (en) * 2021-03-31 2023-11-24 南京质子链科技有限公司 Intelligent contract transaction processing method, equipment and storage medium
CN113792102A (en) * 2021-08-03 2021-12-14 德方智链科技(深圳)有限公司 Service processing method based on block chain, electronic device and storage medium
CN116645116A (en) * 2023-06-12 2023-08-25 碳融汇(北京)技术有限公司 Painting and calligraphy collection traceability system based on block chain
CN116645116B (en) * 2023-06-12 2024-03-15 知晓(北京)通信科技有限公司 Painting and calligraphy collection traceability system based on block chain

Also Published As

Publication number Publication date
KR102448787B1 (en) 2022-09-28

Similar Documents

Publication Publication Date Title
KR102448787B1 (en) System for providing retrieval service based on blockchain and method of the same
US11544102B2 (en) Apparatus and method for batch processing for blockchain transactions
US10867062B2 (en) Adaptive permission token
US10261853B1 (en) Dynamic replication error retry and recovery
US9542404B2 (en) Subpartitioning of a namespace region
US11526494B2 (en) Blockchain-based computing system and method for managing transaction thereof
US8849776B2 (en) Method and system for resolving data inconsistency
US9563426B1 (en) Partitioned key-value store with atomic memory operations
WO2021068351A1 (en) Cloud-storage-based data transmission method and apparatus, and computer device
US9483482B2 (en) Partitioning file system namespace
KR102450411B1 (en) Method and apparatus for prcocessing transaction based on bllockchain and system tehereof
US20180329781A1 (en) Data access during data recovery
CN111344706A (en) Optimization of high volume transaction performance over blockchains
KR102654689B1 (en) Accelerated processing apparatus for transaction considering transaction failure probability and method thereof
JP2018506095A (en) System for efficient processing of transaction requests related to database accounts
WO2017088572A1 (en) Data processing method, device, and system
US11507565B2 (en) Accelerated processing apparatus for transaction and method thereof
US10452644B2 (en) Computer system, method for verifying data, and computer
US10140033B2 (en) Apparatus, system, and method for searching compressed data
US11314813B2 (en) Apparatus for guaranteeing integrity of state database in blockchain-based environment and method thereof
EP3905068A1 (en) A method and system of archiving a blockchain
US11467906B2 (en) Storage system resource rebuild based on input-output operation indicator
US10503409B2 (en) Low-latency lightweight distributed storage system
CN114089924A (en) Block chain account book data storage system and method
US20160078050A1 (en) Facilitating Handling Of Crashes In Concurrent Execution Environments Of Server Systems While Processing User Queries For Data Retrieval

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant