KR102448787B1 - 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 PDFInfo
- Publication number
- KR102448787B1 KR102448787B1 KR1020180130535A KR20180130535A KR102448787B1 KR 102448787 B1 KR102448787 B1 KR 102448787B1 KR 1020180130535 A KR1020180130535 A KR 1020180130535A KR 20180130535 A KR20180130535 A KR 20180130535A KR 102448787 B1 KR102448787 B1 KR 102448787B1
- Authority
- KR
- South Korea
- Prior art keywords
- block
- data
- blockchain
- batch
- transaction
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements 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/1607—Details of the supervisory signal
- H04L1/1628—List acknowledgements, i.e. the acknowledgement message consisting of a list of identifiers, e.g. of sequence numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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
블록체인 기반으로 조회 서비스를 제공하는 시스템이 제공된다. 상기 시스템은, 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하고, 상기 제1 블록의 데이터 레코드를 데이터베이스 모듈로 전송하는 블록 리스너 모듈 및 상기 하나 이상의 데이터 레코드를 데이터베이스에 저장하고, 클라이언트 단말의 조회 요청에 응답하여 상기 데이터베이스를 조회하며, 상기 조회 결과를 상기 클라이언트 단말에게 제공하는 데이터베이스 모듈을 포함하되, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.A system that provides inquiry services based on blockchain is provided. The system receives the first block of the block chain from one or more block chain nodes constituting the block chain network, and transmits the data record of the first block to the database module, and a block listener module and the one or more data records. A database module for storing in a database, querying the database in response to a query request from a client terminal, and providing the query result to the client terminal, wherein the data record includes a data field and a hash field, and the hash A hash value associated with the data field value may be recorded in the field.
Description
본 발명은 블록체인 기반 조회 서비스 제공 시스템 및 그 시스템의 동작 방법에 관한 것이다. 보다 자세하게는, 블록체인에 기록된 다양한 데이터에 대해 고속의 조회 서비스를 제공할 수 있는 블록체인 기반의 조회 서비스 제공 시스템 및 그 시스템에서 수행되는 방법에 관한 것이다.The present invention relates to a system for providing a blockchain-based inquiry service and an operating method of the system. More specifically, it relates to a blockchain-based inquiry service providing system that can provide a high-speed inquiry service for various data recorded in the blockchain, and a method performed in the system.
블록체인(blockchain)은 지속적으로 증가하는 데이터를 특정 단위의 블록에 기록하고, P2P(peer-to-peer) 네트워크를 구성하는 각각의 노드들이 상기 블록을 체인 형태의 자료 구조로 관리하는 데이터 관리 기술 또는 상기 체인 형태의 자료 구조로 구성된 데이터 그 자체를 의미한다. 이때, 체인 형태의 자료 구조로 구성된 블록체인은, 중앙 시스템 없이 각각의 노드에서 분산 원장(distributed ledger) 형태로 운영된다.Blockchain is a data management technology in which continuously increasing data is recorded in a specific unit block, and each node constituting a peer-to-peer (P2P) network manages the block as a chain-type data structure. Or, it means the data itself composed of the chain-type data structure. At this time, the blockchain composed of a chain-type data structure is operated in the form of a distributed ledger at each node without a central system.
블록체인 네트워크를 구성하는 각각의 블록체인 노드는 도 1에 도시된 바와 같은 체인 형태의 자료 구조로 블록들을 관리한다. 여기서, 각 블록에는 이전 블록에 대한 해시 값이 기록되며, 상기 해시 값을 통해 이전 블록이 참조될 수 있다. 따라서, 블록이 쌓일수록 블록 내에 기록된 데이터의 위변조는 어려워지고, 분산된 환경에서도 데이터의 무결성(integrity)이 보장될 수 있다.Each block chain node constituting the block chain network manages blocks in a chain-type data structure as shown in FIG. 1 . Here, in each block, a hash value for the previous block is recorded, and the previous block can be referenced through the hash value. Accordingly, as blocks are stacked, forgery of data recorded in blocks becomes more difficult, and data integrity can be guaranteed even in a distributed environment.
최근에는, IoT(Internet of Things) 분야에 블록체인 기술을 접목하여, 데이터의 무결성을 보장하려는 시도가 늘어나고 있다. 그러나, 블록체인 기술의 몇 가지 한계점으로 인해, IoT 분야에 블록체인 기술을 적용하는데 어려움을 겪고 있는 실정이다.Recently, attempts to ensure data integrity by applying block chain technology to the Internet of Things (IoT) field are increasing. However, due to some limitations of blockchain technology, it is difficult to apply blockchain technology to the IoT field.
첫 번째 한계점은 블록체인의 조회 성능에 관한 것이다. 블록체인의 조회 성능은 일반적인 데이터베이스와 비교할 때 매우 낮은 수준이다. 더욱이, 다수의 블록에 분산되어 있는 IoT 데이터를 조회하는 경우, 다수의 블록에 액세스하는 시간으로 인해 조회 성능은 더욱 감소될 수 있다.The first limitation relates to the query performance of the blockchain. The query performance of blockchain is very low compared to general databases. Moreover, in the case of inquiring 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 query 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 search functions, but there are also many differences compared to existing databases.
본 발명이 해결하고자 하는 기술적 과제는, 블록체인에 기록된 방대한 데이터에 대해 고성능의 조회 서비스를 제공할 수 있는 시스템 및 그 시스템에서 수행되는 방법을 제공하는 것이다.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 in a block chain and a method performed in the system.
본 발명이 해결하고자 하는 다른 기술적 과제는, 고성능의 조회 서비스를 제공함과 동시에 데이터 무결성을 보장할 수 있는 시스템 및 그 시스템에서 수행되는 방법을 제공하는 것이다.Another technical problem to be solved by the present invention is to provide a system capable of ensuring 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 블록의 데이터 레코드를 데이터베이스 모듈로 전송하는 블록 리스너 모듈 및 상기 하나 이상의 데이터 레코드를 데이터베이스에 저장하고, 클라이언트 단말의 조회 요청에 응답하여 상기 데이터베이스를 조회하며, 상기 조회 결과를 상기 클라이언트 단말에게 제공하는 데이터베이스 모듈을 포함할 수 있다. 이때, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.In order to solve the above technical problem, the block chain-based inquiry service providing system according to an embodiment of the present invention receives the first block of the block chain from one or more block chain nodes constituting the block chain network, and A block listener module that transmits one block of data records to a database module, stores the one or more data records in a database, inquires the database in response to a query request from a client terminal, and provides the query result to the client terminal It may include a database module. In this case, the data record may include 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 the block received from the block chain node, wherein the transmission status information indicates the block number of the received block and whether the received block has been transmitted. Flag information may be included.
일 실시예에서, 상기 블록 리스너 모듈은, 상기 제1 블록의 수신에 응답하여, 상기 전송 상태 정보에 상기 제1 블록의 번호와 매칭되는 제1 플래그 정보를 획득하고, 상기 제1 플래그 정보에 기초하여 상기 하나 이상의 데이터 레코드를 상기 데이터베이스 모듈로 전송할 수 있다.In one embodiment, the block listener module, in response to receiving the first block, obtains first flag information matching the number of the first block in the transmission state information, based on the first flag information to transmit the one or more data records to the database module.
일 실시예에서, 상기 블록 리스너 모듈은, 상기 데이터베이스 모듈로부터 ACK 메시지를 수신함에 응답하여, 상기 제1 블록의 플래그 정보를 갱신하고, 상기 데이터베이스 모듈로부터 상기 ACK 메시지가 수신되지 않는 경우, 상기 제1 블록을 재전송할 수 있다.In one embodiment, the block listener module, in response to receiving the ACK message from the database module, updates the flag information of the first block, and when the ACK message is not received from the database module, the first Blocks can be retransmitted.
일 실시예에서, 상기 블록 리스너 모듈은, 상기 전송 상태 정보를 참조하여, 상기 제1 블록의 번호보다 낮은 번호를 갖는 블록 중 아직 전송이 완료되지 않은 미전송 블록을 식별하고, 상기 식별된 미전송 블록의 데이터 레코드를 상기 데이터베이스 모듈로 전송할 수 있다.In an embodiment, the block listener module identifies, among blocks having a number lower than the number of the first block, a non-transmission block that has not yet been transmitted, and the identified non-transmission module refers to the transmission state information. A data record of a block may be transmitted to the database module.
일 실시예에서, 상기 블록체인 네트워크는 복수의 채널로 구성되고, 상기 블록 리스너 모듈은, 각 블록체인 노드가 소속된 채널의 정보를 수집하고, 상기 수집된 채널 정보를 기초로 채널 별로 블록 송신을 담당하는 노드를 지정할 수 있다.In one embodiment, the block chain network is composed of a plurality of channels, and the block listener module collects information on a channel to which each block chain node belongs, and performs block transmission for each channel based on the collected channel information. You can designate the node in charge.
일 실시예에서, 상기 블록 리스너 모듈은, 담당 채널이 서로 중복되지 않도록 채널 별로 블록 송신을 담당하는 노드를 지정할 수 있다.In an embodiment, the block listener module may designate a node in charge of block transmission for each channel so that the corresponding channels do not overlap with each other.
일 실시예에서, 상기 블록 리스너 모듈은, 상기 각 채널 별 블록체인 노드의 개수를 비교하고, 블록체인 노드의 개수가 상대적으로 적은 채널부터 담당 노드를 지정할 수 있다.In an embodiment, the block listener module may compare the number of block chain nodes for each channel, and designate a responsible node from a channel having a relatively small number of block chain nodes.
일 실시예에서, 상기 하나 이상의 블록체인 노드는, 데이터 소스로부터 시간적인 선후 관계를 갖는 제1 데이터와 제2 데이터를 수신함에 응답하여, 상기 제1 데이터와 상기 제1 데이터의 제1 해시 값을 포함하는 제1 데이터 레코드를 상기 블록체인에 기록하고, 상기 제1 해시 값과 상기 제2 데이터를 기초로 상기 제2 데이터의 제2 해시 값을 생성하며, 상기 제2 데이터와 상기 제2 해시 값을 포함하는 제2 데이터 레코드를 상기 블록체인에 기록할 수 있다.In an embodiment, the one or more blockchain nodes, in response to receiving the first data and the second data having a temporal precedence relationship from a data source, obtain the first data and a first hash value of the first data. writing a first data record including a first data record to the block chain, generating a second hash value of the second data based on the first hash value and the second data, and generating a second hash value of the second data and the second hash value A second data record including
상술한 기술적 과제를 해결하기 위한 본 발명의 다른 실시예에 따른 블록체인 기반 조회 서비스 제공 방법은, 조회 서비스 제공 시스템에서 블록체인 기반으로 조회 서비스를 제공하는 방법에 있어서, 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하는 단계, 상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하는 단계 및 클라이언트 단말의 조회 요청에 응답하여, 상기 데이터베이스를 조회하고, 상기 조회 결과를 상기 클라이언트 단말로 제공하는 단계를 포함할 수 있다. 이때, 상기 데이터 레코드는 데이터 필드와 해시 필드를 포함하고, 상기 해시 필드에는 상기 데이터 필드 값과 연관된 해시 값이 기록될 수 있다.A block chain-based inquiry service providing method according to another embodiment of the present invention for solving the above-described technical problem is a method for providing an inquiry service based on a block chain in an inquiry service providing system, one of the components constituting a blockchain network Receiving the first block of the block chain from the above block chain node, storing the data record of the first block in a database, and in response to a query request from a client terminal, query the database, and retrieve the query result It may include providing to the client terminal. In this case, the data record may include 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, the step of receiving the first block of the block chain from one or more block chain nodes constituting the block chain network , storing the data record of the first block in a database and in response to a query request from a client terminal, querying the database, and providing the query result to the client terminal. may be stored on the medium. In this case, the data record may include 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 block chain that can be referenced in some embodiments of the present invention.
2 to 4 are configuration diagrams for explaining an exemplary environment to which a block chain-based inquiry service providing system according to an embodiment of the present invention can be applied.
5 is a flowchart for explaining a process of storing block chain data in a database in a block chain-based inquiry 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 block chain node according to an embodiment of the present invention.
8 is a flowchart illustrating a process of processing an inquiry request in a block chain-based inquiry 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 a detailed function of a block listener module according to an embodiment of the present invention.
12 is an exemplary diagram of transmission state 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 block chain 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 diagrams for explaining a process of processing a batch transaction 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 according to 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 of achieving them will become apparent with reference to the embodiments described below in detail in conjunction 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 these embodiments allow the disclosure of the present invention to be complete, and common knowledge in the technical field to which the present invention pertains It is provided to fully inform those who have the scope of the invention, and the present invention is only defined by the scope of the claims.
각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.In adding reference numerals to the components of each drawing, it should be noted that the same components are given the same reference numerals as much as possible even though they are indicated on different drawings. In addition, in describing the present invention, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다.Unless otherwise defined, all terms (including technical and scientific terms) used herein may be used with the meaning commonly understood by those of ordinary skill in the art to which the present invention belongs. In addition, terms defined in a commonly used dictionary are not to be interpreted ideally or excessively unless clearly defined in particular. The terminology used herein is for the purpose of describing the embodiments and is not intended to limit the present invention. In this specification, the singular also includes the plural, unless specifically stated otherwise 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), (b), etc. may be used. These terms are only for distinguishing the elements from other elements, and the essence, order, or order of the elements are not limited by the terms. When it is described that a component is “connected”, “coupled” or “connected” to another component, the component may be directly connected or connected to the other component, but another component is between each component. It should be understood that elements may be “connected,” “coupled,” or “connected.”
명세서에서 사용되는 "포함한다 (comprises)" 및/또는 "포함하는 (comprising)"은 언급된 구성 요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성 요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.As used herein, "comprises" and/or "comprising" refers to the presence of one or more other components, steps, operations and/or elements mentioned. or addition is not excluded.
본 명세서에 대한 설명에 앞서, 본 명세서에서 사용되는 몇몇 용어들에 대하여 명확하게 하기로 한다.Prior to the description of the present specification, some terms used in the present specification will be clarified.
본 명세서에서, 블록체인 또는 블록체인 데이터란 블록체인 네트워크를 구성하는 각각의 블록체인 노드가 유지하는 데이터로, 적어도 하나의 블록이 체인 형태의 자료 구조로 구성되는 데이터를 가리킨다. 블록체인 시스템에서, 모든 블록체인 노드는 동일한 블록체인 데이터를 유지한다. 단, 멀티 채널(multi-channel) 기능을 지원하는 블록체인 시스템(e.g. 하이퍼레저 패브릭)에서는, 동일한 채널에 속한 블록체인 노드들끼리만 동일한 블록체인 데이터를 유지하게 된다.In this specification, the block chain or block chain data refers to data maintained by each block chain node constituting the block chain network, and data in which at least one block is composed of a chain-type data structure. In a blockchain system, all blockchain nodes maintain the same blockchain data. However, in a blockchain system that supports multi-channel functions (e.g. Hyperledger Fabric), only blockchain nodes belonging to the same channel maintain the same blockchain data.
본 명세서에서, 블록체인 네트워크란, 블록체인 알고리즘(또는 프로토콜)에 따라 동작하는 복수의 블록체인 노드로 구성된 P2P(peer-to-peer) 구조의 네트워크를 의미한다.In this specification, a blockchain network refers to a peer-to-peer (P2P) network composed of a plurality of blockchain nodes operating according to a blockchain algorithm (or protocol).
본 명세서에서, 블록체인 노드란, 블록체인 네트워크를 구성하고 블록체인 알고리즘(또는 프로토콜)에 따라 동작하는 컴퓨팅 노드를 의미한다. 상기 컴퓨팅 노드는 물리적 장치로 구현될 수 있으나, 가상 머신(virtual machine)과 같이 논리적 장치로 구현될 수도 있다. 상기 컴퓨팅 노드가 가상 머신으로 구현되는 경우, 하나의 물리적 장치에 복수의 블록체인 노드가 포함될 수도 있다.As used herein, a blockchain node refers to a computing node that constitutes 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 blockchain transaction refers to any action that causes a state change (e.g. increase/decrease in balance, transfer of assets) in a blockchain environment, and state data recorded in the blockchain. It may refer to all actions to be viewed or data indicating those actions. For example, the transaction may include both writing specific data to the block chain and reading specific data recorded in the block chain. The transaction may be divided into a write-type transaction (e.g. a transaction for adding, modifying, or deleting state data) and a read-type transaction (e.g. a transaction for inquiring the state data). Of course, various types of transactions (e.g. execution) may exist in addition to read and write types depending on the blockchain platform, and in such a case, the transaction may include all types of transactions. Also, in the art, it may be used interchangeably with terms such as a query of the read-type transaction. The transaction can be executed through a smart contract (e.g. access to the block chain through functions and variables defined in the smart contract), but this may vary depending on the block chain platform.
본 명세서에서, 스마트 컨트랙트(smart contract)란, 블록체인 시스템에서 트랜잭션 처리에 이용되는 스크립트 또는 소프트웨어 코드를 의미한다. 보다 구체적으로, 상기 스마트 컨트랙트는 트랜잭션 처리에 이용되는 각종 조건, 상태, 상기 조건에 따른 행위를 프로그래밍 방식으로 작성한 코드로, 예를 들어, 이더리움의 스마트 컨트랙트, 하이퍼레저 패브릭의 체인코드(chain code) 등을 포함할 수 있다. 블록체인 시스템에서, 블록체인 노드는 블록체인을 통해 스마트 컨트랙트를 공유할 수 있다.In this specification, a smart contract refers to a script or software code used for transaction processing in a block chain system. More specifically, the smart contract is a code programmatically writing various conditions, states, and actions according to the conditions used for transaction processing, for example, smart contracts of Ethereum and chain code of Hyperledger Fabric. ) and the like. In a blockchain system, blockchain nodes can share smart contracts through the blockchain.
본 명세서에서, 이력 데이터(historical data)란, 시간적 순서 관계를 갖는 모든 종류의 데이터를 총칭한다. 상기 이력 데이터의 예로는 IoT 데이터와 같은 각종 시계열 데이터, 버전 개념을 갖는 데이터 등을 포함할 수 있다.In this specification, historical data refers to all types 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 this specification, a data record means a data unit having a plurality of data fields. For example, in the block chain structure shown in FIG. 1, individual transaction data included in the body of each block may correspond to one data record.
본 명세서에서, 인스트럭션(instruction)이란, 기능을 기준으로 묶인 일련의 명령어들로서 컴퓨터 프로그램의 구성 요소이자 프로세서(processor)에 의해 실행되는 것을 가리킨다.In the present specification, an instruction refers to a series of instructions grouped based on a function, which is a component of a computer program and is executed by a processor.
이하, 본 발명의 몇몇 실시예들에 대하여 첨부된 도면에 따라 상세하게 설명한다.Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 2는 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)이 적용될 수 있는 예시적인 환경을 도시한다. 특히, 도 2는 블록체인을 통해 관리되는 데이터를 제공하는 데이터 소스(data source)가 IoT 디바이스인 것을 예로써 도시하고 있다. 그러나, 이는 실시예에 따라 얼마든지 달라질 수 있으며, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.2 shows an exemplary environment to which the blockchain-based inquiry
도 2에 도시된 바와 같이, 상기 예시적인 환경은 조회 서비스 제공 시스템(10), 하나 이상의 IoT 디바이스(20-1 내지 20-n) 및 하나 이상의 클라이언트 단말(30)을 포함할 수 있다. 단, 이는 본 발명의 목적을 달성하기 위한 바람직한 실시예일뿐이며, 필요에 따라 일부 구성 요소가 추가되거나 삭제될 수 있음은 물론이다.As shown in FIG. 2 , the exemplary environment may include a query
상기 예시적인 환경에서, 블록체인 기반 조회 서비스 제공 시스템(10)은 하나 이상의 클라이언트 단말(30)에게 블록체인에 기록된 데이터에 대한 고속의 조회 서비스를 제공하는 시스템이다.In the exemplary environment, the blockchain-based inquiry
도 3 또는 도 4에 도시된 바와 같이, 조회 서비스 제공 시스템(10)은 복수의 블록체인 노드로 구성된 블록체인 네트워크(300), 블록 리스너 모듈(200) 및 데이터베이스 모듈(100)을 포함할 수 있다. 단, 도 3 또는 도 4에 도시된 조회 서비스 제공 시스템(10)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다.3 or 4 , the inquiry
가령, 블록 리스너 모듈(200)과 데이터베이스 모듈(100))은 각각 별개의 컴퓨팅 장치로 구현될 수 있고, 동일한 컴퓨팅 장치 내에서 서로 다른 로직(logic)의 형태로 구현될 수 있다. 또한, 블록 리스너 모듈(200)과 하나 이상의 블록체인 노드 또한 동일한 컴퓨팅 장치 내에서 서로 다른 로직의 형태로 구현될 수 있다.For example, the
여기서, 상기 컴퓨팅 장치는, 노트북, 데스크톱(desktop), 랩탑(laptop) 등이 될 수 있으나, 이에 국한되는 것은 아니며 컴퓨팅 기능 및 통신 기능이 구비된 모든 종류의 장치를 포함할 수 있다. 상기 컴퓨팅 장치의 일 예는 도 20을 참조하도록 한다.Here, the computing device may be a notebook computer, a desktop computer, a laptop computer, and the like, but is not limited thereto and may include any type of device equipped with a computing function and a communication function. An example of the computing device will be referred to FIG. 20 .
또한, 실제 물리적 환경에서 상기 각각의 구성 요소들은 복수의 세부 기능 요소로 분리되는 형태로 구현될 수도 있다. 예컨대, 블록 리스너 모듈(200) 또는 데이터베이스 모듈(100)의 제1 기능은 제1 컴퓨팅 장치에서 구현되고, 제2 기능은 제2 컴퓨팅 장치에서 구현될 수도 있다. 이하, 조회 서비스 제공 시스템(10)의 각 구성 요소에 대하여 설명한다.In addition, in an actual physical environment, each of the components may be implemented in a form separated into a plurality of detailed functional elements. For example, a first function of the
블록체인 네트워크(300)는 다수의 블록체인 노드로 구성된 P2P 구조의 네트워크를 의미한다. 도 3에 도시된 바와 같이, 블록체인 네트워크(300)는 하나 이상의 IoT 디바이스(20-1 내지 20-n)가 제공하는 IoT 데이터를 블록체인에 기록하고 관리한다. 전술한 바와 같이, 상기 IoT 데이터는 시간적 선후 관계를 갖는 이력 데이터(historical data)이다. 블록체인 네트워크(300) 상에 복수의 채널이 형성된 경우라면, 각 채널 별로 별도의 블록체인이 관리되며, 각 채널에 속한 블록체인 노드 간에 합의 프로세스가 이루어진다.The
다음으로, 블록 리스너 모듈(200)은 블록체인 네트워크(300)로부터 블록을 수신하고, 상기 블록의 데이터를 데이터베이스 모듈(100)로 전달하는 모듈(300)이다. 블록 리스너 모듈(200)의 세부 기능에 대한 자세한 설명은 도 11 내지 도 15를 참조하여 후술하도록 한다.Next, the
다음으로, 데이터베이스 모듈(100))은 블록 리스너 모듈(200)로부터 수신한 데이터를 데이터베이스(이하, "DB")에 저장하고, 데이터베이스 쿼리(이하, "DB 쿼리")에 기반한 조회 서비스를 제공한다. 이때, 상기 DB는 관계형 DB, 객체지향 DB 등 어떠한 형태로 구현되더라도 무방하다.Next, the database module 100) stores the data received from the
도 4에 도시된 바와 같이, 데이터베이스 모듈(100)은 클라이언트 단말(30)로부터 DB 쿼리를 수신하고, 상기 DB 쿼리에 대한 조회 결과를 제공할 수 있다. 데이터베이스 모듈(100)을 통해 제공되는 조회 서비스는 다양한 이점을 갖는다. 첫 번째 이점은 DB 쿼리를 통해 강력한 조회 기능이 지원될 수 있다는 것이고, 두 번째 이점은 DB를 이용함으로써 블록체인에 비해 훨씬 더 빠른 조회 서비스가 제공될 수 있다는 것이다.As shown in FIG. 4 , the
다만, 별도의 데이터베이스 모듈(100)을 통해 조회 서비스를 제공하는 경우, 데이터베이스 모듈(100)에 대한 신뢰성(즉, DB에 저장된 데이터의 무결성)이 보장될 필요가 있다. 이와 관련된 실시예는 도 5 내지 도 10을 참조하여 후술하도록 한다.However, when the inquiry service is provided through a
도 4에 도시된 바와 같이, 클라이언트 단말(30)은 블록체인에 기록된 데이터에 대해 직접적인 조회를 수행할 수도 있다.As shown in FIG. 4 , the
조회 서비스 제공 시스템(10)의 각 구성 요소(100, 200, 300)에 대한 보다 자세한 설명은 도 5이하의 도면을 참조하여 보다 상세하게 설명하도록 한다.A more detailed description of each
다시 도 3을 참조하면, 상기 예시적인 환경에서, 하나 이상의 클라이언트 단말(30)은 조회 서비스 제공 시스템(10)이 제공하는 조회 서비스를 이용하는 단말이다. 클라이언트 단말(30)은 어떠한 장치로 구현되더라도 무방하다.Referring back to FIG. 3 , in the exemplary environment, the one or
상기 예시적인 환경에서, 하나 이상의 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 according to an embodiment. In the following description, it is assumed that the reference number “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 to 4 may communicate via a network. Here, the network includes all types of wired/wireless networks such as a local area network (LAN), a wide area network (WAN), a mobile radio communication network, and a Wibro (Wireless Broadband Internet). can be implemented.
지금까지 도 2 내지 도 4를 참조하여 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)이 적용될 수 있는 예시적인 환경에 대하여 설명하였다. 이하에서는, 상기 예시적인 환경에서 조회 서비스가 제공되는 과정에 대하여 도 5 내지 도 10을 참조하여 설명하도록 한다.An exemplary environment to which the blockchain-based inquiry
이해의 편의를 제공하기 위해, 블록체인에 기록된 IoT 데이터가 데이터베이스 모듈(100)에 저장되는 과정을 먼저 설명하고, 그 다음에 클라이언트 단말(30)의 조회 요청이 처리되는 과정에 대하여 설명하도록 한다.For convenience of understanding, the process of storing IoT data recorded in the block chain in the
도 5는 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)에서 블록체인 데이터가 DB에 저장되는 과정을 나타내는 흐름도이다.5 is a flowchart illustrating a process in which block chain data is stored in a DB in the block chain-based inquiry
도 5에 도시된 바와 같이, 상기 저장 과정은 IoT 디바이스(20)가 IoT 데이터를 제공하는 단계 S10에서 시작된다.As shown in FIG. 5 , the storage process starts at step S10 in which the
본 발명의 실시예에 따르면, 각각의 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 may have 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 time information (e.g. timestamp) indicating a generation time. In addition, various meta information used to inquire IoT data may be included in IoT data. For example, as shown in FIG. 6 , a first identification value (“Sensor1”) is given to the
단계 S20에서, 블록체인 네트워크(300)는 제공받은 IoT 데이터를 블록에 기록하고, 합의(consensus)를 거쳐 상기 블록을 블록체인에 추가한다. 당해 기술 분야의 당업자라면 블록체인 노드가 블록체인 프로토콜에 따라 데이터를 블록에 기록하고 전파하며, 합의를 통해 블록을 블록체인에 추가하는 과정을 자명하게 알 수 있을 것이므로, 이에 대한 자세한 설명은 생략하도록 한다.In step S20, the
본 단계 S20에서, 블록체인 노드는 각 IoT 데이터(e.g. 도 6의 41, 43, 45)에 대한 해시 값을 생성하고, 상기 해시 값과 상기 IoT 데이터를 포함하는 데이터 레코드를 블록체인에 기록할 수 있다. 상기 해시 값은 추후 DB에 저장된 데이터의 무결성을 확인하기 위해 이용될 수 있다. 가령, 클라이언트 단말(30)은 DB 조회 결과에 포함된 해시 값과 블록체인에 기록된 해시 값을 비교함으로써 DB 데이터의 무결성을 확인할 수 있다.In this step S20, the blockchain node generates a hash value for each IoT data (e.g. 41, 43, 45 in FIG. 6), and records the hash value and a data record including the IoT data in the blockchain. have. The hash value may be used later to check the integrity of data stored in the DB. For example, the
또한, 본 발명의 실시예에 따르면, 블록체인 노드는 이전 데이터의 해시 값에 기반하여 현재 데이터의 해시 값을 산출할 수 있다. 가령, 도 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 shown in FIG. 7 , the hash value 53-1 of the first data 51-1 is the hash value (“prevHashVal”) of the previous data of the first data 51-1 and the data 51 -1), and the hash value 53-2 of the second data 51-2 is the hash value 53-1 and data 51-2 of the previous data 51-1. 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-1 th data and the data 51-n. As described above, as the hash value of the history data is calculated in the form of a chain, the integrity of the data can be efficiently verified, which will be described later with reference to FIGS. 9 and 10 .
단계 S30에서, 블록체인 네트워크(300)는 상기 블록을 블록 리스너 모듈(200)로 전송한다. 즉, 블록체인 네트워크(300)를 구성하는 하나 이상의 블록체인 노드가 상기 블록을 블록 리스너 모듈(200)로 전송한다.In step S30 , the
단계 S40에서, 블록 리스너 모듈(200)은 수신된 블록에 포함된 하나 이상의 데이터 레코드를 데이터베이스 모듈(100)로 전송한다. 이때, 블록 리스너 모듈(200)은 블록의 전송 상태 정보에 기초하여 상기 전송을 수행할 수 있는데, 이에 대한 자세한 설명은 도 11 내지 도 13을 참조하여 후술하도록 한다.In step S40 , the
단계 S50에서, 데이터베이스 모듈(100)은 수신한 데이터 레코드를 DB에 저장한다.In step S50, the
도 8은 본 발명의 일 실시예에 따른 블록체인 기반 조회 서비스 제공 시스템(10)에서 조회 요청이 처리되는 과정을 나타내는 흐름도이다.8 is a flowchart illustrating a process of processing an inquiry request in the block chain-based inquiry
도 8에 도시된 바와 같이, 상기 조회 요청 처리 과정은 클라이언트 단말(30)이 DB 조회를 요청하는 단계 S110에서 시작된다. 상기 DB 조회 요청은 DB 쿼리를 전송함으로써 이루어질 수 있는데, 클라이언트 단말(30)은 SQL(Structured Query Language) 등의 언어에 기반하여 DB 쿼리를 생성할 수 있다. 따라서, 클라이언트는 손쉽게 원하는 데이터를 조회할 수 있게 되고, 조회 서비스 제공 시스템(10)은 DB 기반으로 강력한 조회 서비스를 제공할 수 있게 된다.As shown in FIG. 8 , the inquiry request processing process starts at step S110 when the
단계 S120에서, 데이터베이스 모듈(100)은 상기 DB 쿼리로 DB를 조회하고 조회 결과를 클라이언트 단말(30)로 제공한다. 이때, 상기 조회 결과는 데이터뿐만 아니라 상기 데이터의 무결성을 검증하기 위한 해시 값을 포함한다.In step S120 , the
상기 조회 결과에 대한 무결성을 검증하고 싶은 경우, 클라이언트 단말(30)은 단계 S130 내지 S150을 더 수행할 수 있다. 구체적으로, 클라이언트 단말(30)은 블록체인에 기록된 데이터의 해시 값을 조회하고(S130, S140), 블록체인에 기록된 해시 값과 조회 결과에 포함된 해시 값을 비교함으로써 DB 데이터에 대한 무결성을 확인할 수 있다(S150).If it is desired to verify the integrity of the inquiry result, the
본 발명의 실시예에 따르면, 시간적 선후 관계를 갖는 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 historical data (e.g. IoT data collected for a specific period) composed of n data having a temporal precedence relationship is inquired, the
지금까지 도 5 내지 도 10을 참조하여 블록체인 기반 조회 시스템(10)을 통해 조회 서비스가 제공되는 과정에 대하여 설명하였다. 이하에서는, 도 11 내지 도 15를 참조하여 블록 리스너 모듈(200)의 세부 기능에 대하여 상세하게 설명하도록 한다.So far, the process of providing the inquiry service through the blockchain-based
도 11은 본 발명의 일 실시예에 따른 블록 리스너 모듈(200)을 나타내는 블록도이다.11 is a block diagram illustrating a
도 11에 도시된 바와 같이, 블록 리스너 모듈(200)은 블록 수신부(210), 데이터 송수신부(230), 전송 상태 정보 관리부(250), 블록 요청부(270) 및 담당 노드 지정부(290)를 포함할 수 있다. 다만, 도 11에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 11에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다. 또한, 도 11에 도시된 블록 리스너 모듈(200)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 복수의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다. 또는, 각각의 구성 요소가 복수의 세부 기능 요소로 분리되는 형태로 구현될 수도 있다.11 , the
블록 수신부(210)는 하나 이상의 블록체인 노드로부터 블록을 수신한다.The
다음으로, 데이터 송수신부(230)는 상기 블록에 포함된 하나 이상의 데이터 레코드를 데이터베이스 모듈(100)로 전송한다. 또한, 데이터 송수신부(230)는 데이터베이스 모듈(100)로부터 ACK(ACKnowledgement) 메시지를 수신할 수 있다. 데이터베이스 모듈(100)은 특정 블록에 대한 데이터 레코드를 전부 수신하거나, 상기 데이터 레코드 전부를 DB에 저장 완료한 경우, 상기 ACK 메시지를 전송할 수 있다. 데이터 송수신부(230)의 동작에 대한 추가적인 내용은 전송 상태 정보 관리부(250)와 함께 설명하도록 한다.Next, the
다음으로, 전송 상태 정보 관리부(250)는 블록 단위로 전송 상태 정보를 관리한다. 상기 전송 상태 정보는 각 블록이 데이터베이스 모듈(100)로 전송 완료되었는지 여부를 가리키는 플래그 정보를 포함할 수 있다. 이때, 각 블록의 식별자로 블록 번호로 이용될 수 있으나, 별도의 식별자가 이용되더라도 무방하다. 블록체인 네트워크(300)에 복수의 채널이 형성된 경우라면, 도 12에 도시된 바와 같이, 각 채널 별로 블록에 대한 전송 상태 정보가 관리될 수 있다. 실시예에 따라, 전송 상태 정보 관리부(250)는 데이터 레코드 단위로 전송 상태 정보를 관리할 수도 있다.Next, the transmission state
데이터 송수신부(230)가 데이터베이스 모듈(100)로부터 특정 블록에 대한 ACK 메시지를 수신하면, 전송 상태 정보 관리부(250)는 상기 특정 블록에 대한 전송 완료 플래그를 "Y"로 설정할 수 있다. 가령, 도 12에 도시된 블록(1)의 상태 정보(71)는 데이터베이스 모듈(100)로부터 블록(1)에 대한 ACK 메시지가 수신되었다는 것을 의미하는 것일 수 있다.When the
본 발명의 실시예에 따르면, 데이터 송수신부(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
또한, 본 발명의 실시예에 따르면, 데이터 송수신부(230)는 블록의 전송 상태 정보(즉, 전송 완료 플래그)에 기초하여 미전송 블록에 대한 재전송을 수행할 수 있다. 가령, 도 12에 도시된 블록(2)이 이미 전송을 시도한 블록이라고 가정하자. 그러나, 블록(2)의 전송 상태 정보(73)의 전송 완료 플래그가 "N"으로 되어있으므로, 데이터 송수신부(230)는 해당 블록(2)에 대한 재전송을 수행할 수 있다. 데이터 송수신부(230)는 재전송 타이머를 이용하여 재전송을 수행할 수 있을 것이나, 상기 재전송은 어떠한 방식으로 구현되더라도 무방하다.Also, according to an embodiment of the present invention, the
다음으로, 블록 요청부(270)는 블록체인 노드에게 특정 블록을 요청한다. 가령, 블록 리스너 모듈(200)이 장애 발생 후 복구된 경우, 블록 요청부(270)는 각 블록의 전송 상태 정보를 참조하여 미전송 블록을 식별하고, 상기 미전송 블록을 블록체인 노드에게 요청할 수 있다. 가령, 도 12에 도시된 블록(2)의 전송 상태 정보(73)를 참조하면, 다음 블록(3)이 전송 완료되었음에도 불구하고, 블록(2)은 전송되지 않은 상태인 것을 확인할 수 있다. 이와 같은 경우, 블록 요청부(270)는 블록(2)을 채널(A)에 속한 블록체인 노드에게 요청하고, 데이터 송수신부(230)는 블록(2)을 데이터베이스 모듈(100)로 다시 전송할 수 있다.Next, the
그러나, 본 발명의 다른 실시예에 따르면, 블록 리스너 모듈(200)은 수신한 블록을 캐시(cache)와 같은 임시 저장소에 저장하고, ACK 메시지를 수신할 때 수신된 ACK 메시지에 대응되는 블록을 제거하도록 동작할 수도 있다. 이와 같은 경우, 블록체인 노드에게 미전송 블록을 요청할 필요가 없으므로, 블록 요청부(270)를 제외하고 블록 리스너 모듈(200)이 구현될 수도 있다.However, according to another embodiment of the present invention, the
다시 도 11을 참조하면, 담당 노드 지정부(290)는 채널 별로 담당 노드를 지정한다. 여기서, 상기 담당 노드는 소속된 채널의 블록을 블록 리스너 모듈(200)로 전송하도록 지정된 블록체인 노드를 의미한다. 담당 노드를 설정하는 이유는 도 13에 도시된 바와 같이 블록체인 노드(301 내지 305)와 블록 리스너 모듈(200) 간에 블록 전송이 중복되는 것을 방지하기 위해서이다. 즉, 블록의 전송 상태 정보를 이용함으로써 블록 리스너 모듈(200)과 데이터베이스 모듈(100) 간의 중복 트래픽은 제거되었으나, 여전히 블록체인 노드와 블록 리스너 모듈(200) 사이에는 중복 트래픽이 존재하다. 따라서, 중복 트래픽에 따른 비효율성을 추가로 제거하기 위해, 각 채널 별로 담당 노드를 지정하는 것으로 이해될 수 있다. 담당 노드 지정부(290)의 구체적인 동작에 대하여 도 14 및 도 15를 참조하여 부연 설명한다.Referring back to FIG. 11 , the
담당 노드 지정부(290)는 블록체인 노드가 소속된 채널의 정보를 수집하고, 수집된 채널 정보를 기초로 채널 별로 담당 노드를 지정할 수 있다. 이때, 각 블록체인 노드의 채널 정보를 수집하는 방식은 어떠한 방식이 되더라도 무방하다.The
본 발명의 실시예에 따르면, 담당 노드 지정부(290)는 담당 채널이 서로 중복되지 않도록 채널 별로 담당 노드를 지정할 수 있다. 담당 노드를 지정하는 일 예는 도 14 및 도 15 도시되어 있다. 이하, 도 14 및 도 15를 참조하여 담당 노드를 지정하는 예시적인 방법에 대하여 부연 설명하도록 한다.According to an embodiment of the present invention, the
도 14에 도시된 표(81)는 도 15에 도시된 환경에서 수집된 채널 정보를 도시하고 있다. 담당 노드 지정부(290)는 수집된 채널 정보(81)를 기초로 각 채널 별로 소속된 노드의 개수를 산출하고, 이를 토대로 표(83)와 같은 정보를 생성할 수 있다.Table 81 shown in FIG. 14 shows channel information collected in the environment shown in FIG. 15 . The
다음으로, 담당 노드 지정부(290)는 표(83)와 같은 정보를 기반으로 노드의 개수가 상대적으로 적은 채널부터 순차적으로 담당 노드를 지정할 수 있다. 구체적으로, 소속된 노드의 수가 가장 적은 채널(B or C)부터 담당 노드가 지정되는데, 도 14는 채널(B)부터 담당 노드가 지정된 것을 예로써 도시하고 있다. 다음으로, 채널(B)을 제외한 나머지 채널(A, C) 중에서 노드의 수가 더 적은 채널(C)의 담당 노드가 제3 블록체인 노드(315)로 지정될 수 있다. 동일하게, 남은 채널(A)의 담당 노드가 제1 블록체인 노드(311)로 지정될 수 있다. 이와 같은 방식으로, 담당 채널이 서로 중복되지 않도록 담당 노드가 지정될 수 있다.Next, the
도 15는 채널 별로 담당 노드가 지정된 이후, 블록체인 노드(311 내지 315)와 블록 리스너 모듈(200) 간의 블록 전송을 도시하고 있다. 도 15에 도시된 바와 같이, 블록 리스너 모듈(200)이 특정 채널을 담당하는 블록체인 노드(311 내지 315)로부터 각 채널의 블록을 수신함으로써, 블록 리스너 모듈(200)과 블록체인 노드(311 내지 315) 간의 중복 트래픽이 제거될 수 있다.15 illustrates block transmission between the
한편, 도 11에 도시된 모든 구성 요소(210 내지 290)가 블록 리스너 모듈(200)의 필수 구성 요소는 아님에 유의하여야 한다. 즉, 블록 리스너 모듈(200)은 도 11에 도시된 구성 요소(210 내지 290) 중 일부만으로 구현될 수도 있다.Meanwhile, it should be noted that all of the
도 11에 도시된 각 구성 요소(210 내지 290)는 소프트웨어(Software) 또는, FPGA(Field Programmable Gate Array)나 ASIC(Application-Specific Integrated Circuit)와 같은 하드웨어(Hardware)를 의미할 수 있다. 그렇지만, 상기 구성 요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(Addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고, 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다. 상기 구성 요소들 안에서 제공되는 기능은 더 세분화된 구성 요소에 의하여 구현될 수 있으며, 복수의 구성 요소들을 합하여 특정한 기능을 수행하는 하나의 구성 요소로 구현될 수도 있다.Each of the
지금까지 도 11 내지 도 15를 참조하여 본 발명의 일 실시예에 따른 블록 리스너 모듈(200)의 세부 기능에 대하여 설명하였다. 이하에서는, 블록체인 네트워크의 트랜잭션 처리 성능을 향상시킬 수 있는 본 발명의 실시예에 대하여 도 16 내지 도 19를 참조하여 설명하도록 한다.So far, detailed functions of the
실시간으로 발생하는 방대한 양의 IoT 데이터를 블록체인에 기록하기 위해서는 블록체인 네트워크의 트랜잭션 처리 성능이 매우 중요하다. 트랜잭션 처리 성능을 개선하기 위해, 도 16에 도시된 바와 같이, 조회 서비스 제공 시스템(10)은 배치 프로세싱 모듈(400)을 더 포함할 수 있다.The transaction processing performance of the blockchain network is very important to record a huge amount of IoT data that occurs in real time on the blockchain. In order to improve transaction processing performance, as shown in FIG. 16 , the inquiry
배치 프로세싱 모듈(400)은 블록체인 트랜잭션을 배치 형태로 처리하기 위한 모듈이다. 가령, IoT 디바이스(20-1 내지 20-n)가 제공하는 각각의 IoT 데이터를 블록체인에 기록하는 것이 하나의 쓰기 트랜잭션으로 처리된다고 할 때, 배치 프로세싱 모듈(400)은 다수 쓰기 트랜잭션을 배치 형태로 일괄 처리할 수 있다. 그렇게 함으로써, 블록체인 네트워크(300)의 트랜잭션 처리 성능이 크게 향상될 수 있다. 프로세싱 모듈(400)은 별도의 컴퓨팅 장치로 구현될 수 있고, 특정 컴퓨팅 장치 내에서 로직의 형태로 구현될 수도 있다.The
본 발명의 실시예에 따르면, 배치 프로세싱 모듈(400)은 도 17에 도시된 바와 같은 기능 요소들로 구성될 수 있다. 이하, 도 17을 참조하여 배치 프로세싱 모듈(400)의 세부 기능 요소에 대하여 설명하도록 한다.According to an embodiment of the present invention, the
도 17을 참조하면, 배치 프로세싱 모듈(400)은 분류부(410), 배치 생성부(430), 핸들러부(450) 및 결과 제공부(470) 및 배치 사이즈 조정부(490)을 포함할 수 있다. 다만, 도 17에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 17에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다. 또한, 도 17에 도시된 배치 프로세싱 모듈(400)의 각각의 구성 요소들은 기능적으로 구분되는 기능 요소들을 나타낸 것으로서, 적어도 하나의 구성 요소가 실제 물리적 환경에서는 서로 통합되는 형태로 구현될 수도 있음에 유의한다.Referring to FIG. 17 , the
각 구성 요소를 살펴보면, 분류부(410)은 요청된 트랜잭션을 소정의 분류 기준에 따라 분류한다. 이때, 상기 소정의 분류 기준은 스마트 컨트랙트의 식별자, 채널 식별자 및/또는 트랜잭션의 타입, 트랜잭션의 중요도 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. 여기서, 상기 트랜잭션의 타입은 전술한 바와 같이 다양하게 정의될 수 있으나, 이해의 편의를 제공하기 위해, 쓰기 타입과 읽기 타입으로 구분된다고 가정하여 설명을 이어가도록 한다. 그러나, 본 발명의 기술적 범위가 특정 타입의 트랜잭션에 한정되는 것은 아님에 유의하여야 한다.Looking at each component, the
보다 자세하게는, 분류부(410)은 각 트랜잭션을 채널, 스마트 컨트랙트, 트랜잭션 타입, 및/또는 중요도 별로 분류(e.g. 제1 채널의 제1 스마트 컨트랙트를 이용하는 쓰기 타입 트랜잭션으로 분류)하고, 분류 결과를 배치 생성부(430)에게 제공할 수 있다.In more detail, the
본 발명의 실시예에 따르면, 중요도가 높은 일부 트랜잭션은 배치 프로세싱을 통해 처리되지 않고, 개별적으로 처리될 수 있다. 예를 들어, 분류부(410)가 트랜잭션의 중요도에 기초하여 복수의 트랜잭션을 중요도가 낮은 제1 트랜잭션 그룹과 중요도가 높은 제2 트랜잭션 그룹으로 분류한다고 가정하자. 그러면, 상기 제1 트랜잭션 그룹에 소속된 제1 블록체인 트랜잭션은 배치 생성부(430)에 의해 배치 형태로 처리될 수 있다. 또한, 상기 제2 트랜잭션 그룹에 소속된 제2 트랜잭션은 곧바로 핸들러부(450)로 전달되어 개별적으로 처리될 수 있다. 본 실시예에 따르면, 중요도가 높은 트랜잭션이 보다 신속하게 처리될 수 있는 바, 트랜잭션 중요도에 따른 차등적인 처리 서비스가 제공될 수 있다.According to an embodiment of the present invention, some transactions with high importance are not processed through batch processing, but may be processed individually. For example, it is assumed that the
다음으로, 배치 생성부(430)는 분류부(410)에 의해 분류된 복수의 트랜잭션을 종합하여 배치 트랜잭션을 생성한다. 구체적으로, 배치 생성부(430)는 상기 분류된 트랜잭션 각각을 분류 결과에 대응되는 배치 큐(batch queue)에 삽입한다. 예를 들어, 배치 생성부(430)는 제1 분류 결과로 분류된 제1 트랜잭션을 제1 배치 큐에 삽입하고, 제2 분류 결과로 분류된 제2 트랜잭션을 제2 배치 큐에 삽입할 수 있다. 또한, 배치 생성부(430)는 특정 배치 큐(e.g. 제1 배치 큐 or 제2 배치 큐)가 소정의 배치 생성 조건을 만족한다는 판정에 응답하여 상기 특정 배치 큐에 포함된 트랜잭션을 종합하여 배치 트랜잭션을 생성할 수 있다.Next, the
상기 배치 큐는 배치 트랜잭션을 생성하기 전까지 트랜잭션을 보관하는 장소를 의미하며, 일종의 트랜잭션 버퍼(buffer) 또는 트랜잭션 풀(pool)의 개념으로 이해될 수 있다. 버퍼 큐의 명칭에서 알 수 있듯이, 상기 배치 큐는 큐 기반의 자료구조로 구현될 수 있을 것이나, 본 발명의 범위가 이에 한정되는 것은 아니며, 얼마든지 다양한 형태의 자료구조로 구현될 수 있다.The batch queue refers to a place for storing transactions until a batch transaction is created, 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 with various types of data structures.
상기 배치 생성 조건은 배치 타이머(batch timer)에 기초한 제1 조건, 트랜잭션의 데이터 크기에 기초한 제2 조건, 트랜잭션의 개수에 기초한 제3 조건, 트랜잭션 간의 연관성 존재 여부에 기초한 제4 조건 등을 포함할 수 있다. 또한, 상기 소정의 배치 생성 조건은 상기 제1 조건 내지 상기 제4 조건의 조합에 기초하여 정의될 수 있는 제5 조건을 더 포함할 수도 있다. 이하, 이해의 편의를 제공하기 위해, 각 배치 생성 조건에 따라 배치 트랜잭션이 생성되는 과정을 부연 설명하도록 한다.The batch creation condition may include a first condition based on a batch timer, a second condition based on a data size of a transaction, a third condition based on the number of transactions, and a fourth condition based on whether there is an association between transactions. can In addition, the predetermined batch generation condition may further include a fifth condition that may be defined based on a combination of the first condition to the fourth condition. Hereinafter, for convenience of understanding, a process of generating a batch transaction according to each batch creation condition will be described in detail.
제1 실시예에서, 배치 생성부(430)는 배치 타이머의 만료 이벤트에 응답하여 특정 배치 큐의 트랜잭션을 종합하여 배치 트랜잭션을 생성할 수 있다. 이때, 배치 타이머는 배치 큐 별로 존재할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 각 배치 큐의 타이머 주기는 동일할 수도 있고, 상이할 수도 있다. 예를 들어, 우선순위가 높은 배치 큐의 타이머 주기는 상대적으로 짧게 설정되고, 우선순위가 낮은 배치 큐의 타이머 주기는 상대적으로 길게 설정될 수 있다. 이를 통해, 차등적인 트랜잭션 처리 서비스가 제공될 수 있다. 본 실시예에 따르면, 배치 프로세싱에 따른 트랜잭션 대기 시간이 일정 시간(e.g. 배치 타이머 주기) 내로 제한될 수 있다. 따라서, 배치 프로세싱으로 인해 일부 개별 트랜잭션의 처리가 지연되는 문제가 완화될 수 있다.In the first embodiment, the
제2 실시예에서, 배치 생성부(430)는 특정 배치 큐에 포함된 전체 트랜잭션의 데이터 크기가 임계 값 이상이라는 판정에 응답하여 배치 트랜잭션을 생성할 수 있다. 이때, 상기 전체 트랜잭션의 데이터 크기는 개별 트랜잭션의 데이터 크기의 합으로 산출될 수 있고, 상기 개별 트랜잭션의 데이터 크기는 예를 들어 블록체인에 기록되는 트랜잭션 데이터의 크기를 의미하는 것일 수 있다. 그러나, 본 발명의 범위가 이에 한정되는 것은 아니다. 상기 임계 값은 기 설정된 고정 값 또는 상황에 따라 변동되는 변동 값일 수 있다. 예를 들어, 상기 임계 값은 블록의 최대 크기에 기초하여 설정되는 고정 값일 수 있다. 다른 예를 들어, 상기 임계 값은 해당 배치 큐의 우선순위에 기초하여 설정된 고정 값 또는 변동 값일 수 있다. 또 다른 예를 들어, 상기 임계 값은 배치 프로세싱 장치(100)의 부하가 클수록 더 큰 값으로 설정되는 변동 값일 수 있다. 본 실시예에 따르면, 하나의 배치 트랜잭션에 지나치게 많은 데이터가 포함되는 것이 방지될 수 있는 바, 배치 트랜잭션의 처리 실패 확률이 감소될 수 있다.In the second embodiment, the
제3 실시예에서, 배치 생성부(430)는 특정 배치 큐에 포함된 트랜잭션의 개수가 배치 사이즈의 설정 값을 만족한다는 판정에 응답하여 배치 트랜잭션을 생성할 수 있다. 이때, 상기 설정 값은 상황에 따라 변동되는 변동 값일 수 있다. 예를 들어, 상기 설정 값은 해당 배치 큐의 우선순위가 높을수록 더 작은 값으로 설정되는 변동 값일 수 있다. 다른 예를 들어, 상기 설정 값은 배치 프로세싱 모듈(400)의 부하, 트랜잭션 처리 소요 시간 등과 같은 트랜잭션 처리 상황에 따라 조정되는 변동 값일 수 있다.In the third embodiment, the
제4 실시예에서, 배치 생성부(430)는 트랜잭션 간의 연관성에 기초하여 배치 트랜잭션을 생성할 수 있다. 구체적으로, 배치 프로세싱 모듈(400)은 특정 트랜잭션의 연관 트랜잭션이 존재하는지 여부를 판정한다. 이때, 상기 연관 트랜잭션은 상기 특정 트랜잭션과 연관성이 존재하는 트랜잭션을 의미하는 것으로, 예를 들어, 상기 특정 트랜잭션과 동일한 상태 데이터의 식별키를 포함하는 트랜잭션일 수 있다. 즉, 상기 특정 트랜잭션과 동일한 상태 데이터에 접근하는 트랜잭션들은 상기 특정 트랜잭션과 연관성이 존재하는 연관 트랜잭션으로 판정될 수 있다. 연관 트랜잭션이 존재한다고 판정된 경우 배치 생성부(430)는 다양한 방식으로 배치 프로세싱을 수행할 수 있다. 구체적인 예시는 다음과 같다.In the fourth embodiment, the
제4-1 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션을 서로 다른 배치 트랜잭션으로 생성하여 처리할 수 있다.In the 4-1 embodiment, the
제4-2 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션을 제외한 나머지 트랜잭션을 기초로 배치 트랜잭션을 생성하고, 상기 제1 트랜잭션 및 상기 제2 트랜잭션을 개별적으로 처리할 수 있다.In the 4-2 embodiment, the
제4-3 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션 및 제2 트랜잭션 중에서 상기 제1 트랜잭션은 배치 형태로 처리하고, 상기 제2 트랜잭션은 개별적으로 처리할 수 있다. 즉, 배치 생성부(430)는 트랜잭션의 충돌이 일어나지 않는 범위 내에서 연관성이 존재하는 복수의 트랜잭션 중 일부 트랜잭션을 배치 형태로 처리할 수 있다.In the 4-3 embodiment, the
제4-4 실시예에서, 배치 생성부(430)는 연관성이 존재하는 제1 트랜잭션과 제2 트랜잭션이 결합 가능한지 여부를 판정하고, 결합 가능하다는 판정에 응답하여 상기 제1 트랜잭션과 상기 제2 트랜잭션이 결합된 제3 트랜잭션을 생성할 수 있다. 여기서, 상기 제3 트랜잭션의 실행 결과가 상기 제1 트랜잭션 및 상기 제2 트랜잭션을 실행한 결과와 동일하다면, 상기 제3 트랜잭션을 생성하는 방법은 어떠한 방식으로 수행되더라도 무방하다. 또한, 배치 생성부(430)는 상기 제3 트랜잭션을 배치 형태 또는 개별적으로 처리할 수 있다.In the 4-4 embodiment, the
전술한 실시예들에 따르면, 트랜잭션 간의 연관성을 고려하여 충돌이 일어나지 않는 범위 내에서 배치 프로세싱이 이루어질 수 있다. 이에 따라, 트랜잭션 처리의 안정성이 떨어지는 문제가 완화될 수 있다. 이상의 실시예에서, 이해의 편의를 위해, 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 the correlation between transactions. Accordingly, the problem of poor stability of transaction processing may be alleviated. In the above embodiment, for convenience of understanding, it has been described assuming that there is a correlation between two transactions, but those skilled in the art may use the same or It will be appreciated that it may be treated in a similar manner.
다음으로, 핸들러부(450)는 블록체인 네트워크(300)와 연동하여 개별 트랜잭션 또는 배치 트랜잭션을 일괄 처리한다. 핸들러부(450)는 송신 핸들러(151) 및 수신 핸들러(153)를 포함할 수 있다.Next, the
송신 핸들러(151)는 배치 트랜잭션 등 데이터에 대한 전반적인 송신 처리를 수행한다. 구체적으로, 송신 핸들러(151)는 배치 트랜잭션이 생성됨에 응답하여, 상기 생성된 배치 트랜잭션을 블록체인 네트워크(300)로 전달할 수 있다. 또한, 송신 핸들러(151)는 블록체인 노드에 의해 서명된 배치 트랜잭션의 실행 결과(e.g. endorsement)를 합의 노드로 전송하거나, 처리 실패된 배치 트랜잭션을 재시도하는 등의 동작을 더 수행할 수 있다.The transmission handler 151 performs overall transmission processing for data, such as a batch transaction. Specifically, in response to the batch transaction being generated, the transmission handler 151 may transmit the generated batch transaction to the
수신 핸들러(153)는 배치 트랜잭션의 처리 결과 등과 같이 블록체인 네트워크(300)로부터 수신되는 데이터에 대한 전반적인 처리를 수행한다. 구체적으로, 수신 핸들러(153)는 개별 트랜잭션 또는 배치 트랜잭션에 대한 처리 결과를 수신함에 응답하여 상기 처리 결과를 결과 제공부(470)로 제공한다. 또한, 수신 핸들러(153)는 블록체인 네트워크(300)로부터 서명된 배치 트랜잭션의 처리 결과를 수신하고, 이를 송신 핸들러(151)로 전달하는 등의 동작을 더 수행할 수 있다.The reception handler 153 performs overall processing on data received from the
다음으로, 결과 제공부(470)는 수신 핸들러(153)로부터 개별 트랜잭션 또는 배치 트랜잭션에 대한 처리 결과를 수신하고, 상기 처리 결과를 요청 단말(500)로 제공한다. 보다 자세하게는, 결과 제공부(470)는 배치 트랜잭션에 대한 처리 결과를 개별 트랜잭션 단위로 구분하고, 구분된 처리 결과를 각각의 요청 단말(500)로 제공할 수 있다. 예를 들어, 결과 제공부(470)는 요청 단말(500)의 식별자, 트랜잭션 식별자, 요청 단말(500)의 주소 등으로 구성된 참조 테이블을 생성하고, 상기 참조 테이블을 이용하여 개별 트랜잭션의 처리 결과를 해당 요청 단말(500)로 제공할 수 있다. 다만, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.Next, the
다음으로 배치 사이즈 조정부(490)는 트랜잭션 처리 상황을 모니터링하고, 모니터링 결과를 기초로 배치 사이즈의 설정 값을 가변적으로 조정한다. 또한, 배치 사이즈 조정부(490)는 상기 모니터링 결과를 기초로 배치 프로세싱 기능을 활성화하거나 비활성화할 수 있다. 여기서, 배치 프로세싱 기능을 비활성화하는 것은 배치 사이즈의 설정 값을 "1"로 조정함으로써 수행될 수 있을 것이나, 얼마든지 다른 방식으로 수행되더라도 무방하다.Next, the batch
상기 트랜잭션 처리 상황과 연관된 모니터링 지표는 단위 시간 동안 들어오는 트랜잭션 개수, 나가는 트랜잭션 개수, 트랜잭션 처리 소요 시간, 트랜잭션의 대기 시간 등을 포함할 수 있다. 그러나, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.The monitoring index related to the transaction processing status may include the number of incoming transactions, the number of outgoing transactions, a transaction processing time required, and a waiting time of a transaction for a unit time. However, the technical scope of the present invention is not limited thereto.
예를 들어, 배치 사이즈 조정부(490)는 들어오는 트랜잭션의 개수가 임계치 이상인 경우 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.For example, the
다른 예를 들어, 배치 사이즈 조정부(490)는 나가는 트랜잭션의 개수가 임계치 이상인 경우 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.As another example, the
또 다른 예를 들어, 배치 사이즈 조정부(490)는 트랜잭션의 처리 소요 시간이 임계치 이상인 경우, 배치 기능을 활성화하거나 배치 사이즈를 증가시킬 수 있다. 반대의 경우, 배치 기능이 비활성화되거나 배치 사이즈가 감소될 수 있다.As another example, the
또 다른 예를 들어, 배치 사이즈 조정부(490)는 트랜잭션 대기 시간(e.g. 치 큐에서의 대기 시간)이 임계치 이상인 경우, 배치 기능을 비활성화하거나 배치 사이즈를 감소시킬 수 있다. 반대의 경우, 배치 기능이 활성화되거나 배치 사이즈가 증가될 수 있다.As another example, the
도 17에 도시된 각 구성 요소 또한 소프트웨어(Software) 또는, FPGA(Field Programmable Gate Array)나 ASIC(Application-Specific Integrated Circuit)과 같은 하드웨어(Hardware)를 의미할 수 있다. 그렇지만, 상기 구성 요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(Addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고, 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다. 상기 구성 요소들 안에서 제공되는 기능은 더 세분화된 구성 요소에 의하여 구현될 수 있으며, 복수의 구성 요소들을 합하여 특정한 기능을 수행하는 하나의 구성 요소로 구현될 수도 있다.Each component shown in FIG. 17 may also 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 meant to be limited to software or hardware, and may be configured to be in an addressable storage medium or configured to execute one or more processors. The functions provided in the components may be implemented by more subdivided components, or may be implemented as one component that performs a specific function by combining a plurality of components.
이하에서는, 보다 이해의 편의를 제공하기 위해, 배치 프로세싱 모듈(400)를 통해 쓰기 타입 트랜잭션이 처리되는 과정에 대하여 도 18 및 도 19를 참조하여 설명하도록 한다. 도 18 및 도 19는 배치 사이즈의 설정 값이 "3"인 경우를 예로써 도시하고 있다.Hereinafter, for the convenience of understanding, a process of processing a write type transaction through the
도 18은 본 발명의 일 실시예에 따라 쓰기 타입 트랜잭션이 처리되는 과정을 도시한다.18 illustrates a process of processing a write type transaction 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
다음으로, 배치 프로세싱 모듈(400)은 블록체인 네트워크(300)로 배치 트랜잭션(410)의 처리를 요청한다. 그러면, 블록체인 네트워크(300)를 구성하는 블록체인 노드(320, 330)는 배치 트랜잭션(410)에 대한 합의 프로세스를 수행하고, 배치 트랜잭션(410)의 실행 결과를 블록체인(323, 333) 상에 기록한다.Next, the
도 18에 도시된 바와 같이, 각 블록체인 노드(323, 333)는 배치 트랜잭션(410)을 처리하기 위한 처리 모듈(321, 331)를 포함할 수 있다. 처리 모듈(321, 331)은 스마트 컨트랙트를 이용하여 배치 트랜잭션(410)의 실행 결과를 트랜잭션 별(또는 상태 데이터 별)로 구분하고, 구분된 실행 결과를 기초하여 블록체인을 갱신하는 동작을 수행할 수 있다. 이때, 배치 트랜잭션(410)의 실행 결과는 블록체인 노드의 서명(signature), 개별 트랜잭션의 식별자, 상태 데이터의 식별키(A, B, C)와 값(1, 2, 3) 등을 포함할 수 있다. 따라서, 처리 모듈(321, 331)은 식별키(A, B, C) 및/또는 트랜잭션의 식별자를 이용하여 배치 트랜잭션(410)의 실행 결과를 트랜잭션 별(또는 상태 별)로 구분할 수 있다.As shown in FIG. 18 , each
다음으로, 배치 프로세싱 모듈(400)은 블록체인 네트워크(300)로부터 배치 트랜잭션(410)에 대한 처리 결과를 수신하고, 수신된 처리 결과를 해당 요청 단말(500)로 제공한다.Next, the
이때, 상기 처리 결과가 실패를 가리키는 경우, 배치 프로세싱 모듈(400)의 핸들러부(450)는 배치 트랜잭션(410)의 처리를 재시도할 수 있다.In this case, when the processing result indicates failure, the
도 19는 하이퍼레저 패브릭과 같이 별도의 합의 노드가 존재하는 환경에서 쓰기 타입의 배치 트랜잭션이 처리되는 과정을 도시하고 있다. 상기 합의 노드(e.g. 하이퍼레저 패브릭의 "orderer")는 는 스마트 컨트랙트의 실행 결과에 대한 주요 합의 프로세스를 수행하는 노드를 의미한다.19 illustrates a process of processing a write-type batch transaction in an environment in which a separate consensus node exists, such as Hyperledger Fabric. The consensus node (e.g. "orderer" of Hyperledger Fabric) refers to a node that performs the 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
다음으로, 배치 프로세싱 모듈(400)은 상기 수신된 실행 결과를 별도의 합의 노드(360)에게 제출(submit)한다. 그러면, 합의 노드(360)는 블록체인 노드(340)의 실행 결과를 토대로 배치 트랜잭션(420)을 검증하고, 상기 실행 결과를 신규 블록에 기록하며, 신규 블록을 블록체인 네트워크(300) 상에 전파한다. 마지막으로, 신규 블록을 수신한 각 블록체인 노드(340, 350)는 처리 모듈(341, 351)를 통해 배치 트랜잭션(420)의 실행 결과를 트랜잭션 별(또는 상태 데이터 별)로 구분하고, 구분된 실행 결과를 바탕으로 블록체인을 갱신한다.Next, the
도 18 및 도 19를 참조하여 설명한 바와 같이, 배치 프로세싱 모듈(400)을 통해 트랜잭션이 처리되는 경우, 복수의 트랜잭션이 배치 프로세싱을 통해 일괄 처리될 수 있다. 즉, 개별 트랜잭션 단위로 합의 프로세스가 수행되는 것이 아니라, 배치 트랜잭션 단위로 합의 프로세스가 수행됨으로써, 복수의 트랜잭션이 일괄 처리될 수 있다. 이에 따라, 트랜잭션 처리 성능이 급격하게 향상될 수 있다. 이상적인 환경이라면, 트랜잭션 처리 성능은 배치 사이즈에 비례하여 향상될 수 있을 것이다.As described with reference to FIGS. 18 and 19 , when a transaction is processed through the
지금까지 도 16 내지 도 19를 참조하여 블록체인 네트워크의 트랜잭션 처리 성능을 향상시키기 위해 고안된 배치 트랜잭션 모듈(400)에 대하여 상세하게 설명하였다. 이하에서는, 본 발명의 다양한 실시예들에 따른 모듈 또는 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치에 대하여 설명하도록 한다.So far, the
도 20은 본 발명의 몇몇 실시예들에 따른 각종 모듈(e.g. 100, 200, 400) 또는 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치(500)를 나타내는 하드웨어 구성도이다.20 is a hardware configuration diagram illustrating an
도 20을 참조하면, 컴퓨팅 장치(500)는 하나 이상의 프로세서(510), 버스(510), 네트워크 인터페이스(570), 프로세서(510)에 의하여 수행되는 컴퓨터 프로그램을 로드(load)하는 메모리(530)와, 컴퓨터 프로그램(591)을 저장하는 스토리지(590)를 포함할 수 있다. 다만, 도 20에는 본 발명의 실시예와 관련 있는 구성요소들만이 도시되어 있다. 따라서, 본 발명이 속한 기술분야의 통상의 기술자라면 도 20에 도시된 구성요소들 외에 다른 범용적인 구성 요소들이 더 포함될 수 있음을 알 수 있다.Referring to FIG. 20 , the
프로세서(510)는 컴퓨팅 장치(500)의 각 구성의 전반적인 동작을 제어한다. 프로세서(510)는 CPU(Central Processing Unit), MPU(Micro Processor Unit), MCU(Micro Controller Unit), GPU(Graphic Processing Unit) 또는 본 발명의 기술 분야에 잘 알려진 임의의 형태의 프로세서를 포함하여 구성될 수 있다. 또한, 프로세서(510)는 본 발명의 실시예들에 따른 방법을 실행하기 위한 적어도 하나의 애플리케이션 또는 프로그램에 대한 연산을 수행할 수 있다. 컴퓨팅 장치(500)는 하나 이상의 프로세서를 구비할 수 있다.The
메모리(530)는 각종 데이터, 명령 및/또는 정보를 저장한다. 메모리(530)는 본 발명의 실시예들에 따른 블록체인 기반 조회 서비스 제공 방법을 실행하기 위하여 스토리지(590)로부터 하나 이상의 프로그램(591)을 로드할 수 있다. 메모리는 RAM과 같은 휘발성 메모리로 구현될 수 있을 것이나, 본 발명의 기술적 범위가 이에 한정되는 것은 아니다.The
버스(510)는 컴퓨팅 장치(500)의 구성 요소 간 통신 기능을 제공한다. 버스(510)는 주소 버스(Address Bus), 데이터 버스(Data Bus) 및 제어 버스(Control Bus) 등 다양한 형태의 버스로 구현될 수 있다.The
네트워크 인터페이스(570)는 컴퓨팅 장치(500)의 유무선 인터넷 통신을 지원한다. 또한, 네트워크 인터페이스(570)는 인터넷 통신 외의 다양한 통신 방식을 지원할 수도 있다. 이를 위해, 네트워크 인터페이스(570)는 본 발명의 기술 분야에 잘 알려진 통신 모듈을 포함하여 구성될 수 있다.The
스토리지(590)는 상기 하나 이상의 프로그램(591)을 비임시적으로 저장할 수 있다. 스토리지(590)는 ROM(Read Only Memory), EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM), 플래시 메모리 등과 같은 비휘발성 메모리, 하드 디스크, 착탈형 디스크, 또는 본 발명이 속하는 기술 분야에서 잘 알려진 임의의 형태의 컴퓨터로 읽을 수 있는 기록 매체를 포함하여 구성될 수 있다.The
컴퓨터 프로그램(591)은 메모리(530)에 로드될 때, 프로세서(510)로 하여금 본 발명의 다양한 실시예들에 따른 방법 및/또는 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함할 수 있다. 즉, 프로세서(510)는 상기 하나 이상의 인스트럭션들을 실행함으로써 본 발명의 다양한 실시예들에 따른 방법 및/또는 동작을 수행할 수 있다.The
예를 들어, 컴퓨터 프로그램(591)이 블록 리스너 모듈(200)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 블록 리스너 모듈(200)이 구현될 수 있다.For example, when the
다른 예를 들어, 컴퓨터 프로그램(591)이 데이터베이스 모듈(100)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 데이터베이스 모듈(100)이 구현될 수 있다.For another example, when the
또 다른 예를 들어, 컴퓨터 프로그램(591)이 배치 프로세싱 모듈(400)의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 배치 프로세싱 모듈(400)이 구현될 수 있다.As another example, when the
또 다른 예를 들어, 컴퓨터 프로그램(591)이 블록체인 노드의 동작을 의 동작을 수행하도록 하는 하나 이상의 인스트럭션들을 포함하는 경우, 컴퓨팅 장치(500)를 통해 본 발명의 실시예에 따른 블록체인 노드가 구현될 수 있다.As another example, when the
지금까지 도 20을 참조하여 본 발명의 다양한 실시예들에 따른 장치들을 구현할 수 있는 예시적인 컴퓨팅 장치(500)에 대하여 설명하였다.So far, an
지금까지 도 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 . Effects of the present invention are not limited to the effects mentioned above, 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 with reference to FIGS. 1 to 20 may be implemented 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 disk, USB storage device, removable hard disk) or a fixed recording medium (ROM, RAM, computer-equipped hard disk). can The computer program recorded in the computer-readable recording medium may be transmitted to another computing device through a network such as the Internet and installed in the other computing device, thereby being used in the other computing device.
이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합되거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다.In the above, even though all the components constituting the embodiment of the present invention are described as being combined or operating in combination, the present invention is not necessarily limited to this embodiment. That is, within the scope of the object of the present invention, all of the components may operate by selectively combining one or more.
도면에서 동작들이 특정한 순서로 도시되어 있지만, 반드시 동작들이 도시된 특정한 순서로 또는 순차적 순서로 실행되어야만 하거나 또는 모든 도시 된 동작들이 실행되어야만 원하는 결과를 얻을 수 있는 것으로 이해되어서는 안 된다. 특정 상황에서는, 멀티태스킹 및 병렬 처리가 유리할 수도 있다. 더욱이, 위에 설명한 실시예들에서 다양한 구성들의 분리는 그러한 분리가 반드시 필요한 것으로 이해되어서는 안 되고, 설명된 프로그램 컴포넌트들 및 시스템들은 일반적으로 단일 소프트웨어 제품으로 함께 통합되거나 다수의 소프트웨어 제품으로 패키지 될 수 있음을 이해하여야 한다.Although acts are shown in a particular order in the drawings, it should not be understood that the acts must be performed in the specific order or sequential order shown, or that all depicted acts must be performed to obtain a desired result. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various components in the embodiments described above should not be construed as necessarily requiring such separation, and the program components and systems described may generally be integrated together into a single software product or packaged into multiple software products. It should be understood that there is
이상 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로 이해해야만 한다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.Although embodiments of the present invention have been described above with reference to the accompanying drawings, those of ordinary skill in the art to which the present invention pertains can realize that the present invention can be embodied in other specific forms without changing the technical spirit or essential features. can understand Therefore, it should be understood that the embodiments described above are illustrative in all respects and not restrictive. The protection scope of the present invention should be construed by the following claims, and all technical ideas within the equivalent range should be construed as being included in the scope of the present invention.
Claims (12)
클라이언트 단말의 조회 요청과 무관하게 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하고, 상기 제1 블록의 데이터 레코드를 데이터베이스 모듈로 전송하는 블록 리스너 모듈; 및
상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하고, 상기 클라이언트 단말의 조회 요청에 응답하여 상기 데이터베이스에 저장된 데이터 레코드를 조회하며, 상기 조회된 데이터 레코드를 상기 클라이언트 단말에게 제공하는 데이터베이스 모듈을 포함하되,
상기 블록체인과 상기 데이터베이스에 저장되는 데이터 레코드는 데이터 필드와 해시 필드를 포함하고,
상기 해시 필드에는 상기 데이터 필드의 값에 대한 해시 값이 기록되는,
블록체인 기반 조회 서비스 제공 시스템.In the system that provides inquiry service based on block chain,
a block listener module for receiving the first block of the block chain from one or more block chain nodes constituting the block chain network irrespective of the inquiry request from the client terminal, and transmitting the data record of the first block to the database module; and
A database module that stores the data record of the first block in a database, inquires the data record stored in the database in response to the inquiry request of the client terminal, and provides the inquired data record to the client terminal,
The data records stored in the blockchain and the database include a data field and a hash field,
In the hash field, a hash value for the value of the data field is recorded,
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
블록체인 노드로부터 수신된 블록의 전송 상태 정보를 관리하되,
상기 전송 상태 정보는 상기 수신된 블록의 블록 번호와 상기 수신된 블록이 전송 완료되었는지 여부를 가리키는 플래그 정보를 포함하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.The method of claim 1,
The block listener module is
Manages the transmission status information of blocks received from blockchain nodes,
The transmission status information is characterized in that it includes a block number of the received block and flag information indicating whether the received block has been transmitted or not,
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
상기 제1 블록의 수신에 응답하여, 상기 전송 상태 정보에 상기 제1 블록의 번호와 매칭되는 제1 플래그 정보를 획득하고, 상기 제1 플래그 정보에 기초하여 상기 하나 이상의 데이터 레코드를 상기 데이터베이스 모듈로 전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.3. The method of claim 2,
The block listener module is
In response to receiving the first block, first flag information matching the number of the first block is obtained in the transmission status information, and the one or more data records are transferred to the database module based on the first flag information. characterized by transmitting
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
상기 데이터베이스 모듈로부터 ACK 메시지를 수신함에 응답하여, 상기 제1 블록의 플래그 정보를 갱신하고,
상기 데이터베이스 모듈로부터 상기 ACK 메시지가 수신되지 않는 경우, 상기 제1 블록을 재전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.3. The method of claim 2,
The block listener module is
In response to receiving the ACK message from the database module, updating the flag information of the first block,
When the ACK message is not received from the database module, characterized in that the first block is retransmitted,
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
상기 전송 상태 정보를 참조하여, 상기 제1 블록의 번호보다 낮은 번호를 갖는 블록 중 아직 전송이 완료되지 않은 미전송 블록을 식별하고, 상기 식별된 미전송 블록의 데이터 레코드를 상기 데이터베이스 모듈로 전송하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.3. The method of claim 2,
The block listener module is
Referring to the transmission status information, identifying an untransmitted block that has not yet been transmitted among blocks having a number lower than the number of the first block, and transmitting the data record of the identified untransmitted block to the database module characterized in that
Blockchain-based inquiry service provision system.
상기 블록체인 네트워크는 복수의 채널로 구성되고,
상기 블록 리스너 모듈은,
각 블록체인 노드가 소속된 채널의 정보를 수집하고, 상기 수집된 채널 정보를 기초로 채널 별로 블록 송신을 담당하는 노드를 지정하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.The method of claim 1,
The blockchain network consists of a plurality of channels,
The block listener module is
characterized in that each block chain node collects information on the channel to which it belongs, and designates a node responsible for block transmission for each channel based on the collected channel information,
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
담당 채널이 서로 중복되지 않도록 채널 별로 블록 송신을 담당하는 노드를 지정하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.7. The method of claim 6,
The block listener module is
characterized in that a node in charge of block transmission is designated for each channel so that the channel in charge does not overlap with each other,
Blockchain-based inquiry service provision system.
상기 블록 리스너 모듈은,
상기 수집된 채널 정보로부터 각 채널에 소속된 블록체인 노드의 개수를 산출하고, 상기 소속된 블록체인 노드의 개수가 적은 채널부터 많은 채널의 순서로 각 채널의 담당 노드를 지정하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.7. The method of claim 6,
The block listener module is
Calculating the number of blockchain nodes belonging to each channel from the collected channel information, and designating a node in charge of each channel in the order of the number of affiliated blockchain nodes from the smallest channel to the largest number of channels,
Blockchain-based inquiry service provision system.
상기 하나 이상의 블록체인 노드는,
데이터 소스로부터 시간적인 선후 관계를 갖는 제1 데이터와 제2 데이터를 수신함에 응답하여, 상기 제1 데이터와 상기 제1 데이터의 제1 해시 값을 포함하는 제1 데이터 레코드를 상기 블록체인에 기록하고, 상기 제1 해시 값과 상기 제2 데이터를 기초로 상기 제2 데이터의 제2 해시 값을 생성하며, 상기 제2 데이터와 상기 제2 해시 값을 포함하는 제2 데이터 레코드를 상기 블록체인에 기록하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.The method of claim 1,
The one or more blockchain nodes,
In response to receiving the first data and the second data having a temporal relationship from a data source, writing a first data record including the first data and a first hash value of the first data to the blockchain; , generates a second hash value of the second data based on the first hash value and the second data, and writes a second data record including the second data and the second hash value to the block chain characterized in that
Blockchain-based inquiry service provision system.
상기 데이터 소스는 IoT(Internet of Things) 디바이스이고,
상기 제1 데이터 및 상기 제2 데이터는 상기 IoT 디바이스에 의해 생성된 데이터인 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.10. The method of claim 9,
The data source is an Internet of Things (IoT) device,
The first data and the second data are characterized in that the data generated by the IoT device,
Blockchain-based inquiry service provision system.
제1 IoT 디바이스에 의해 생성된 제1 복수의 데이터 각각에는 제1 식별 값이 포함되고,
제2 IoT 디바이스에 의해 생성된 제2 복수의 데이터 각각에는 제2 식별 값이 포함되며,
상기 데이터베이스 모듈은,
상기 제1 식별 값을 상기 제1 복수의 데이터에 매칭하여 상기 데이터베이스에 저장하고, 상기 제2 식별 값을 상기 제2 복수의 데이터에 매칭하여 상기 데이터베이스에 저장하는 것을 특징으로 하는,
블록체인 기반 조회 서비스 제공 시스템.11. 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,
characterized in that the first identification value is matched with the first plurality of data and stored in the database, and the second identification value is matched with the second plurality of data and stored in the database,
Blockchain-based inquiry service provision system.
클라이언트 단말의 조회 요청과 무관하게 블록체인 네트워크를 구성하는 하나 이상의 블록체인 노드로부터 상기 블록체인의 제1 블록을 수신하는 단계;
상기 제1 블록의 데이터 레코드를 데이터베이스에 저장하는 단계; 및
상기 클라이언트 단말의 조회 요청에 응답하여, 상기 데이터베이스에 저장된 데이터 레코드를 조회하고, 상기 조회된 데이터 레코드를 상기 클라이언트 단말에게 제공하는 단계를 포함하되,
상기 블록체인과 상기 데이터베이스에 저장되는 데이터 레코드는 데이터 필드와 해시 필드를 포함하고,
상기 해시 필드에는 상기 데이터 필드의 값에 대한 해시 값이 기록되는,
블록체인 기반 조회 서비스 제공 방법.A method of providing a query service based on a block chain in at least one computing device, the method comprising:
receiving the first block of the block chain from one or more block chain nodes constituting the block chain network regardless of the inquiry request of the client terminal;
storing the data record of the first block in a database; and
In response to the inquiry request from the client terminal, querying the data record stored in the database, comprising the step of providing the queried data record to the client terminal,
The data records stored in the blockchain and the database include a data field and a hash field,
In the hash field, a hash value for the value of the data field is recorded,
How to provide a blockchain-based inquiry service.
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 KR20200048440A (en) | 2020-05-08 |
KR102448787B1 true 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) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102648498B1 (en) * | 2020-05-25 | 2024-03-19 | 한국전자통신연구원 | 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 |
CN112632121B (en) * | 2020-12-15 | 2024-04-16 | 京东科技控股股份有限公司 | Block chain data acquisition method and device |
CN113129146B (en) * | 2021-03-31 | 2023-11-24 | 南京质子链科技有限公司 | Intelligent contract transaction processing method, equipment and storage medium |
CN113505125A (en) * | 2021-06-11 | 2021-10-15 | 支付宝(杭州)信息技术有限公司 | Data uplink method and uplink proxy device |
CN113792102A (en) * | 2021-08-03 | 2021-12-14 | 德方智链科技(深圳)有限公司 | Service processing method based on block chain, electronic device and storage medium |
CN116645116B (en) * | 2023-06-12 | 2024-03-15 | 知晓(北京)通信科技有限公司 | Painting and calligraphy collection traceability system based on block chain |
Family Cites Families (3)
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 |
KR102026225B1 (en) * | 2017-01-19 | 2019-09-27 | 주식회사 케이티 | Apparatus for managing data using block chain and method thereof |
KR102382127B1 (en) * | 2017-04-05 | 2022-04-04 | 삼성에스디에스 주식회사 | System for processing data based on blockchain and Operating method thereof |
-
2018
- 2018-10-30 KR KR1020180130535A patent/KR102448787B1/en active IP Right Grant
Also Published As
Publication number | Publication date |
---|---|
KR20200048440A (en) | 2020-05-08 |
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 | |
US11561730B1 (en) | Selecting paths between a host and a storage system | |
KR102450411B1 (en) | Method and apparatus for prcocessing transaction based on bllockchain and system tehereof | |
US11526494B2 (en) | Blockchain-based computing system and method for managing transaction thereof | |
US8849776B2 (en) | Method and system for resolving data inconsistency | |
US9652414B1 (en) | Balancing response times for synchronous I/O requests having different priorities | |
WO2021068351A1 (en) | Cloud-storage-based data transmission method and apparatus, and computer device | |
CN111344706A (en) | Optimization of high volume transaction performance over blockchains | |
US10140033B2 (en) | Apparatus, system, and method for searching compressed data | |
US11507565B2 (en) | Accelerated processing apparatus for transaction and method thereof | |
US11030213B2 (en) | Transforming data structures and data objects for migrating data between databases having different schemas | |
US9298765B2 (en) | Apparatus and method for handling partially inconsistent states among members of a cluster in an erratic storage network | |
US9537940B2 (en) | Exchange of information between processing servers | |
CN110442601B (en) | Openstack mirror image data parallel acceleration method and device | |
US10284649B2 (en) | Distributed processing system | |
US11314813B2 (en) | Apparatus for guaranteeing integrity of state database in blockchain-based environment and method thereof | |
US20150172131A1 (en) | Method and system for verifying quality of server | |
US20190095106A1 (en) | Low-latency lightweight distributed storage system | |
WO2021174537A1 (en) | Data transmission method and apparatus | |
CN111611068B (en) | Data writing method in distributed system, server and client | |
US20170090790A1 (en) | Control program, control method and information processing device | |
US11003512B2 (en) | System and method for optimizing bulk data operation | |
US20210173878A1 (en) | Systems and methods of incremented aggregated data retrieval | |
KR20240044044A (en) | Method and System for Verification of End-to-End Data Integrity during Big Data Transfer |
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 |