KR20220032884A - Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method - Google Patents

Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method Download PDF

Info

Publication number
KR20220032884A
KR20220032884A KR1020200114760A KR20200114760A KR20220032884A KR 20220032884 A KR20220032884 A KR 20220032884A KR 1020200114760 A KR1020200114760 A KR 1020200114760A KR 20200114760 A KR20200114760 A KR 20200114760A KR 20220032884 A KR20220032884 A KR 20220032884A
Authority
KR
South Korea
Prior art keywords
data
iot
batch processing
outlier
iot data
Prior art date
Application number
KR1020200114760A
Other languages
Korean (ko)
Other versions
KR102507829B1 (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 KR1020200114760A priority Critical patent/KR102507829B1/en
Publication of KR20220032884A publication Critical patent/KR20220032884A/en
Application granted granted Critical
Publication of KR102507829B1 publication Critical patent/KR102507829B1/en

Links

Images

Classifications

    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/2852
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a batch processing method for storing Internet of things data (IoT) based on a blockchain and an IoT Internet system using the same. According to the present invention, the batch processing method comprises the following steps: determining whether IoT data provided from an IoT device in real-time is an outlier according to an outlier detection algorithm; when the data is not an outlier, sequentially storing the data in a temporary buffer to process the stored data in a batch manner; when the data is an outlier, collecting current IoT data and previous IoT data stored in a temporary buffer and transmitting the collected data to a smart contract for batch processing; and classifying, by the smart contract for batch processing, the transmitted current IoT data and previous IoT data according to preset rules to store the current IoT data, which is an outlier, in a blockchain and store the previous IoT data, which is not an outlier, in an external database. According to the present invention, time-series IoT data can processed in the batch manner.

Description

블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법 및 상기 방법을 이용한 IoT 데이터 저장 시스템{Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method}Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method

본 발명은 블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법 및 상기 방법을 이용한 IoT 데이터 저장 시스템에 관한 것으로서, 더욱 구체적으로는 실시간으로 발생하는 사물 인터넷 데이터들을 일괄 처리하고 스마트 컨트랙트에 따라 데이터를 분류하여 사물 인터넷 데이터를 블록체인과 외부 데이터베이스에 저장할 수 있도록 하여, 블록체인 프로토콜의 탈중앙성, 보안성 및 확장성을 유지하면서 IoT 데이터를 블록체인에 저장할 수 있도록 하는 IoT 데이터 저장을 위한 일괄 처리 방법에 관한 것이다. The present invention relates to a batch processing method for storing IoT data based on a block chain and an IoT data storage system using the method, and more particularly, to batch processing Internet of Things data generated in real time and data according to a smart contract Batch for IoT data storage that allows IoT data to be stored in the blockchain while maintaining the decentralization, security and scalability of the blockchain protocol by classifying IoT data to be stored in the blockchain and external databases It's about how to deal with it.

블록체인 네트워크 시스템은 탈중앙화 네트워크 구조로서 거래 참여자들이 모두 노드가 되어 Peer to Peer 방식으로 구성된다. 한편, 이더리움(Ethereum)은 블록체인 기술을 기반으로 스마트 컨트랙트 기능을 구현할 수 있는 분산 컴퓨팅 플랫폼이자 운영체제이다. 스마트 컨트랙트는 “당사자들이 다른 약속에 따라 수행하는 프로토콜을 포함하여 디지털 형식으로 지정된 일련의 약속”이라고 정의된다. 따라서, 스마트 컨트랙트는 사용자가 정의한 코드의 조건이 만족되면 계약이 성사된다. 스마트 컨트랙트 내의 모든 과정은 자동으로 이루어지며 모든 데이터를 서로 공유하기 때문에 특정한 사용자가 스마트 컨트랙트의 실행 결과를 조작할 수 없다. 따라서, 블록체인이 모든 트랜잭션의 무결성을 보장해 주는 방식으로 스마트 컨트랙트의 무결성도 보장할 수 있다. The blockchain network system is a decentralized network structure, and all transaction participants become nodes and are configured in a peer-to-peer manner. On the other hand, Ethereum is a distributed computing platform and operating system that can implement smart contract functions based on blockchain technology. A smart contract is defined as “a set of promises specified in digital form, including protocols that parties perform in accordance with other promises”. Therefore, the smart contract is concluded when the conditions of the code defined by the user are satisfied. All processes within the smart contract are automatic and all data is shared with each other, so a specific user cannot manipulate the execution result of the smart contract. Therefore, in the way that the blockchain guarantees the integrity of all transactions, the integrity of smart contracts can also be guaranteed.

한편, 블록체인은 확장성(Scalability), 보안성(Security), 탈중앙성(Decentralization)의 트릴레마(Trilemma)를 갖는다. 도 1은 블록체인 네트워크의 트릴레마를 도시한 모식도이다. 확장성이란 개별 노드의 자원이상으로 트랜잭션을 처리할 수 있는 능력을 말하며, 보안성은 블록체인이 자원을 가진 공격자로부터 일관성을 유지할 수 있는 안전한 정도를 의미하며, 탈중앙성은 제한된 자원을 가지고 블록체인에 참여할 수 있는 정도를 의미한다. On the other hand, blockchain has the trilemma of scalability, security, and decentralization. 1 is a schematic diagram illustrating a trilemma of a blockchain network. Scalability refers to the ability to process transactions beyond the resources of individual nodes, security refers to the degree of security that the blockchain can maintain consistency from attackers with resources, and decentralization refers to the degree of security that can be applied to the blockchain with limited resources. degree to which participation is possible.

한편, 사물 인터넷 네트워크는 사물 인터넷 기기인 센서들로부터 실시간 데이터들이 기하급수적으로 증가하게 되며, 이러한 대용량의 IoT 데이터들을 처리하고 저장해야 될 필요성이 증대되고 있다. 이러한 IoT 데이터는 특정한 시간(t)에서 측정된 데이터들이라는 점에서 시계열 데이터라고 볼 수 있다. IoT 데이터들에 대한 정확한 분석 결과를 도출하기 위하여는 이상치를 탐지하여 제거하고 분류하는 과정이 필요하다. On the other hand, in the Internet of Things network, real-time data from sensors, which are Internet of Things devices, increases exponentially, and the need to process and store large amounts of IoT data is increasing. These IoT data can be viewed as time series data in that they are data measured at a specific time (t). In order to derive accurate analysis results for IoT data, it is necessary to detect, remove, and classify outliers.

시계열 데이터는 시간에 따라 생성되는 데이터로 어떤 추세나 변화에 맞춰 상승하거나 하락하는 경향이 있다. 따라서 단순히 과거 데이터 분포를 보고 이상치(Outlier)를 탐지한다면 점점 상승하거나 하락하는 추세를 갖는 시계열 데이터를 분석하는 데에는 한계가 있다. 이러한 추세 패턴을 반영하여 이상치를 탐지하기 위해 사용할 수 있는 방법이 이동평균(Moving Average)과 기준 편차를 활용한 이상 탐지 모델이다. 이동평균을 측정하는 대표적인 방법으로 단순이동평균(SMA, Simple Moving Average)과 지수이동평균(EMA, Exponential Moving Average)이 있다.Time series data is data generated over time, and tends to rise or fall according to a certain trend or change. Therefore, if an outlier is detected simply by looking at the past data distribution, there is a limit to analyzing time series data that has a trend of increasing or decreasing. An anomaly detection model using a moving average and reference deviation is a method that can be used to detect outliers by reflecting this trend pattern. There are two representative methods for measuring moving averages, Simple Moving Average (SMA) and Exponential Moving Average (EMA).

블록체인과 사물 인터넷 기기간의 연동 방식은 (1) 사물 인터넷 장치에 블록체인을 직접 연동하는 방법, (2) 사물인터넷 플랫폼과 블록체인 네트워크를 연결하는 방법이다. 도 2는 사물인터넷 장치에 블록체인 네트워크를 직접 연동하는 시스템을 예시적으로 도시한 구성도이다. 도 2를 참조하면, 첫번째 방법은 각 IoT 기기가 블록체인 네트워크의 노드가 되어 데이터를 생성하고 저장하는 방법으로서, IoT 장치내에 경량 블록체인 미들웨어를 탑재하여 장치에서 측정된 데이터를 보낼 수 있게 된다. The interlocking method between the block chain and the IoT device is (1) the method of directly interworking the block chain with the IoT device, and (2) the method of connecting the IoT platform and the block chain network. 2 is a configuration diagram exemplarily illustrating a system for directly interworking a block chain network with an IoT device. Referring to FIG. 2 , the first method is a method in which each IoT device becomes a node of a block chain network to generate and store data. By mounting a lightweight block chain middleware in the IoT device, data measured by the device can be transmitted.

도 3은 사물인터넷 플랫폼과 블록체인 네트워크를 연결하는 시스템을 예시적으로 도시한 구성도이다. 전술한 두번째 방법은 사물 인터넷 플랫폼과 블록체인 클라이언트를 연결하는 방법으로서, 도 3을 참조하면, 사물 인터넷 플랫폼에서 기기별로 생성된 데이터를 처리하여 블록체인 프록시 서버를 거쳐 최종적으로 데이터를 블록체인에 저장한다. 두번째 방법은 IoT 플랫폼에서 데이터 전처리 과정을 거쳐 데이터를 저장하기 때문에 사물 인터넷 플랫폼과 블록체인 네트워크와의 공존이 가능하다. 3 is a configuration diagram exemplarily illustrating a system for connecting an IoT platform and a block chain network. The second method described above is a method of connecting the IoT platform and the blockchain client. Referring to FIG. 3, the IoT platform processes data generated for each device, passes through the blockchain proxy server, and finally stores the data in the blockchain. do. The second method enables the coexistence of IoT platforms and blockchain networks because data is stored through data pre-processing on the IoT platform.

한편, 블록체인 노드를 활용하면 분산 네트워크화를 통해 중앙 서버가 불필요하며 비용이 절감되며 블록체인 기술을 활용하여 보안성과 데이터 무결성을 보장할 수 있다. 하지만, IoT 기기의 개수가 증가함에 따라 실시간 트랜잭션이 기하 급수적으로 증가하게 되고, 이로 인해 블록체인의 트랜잭션 처리량의 한계로 인하여 IoT 기기에서 생성되는 데이터들을 실시간으로 처리할 수 없게 되는 문제점이 발생한다. On the other hand, if a blockchain node is used, a central server is unnecessary through distributed networking, costs are reduced, and security and data integrity can be ensured by utilizing blockchain technology. However, as the number of IoT devices increases, real-time transactions increase exponentially, which causes a problem in that data generated from IoT devices cannot be processed in real time due to the limitation of transaction throughput of the block chain.

이러한 문제점들로 인하여, 블록체인 네트워크와 IoT 네트워크의 융합을 위해 블록체인의 트랜잭션 처리량을 높이기 위한 다양한 시도들이 제안되고 있다. 이러한 시도들로는, 비순환 그래프(DAG)를 도입한 IOTA 방법, 참여자의 서버 성능을 제한하는 허가형 블록체인 방법, 선별적인 데이터를 저장하는 데이터 전처리 방법등이 있다. 전술한 IOTA 방법은 블록체인이 아닌 비순환 그래프를 통해 처리량을 높이는 방식으로 코디네이터가 노드의 거래량과 처리속도를 관리한다는 점에서 탈중앙성과 보안성은 낮아졌다. 전술한 허가형 블록체인을 통한 처리량 해결법은 블록체인에 참여하는 노드의 성능을 제한하여 처리량을 높이는 방식으로서, 네트워크에 참여할 수 있는 노드는 지정된 노드만 참여가 가능하며 Hyperledger Fabric과 같은 프라이빗 네트워크(Private Network)에서 실행된다. 이를 통해 한 번에 처리되는 데이터의 양을 늘릴 수는 있지만 연산량과 메모리 제한이 있는 IoT기기에서 실행하기 어려운 환경이다. 전술한 데이터 전처리 방식은 중앙 서버에서 IoT 기기에서 발생하는 데이터를 모아뒀다가 원본 데이터(Raw Data)를 가공하여 블록체인 네트워크로 전달하는 방식으로서, 기존의 클라우드 네트워크 환경과 비슷하게 단일 지점 장애 문제가 생길 수 있으며 보안성과 탈중앙성을 만족하지 못한다.Due to these problems, various attempts have been made to increase the transaction throughput of the block chain for the convergence of the block chain network and the IoT network. Examples of these attempts include the IOTA method that introduces an acyclic graph (DAG), a permissioned blockchain method that limits the server performance of participants, and a data preprocessing method that stores selective data. The above-mentioned IOTA method increases the throughput through the acyclic graph rather than the block chain, and the decentralization and security are lowered in that the coordinator manages the transaction volume and processing speed of the node. The above-described throughput solution through the permissioned blockchain is a method to increase throughput by limiting the performance of nodes participating in the blockchain. Only designated nodes can participate in the network, and private networks (such as Hyperledger Fabric) network) is executed. Although it is possible to increase the amount of data processed at one time through this, it is difficult to run in an IoT device with limited computational amount and memory. The aforementioned data pre-processing method collects data generated from IoT devices in a central server, processes raw data and transmits it to the block chain network. Similar to the existing cloud network environment, a single point of failure problem may occur. and does not satisfy security and decentralization.

이와 같이, 데이터 처리량을 높이기 위한 기존의 방법들은 블록체인의 탈중앙성을 포기하고 처리량만을 높이거나 탈중앙성과 보안성을 해치고 확장성만을 늘리는 방안들이 대부분이다. As such, most of the existing methods for increasing data throughput give up the decentralization of the block chain and increase only the throughput, or compromise decentralization and security and increase only the scalability.

따라서, 본 발명은 탈중앙성과 보안성을 고려하여 확장성을 늘리는 방안을 제안하고자 한다. Accordingly, the present invention intends to propose a method of increasing scalability in consideration of decentralization and security.

한국등록특허공보 제 10-1992981호Korean Patent Publication No. 10-1992981 한국등록특허공보 제 10-2041341호Korean Patent Publication No. 10-2041341

전술한 문제점을 해결하기 위한 본 발명의 목적은 블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법을 제공하는 것이다. An object of the present invention for solving the above-mentioned problems is to provide a batch processing method for storing IoT data based on a block chain.

본 발명의 다른 목적은 IoT 데이터를 블록체인 네트워크에 저장함에 있어서 IoT 데이터 저장을 일괄 처리하도록 함으로써, 블록체인 네트워크의 탈중앙성과 보안성을 고려하여 확장성을 늘릴 수 있도록 한 블록체인을 기반으로 한 IoT 데이터 저장을 위한 IoT 플랫폼을 제공하는 것이다. Another object of the present invention is to perform batch processing of IoT data storage in storing IoT data in a blockchain network, thereby increasing scalability in consideration of decentralization and security of the blockchain network. It is to provide an IoT platform for storing IoT data.

전술한 기술적 과제를 달성하기 위한 본 발명의 제1 특징에 따른 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법은, (a) IoT 네트워크 시스템으로부터 발생되는 IoT 데이터를 제공받는 단계; (b) 상기 IoT 데이터에 대한 초기 평균값을 설정하는 단계; (c) 상기 IoT 데이터가 초기 평균값을 설정한 이후에 제공된 데이터이면, 사전 설정된 이상치 탐지 알고리즘에 따라 상기 제공된 상기 IoT 데이터가 이상치인지 여부를 판단하는 단계; (d) 상기 데이터가 이상치가 아니면, 임시 버퍼에 순차적으로 저장하여 일괄 처리하는 단계; (e) 상기 데이터가 이상치이면, 현재 IoT 데이터와 임시 버퍼에 저장된 이전 IoT 데이터들을 모아서 일괄 처리용 스마트 컨트랙트로 전송하는 단계; (f) 상기 일괄 처리용 스마트 컨트랙트에 의해, 상기 전송된 현재 IoT 데이터와 이전 IoT 데이터들은, 사전 설정된 규칙에 따라 분류되어 하나의 블록으로 생성되어 블록체인에 저장되거나, 외부 데이터베이스에 저장되는 단계; 를 구비하여, 시계열 IoT 데이터들을 일괄 처리한다. A batch processing method for storage of IoT data based on a block chain according to a first aspect of the present invention for achieving the above-described technical problem includes the steps of: (a) receiving IoT data generated from an IoT network system; (b) setting an initial average value for the IoT data; (c) if the IoT data is data provided after setting an initial average value, determining whether the provided IoT data is an outlier according to a preset outlier detection algorithm; (d) if the data is not an outlier, sequentially storing the data in a temporary buffer for batch processing; (e) if the data is an outlier, collecting the current IoT data and previous IoT data stored in a temporary buffer and transmitting it to a smart contract for batch processing; (f) by the smart contract for batch processing, the transmitted current IoT data and previous IoT data are classified according to a preset rule, generated as one block, and stored in a block chain or stored in an external database; by providing batch processing of time-series IoT data.

전술한 제1 특징에 따른 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법에 있어서, 상기 (b) 단계의 초기 평균값 설정 단계는, 상기 데이터가 초기 데이터이면, 임시 버퍼에 저장된 초기 데이터 양이 사전 설정된 배치 사이즈(N)보다 작을 경우, 임시 버퍼에 N 만큼 데이터가 발생될 때까지 기다린 후, 이동 평균을 통해 초기 평균값을 구하는 것이 바람직하다. In the batch processing method for storage of IoT data based on the block chain according to the first feature described above, the initial average value setting step of step (b) includes, if the data is initial data, initial data stored in a temporary buffer When the amount is smaller than the preset batch size (N), it is preferable to wait until N data is generated in the temporary buffer, and then obtain an initial average value through a moving average.

전술한 제1 특징에 따른 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법에 있어서, 상기 (c) 단계의 이상치 탐지 알고리즘은, (b1) 상기 데이터에 대하여 지수 이동 평균 방법에 따라 가중치를 두어 평균값을 구하는 단계; (b2) 현재 데이터의 이동 평균값과 이전 데이터의 편차의 크기와 사전 설정된 기준 편차값을 비교하여 이상치를 탐지하는 단계; 를 구비하는 것이 바람직하다. In the batch processing method for storage of IoT data based on the block chain according to the first feature described above, the outlier detection algorithm of step (c) includes: (b1) weighting the data according to the exponential moving average method to obtain an average value by placing ; (b2) detecting an outlier by comparing the moving average value of the current data with the size of the deviation of the previous data with a preset reference deviation value; It is preferable to have

전술한 제1 특징에 따른 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법에 있어서, 상기 기준 편차값은 이상치를 탐지하는 민감도에 따라 결정되는 것이 바람직하다. In the batch processing method for storage of IoT data based on the block chain according to the first feature described above, the reference deviation value is preferably determined according to the sensitivity of detecting an outlier.

전술한 제1 특징에 따른 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법에 있어서, 상기 (f) 단계는, 상기 일괄 처리용 스마트 컨트랙트에 의해, 상기 전송된 현재 데이터와 이전 데이터들 중 이상치인 현재 데이터는 블록으로 생성되어 블록체인에 저장되며, 정상값인 이전 데이터들은 외부 데이터베이스에 저장되는 것이 바람직하다. In the batch processing method for storage of IoT data based on the block chain according to the first feature described above, the step (f) includes the current data and previous data transmitted by the smart contract for batch processing. It is desirable that the current data, which is a medium outlier, is created as a block and stored in the block chain, and the previous data, which is a normal value, is stored in an external database.

본 발명의 제2 특징에 따른 블록체인을 기반으로 한 사물인터넷 시스템은, 사물 인터넷 기기로부터 발생된 IoT 데이터를 실시간으로 수신하고, IoT 데이터에 대한 초기 평균값을 구하고, 상기 초기 평균값을 이용하여 사전 설정된 이상치 탐지 알고리즘에 따라 IoT 데이터가 이상치인지 여부를 판단하고, 판단 결과가 이상치가 아니면 현재 IoT 데이터를 임시 버퍼에 저장하고, 판단 결과가 이상치이면 현재 IoT 데이터 및 임시 버퍼에 저장된 이전 데이터들을 묶어서 블록체인 프록시 서버로 전송하여 일괄 처리하는 사물인터넷 플랫폼; 상기 사물 인터넷 플랫폼으로부터 현재 데이터 및 이전 데이터들이 전송되면, 상기 현재 데이터 및 이전 데이터들을 매개 변수로 하여 일괄 처리용 스마트 컨트랙트를 호출하는 블록체인 프록시 서비; 및 복수 개의 블록체인 노드들로 이루어지고, 일괄 처리용 스마트 컨트랙트를 구비하는 블록체인 네트워크;를 구비하고, 상기 일괄 처리용 스마트 컨트랙트는 현재 데이터 및 이전 데이터들이 매개변수로 입력되어 호출되면, 사전 설정된 규칙에 따라 매개 변수들을 분류하여 저장한다. The IoT system based on the block chain according to the second aspect of the present invention receives IoT data generated from an IoT device in real time, obtains an initial average value for IoT data, and uses the initial average value to set a preset value. According to the outlier detection algorithm, it is determined whether the IoT data is an outlier, and if the determination result is not an outlier, the current IoT data is stored in a temporary buffer. IoT platform for batch processing by sending to a proxy server; a blockchain proxy service that calls a smart contract for batch processing using the current data and previous data as parameters when the current data and previous data are transmitted from the IoT platform; and a block chain network composed of a plurality of block chain nodes and having a smart contract for batch processing, wherein the smart contract for batch processing is preset when current data and previous data are input as parameters and called The parameters are classified and saved according to the rules.

전술한 제2 특징에 따른 블록체인을 기반으로 한 사물인터넷 시스템에 있어서, 상기 사물인터넷 플랫폼은, 실시간으로 수신된 IoT 데이터가 초기 데이터이면, 임시 버퍼에 저장된 초기 데이터 양이 사전 설정된 배치 사이즈(N)보다 작을 경우, 임시 버퍼에 N 만큼 데이터가 발생될 때까지 기다린 후, 이동 평균을 통해 초기 평균값을 구하는 것이 바람직하다. In the IoT system based on the block chain according to the second feature, if the IoT data received in real time is initial data, the initial data amount stored in the temporary buffer is set to a preset batch size (N ), it is desirable to obtain the initial average value through a moving average after waiting until N data is generated in the temporary buffer.

전술한 제2 특징에 따른 블록체인을 기반으로 한 사물인터넷 시스템에 있어서, 상기 이상치 탐지 알고리즘은, 상기 데이터에 대하여 지수 이동 평균 방법에 따라 가중치를 두어 평균값을 구하고, 현재 IoT 데이터의 이동 평균값과 이전 데이터의 편차의 크기와 사전 설정된 기준 편차값을 비교하여 이상치를 탐지하는 것이 바람직하다. In the IoT system based on the block chain according to the second feature described above, the outlier detection algorithm calculates an average value by weighting the data according to an exponential moving average method, and compares the moving average value of the current IoT data with the previous It is desirable to detect an outlier by comparing the magnitude of the deviation in the data with a preset reference deviation value.

전술한 제2 특징에 따른 블록체인을 기반으로 한 사물인터넷 시스템에 있어서, 상기 기준 편차값은 이상치를 탐지하는 민감도에 따라 결정되는 것이 바람직하다. In the IoT system based on the block chain according to the second feature described above, the reference deviation value is preferably determined according to the sensitivity of detecting an outlier.

전술한 제2 특징에 따른 블록체인을 기반으로 한 사물인터넷 시스템에 있어서, 상기 일괄 처리용 스마트 컨트랙트는, 상기 전송된 현재 IoT 데이터와 이전 IoT 데이터들 중 이상치인 현재 데이터는 블록으로 생성하여 블록체인에 저장하며, 정상값인 이전 데이터들은 외부 데이터베이스에 저장하는 것이 바람직하다. In the IoT system based on the block chain according to the second aspect, the smart contract for batch processing generates block chain It is desirable to store the previous data, which are normal values, in an external database.

본 발명에 따른 블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법은, IoT 데이터를 일괄 처리함으로써 기존의 개별 처리 방법보다 데이터 개수에 따른 저장 공간을 감소시키게 된다. The batch processing method for IoT data storage based on the block chain according to the present invention reduces the storage space according to the number of data compared to the existing individual processing method by batch processing IoT data.

또한, 본 발명에 따른 블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법은, 기준 편차의 크기를 조정함에 따라 이상치 탐지에 대한 민감도를 조절할 수 있게 된다. 즉, 기준 편차를 크게 설정하면 이상치를 탐지하는 횟수가 감소하여 민감도가 감소되며, 기준 편차를 작게 설정하면 이상치를 팀지하는 횟수가 증가하게 되어 민감도가 증가하게 된다. In addition, the batch processing method for IoT data storage based on the block chain according to the present invention can adjust the sensitivity to outlier detection by adjusting the size of the reference deviation. That is, if the reference deviation is set to be large, the number of times of detecting outliers is decreased and the sensitivity is reduced.

또한, 블록체인을 기반으로 한 IoT 데이터 저장을 위한 일괄 처리 방법은, 기준 편차에 따라 한번에 처리되는 데이터의 개수가 달라지므로, 기준 편차가 커짐에 따라 데이터의 처리량이 증가될 수 있다. In addition, in the batch processing method for storing IoT data based on the block chain, the number of data processed at one time varies according to the reference deviation, so that the data throughput can be increased as the reference deviation increases.

전술한 구성을 갖는 본 발명에 따른 일괄 처리 방법을 적용함으로써, 블록체인 네트워크의 탈중앙성 및 보안성을 그대로 유지하면서 확장성을 향상시킬 수 있게 된다. By applying the batch processing method according to the present invention having the above configuration, it is possible to improve the scalability while maintaining the decentralization and security of the blockchain network.

도 1은 블록체인 네트워크의 트릴레마를 도시한 모식도이다.
도 2는 사물인터넷 장치에 블록체인 네트워크를 직접 연동하는 시스템을 예시적으로 도시한 구성도이다.
도 3은 사물인터넷 플랫폼과 블록체인 네트워크를 연결하는 시스템을 예시적으로 도시한 구성도이다.
도 4는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법을 개략적으로 도시한 흐름도이다.
도 5는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법을 구현하기 위한 일괄 처리 알고리즘을 도시한 흐름도이다.
도 6은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 이상치 탐지 알고리즘을 도시한 흐름도이다.
도 7은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 이상치 탐지를 통한 데이터 일괄 처리 과정을 도시한 흐름도이다.
도 8은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 사용자 규칙 기반의 데이터 필터링 알고리즘을 도시한 코드이다.
도 9는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 데이터개수에 따른 저장 공간 크기 비교 그래프이다.
도 10은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 배치 개수 비교 그래프이다.
도 11은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 데이터 처리량 비교 그래프이다.
도 12는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 이상치 탐지 확률 그래프이다.
1 is a schematic diagram illustrating a trilemma of a blockchain network.
2 is a configuration diagram exemplarily illustrating a system for directly interworking a block chain network with an IoT device.
3 is a configuration diagram exemplarily illustrating a system for connecting an IoT platform and a block chain network.
4 is a flowchart schematically illustrating a batch processing method for IoT data storage according to a preferred embodiment of the present invention.
5 is a flowchart illustrating a batch processing algorithm for implementing a batch processing method for IoT data storage according to a preferred embodiment of the present invention.
6 is a flowchart illustrating an outlier detection algorithm in a batch processing method for IoT data storage according to a preferred embodiment of the present invention.
7 is a flowchart illustrating a data batch processing process through outlier detection in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.
8 is a code illustrating a data filtering algorithm based on a user rule in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.
9 is a graph comparing the storage space size according to the number of data in the batch processing method for IoT data storage according to a preferred embodiment of the present invention.
10 is a graph comparing the number of batches according to a reference deviation size in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.
11 is a data throughput comparison graph according to a reference deviation size in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.
12 is a graph showing an outlier detection probability according to a reference deviation size in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 따른 IoT 데이터의 저장에 대한 일괄 처리 방법 및 이를 이용한 블록체인을 기반으로 한 IoT 시스템에 대하여 구체적으로 설명한다. Hereinafter, a batch processing method for storage of IoT data and an IoT system based on a block chain using the same according to a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

본 발명에 따른 IoT 시스템은, 사물인터넷 기기들과 연결된 사물인터넷 플랫폼, 블록체인 노드들로 이루어진 블록체인 네트워크, 상기 사물인터넷 플랫폼과 블록체인 네트워크를 연결하는 블록체인 프록시 서버로 이루어진다. 상기 사물인터넷 플랫폼은 사물인터넷 기기들로부터 발생된 IoT 데이터들이 실시간으로 수신되면, 후술하는 IoT 데이터의 저장에 대한 일괄 처리 방법을 통해 블록체인 네트워크의 블록체인에 저장하게 된다. 본 발명에 따른 사물인터넷 플랫폼은, IoT 데이터들에 대하여 이상치 탐지 함수를 실행하여 IoT 데이터가 이상치인지 정상값인지 여부를 판단하며, 정상값이면 임시 버퍼에 순차적으로 저장하여 일괄처리할 수 있도록 하며, 이상치이면 현재 데이터 및 임시 버퍼에 저장된 이전 데이터들을 문자 스트링으로 나열하여 블록체인 프록시 서버로 전송한다. 블록체인 프록시 서버는 사물인터넷 플랫폼으로부터 전송받은 문자 스트링을 매개 변수로 하여 일괄 처리용 스마트 컨트랙트를 호출한다. 일괄 처리용 스마트 컨트랙트는 문자 스트링의 형태로 전달받은 이상치와 이전 데이터들을 사전 설정된 규칙에 따라 분류하여, 이상치는 블록체인에 저장하고 정상값들은 외부 데이터베이스에 저장한다. The IoT system according to the present invention includes an IoT platform connected to IoT devices, a blockchain network composed of blockchain nodes, and a blockchain proxy server that connects the IoT platform and the blockchain network. In the IoT platform, when IoT data generated from IoT devices is received in real time, it is stored in the blockchain of the blockchain network through a batch processing method for storage of IoT data, which will be described later. The IoT platform according to the present invention executes an outlier detection function on IoT data to determine whether the IoT data is an outlier or a normal value, and if it is a normal value, sequentially stores it in a temporary buffer for batch processing, If it is an outlier, the current data and previous data stored in the temporary buffer are listed as character strings and sent to the blockchain proxy server. The blockchain proxy server calls the smart contract for batch processing using the character string received from the IoT platform as a parameter. The smart contract for batch processing classifies outliers and previous data delivered in the form of character strings according to preset rules, and stores the outliers in the block chain and the normal values in an external database.

이하, 본 발명에 따른 IoT 데이터 저장을 위한 일괄 처리 방법에 대하여 구체적으로 설명한다. Hereinafter, the batch processing method for storing IoT data according to the present invention will be described in detail.

도 4는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법을 개략적으로 도시한 흐름도이다. 도 4를 참조하면, 본 발명에 따른 IoT 데이터 저장에 대한 일괄 처리 방법은, 지수 이동 평균(EMA, Exponential Moving Average)을 이용하여 실시간으로 발생하는 데이터의 일괄 처리(Batch Processing) 기준을 정하는 것으로서, IoT 네트워크로부터 실시간으로 IoT 데이터를 받아와서, 데이터 전처리후에 스마트 컨트랙트를 호출하여 블록체인 네트워크에 저장하거나 외부의 데이터베이스에 저장한다. 4 is a flowchart schematically illustrating a batch processing method for IoT data storage according to a preferred embodiment of the present invention. 4, the batch processing method for IoT data storage according to the present invention determines a batch processing standard of data generated in real time using an exponential moving average (EMA), It receives IoT data in real time from the IoT network, calls a smart contract after data preprocessing, and stores it in the blockchain network or in an external database.

본 발명에 있어서, 이동평균을 구하기 위한 배치 사이즈는 N으로 정의한다. 시점 t에서 발생한 데이터는 datat로 정의하여 이에 따라 현재 데이터의 지수 이동 평균값과 이동 기준 편차값은 차례로 EMAt, EMSt로 구분한다. 지수 이동 평균값, 이동 기준 편차값 및 이상치는 아래의 수학식 1, 2, 3에 의해 각각 얻을 수 있다. In the present invention, the batch size for obtaining the moving average is defined as N. The data generated at time t is defined as data t , and accordingly, the exponential moving average value of the current data and the moving reference deviation value are sequentially divided into EMA t and EMS t . The exponential moving average value, the moving reference deviation value, and the outlier can be obtained by Equations 1, 2, and 3 below, respectively.

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

Figure pat00003
Figure pat00003

스마트 컨트랙트는 함수 매개 변수로 배열을 받을 수 없기 때문에, 하나의 값이 아닌 일괄 처리가 필요한 데이터는 문자 열(String) 형태로 변환하여 전달한다. 따라서, 본 발명에서는 일괄 처리된 문자열을 batch string이라고 정의하며, 컨트랙트 내에서 문자열을 파싱하여 배열에 저장하게 된다. Since smart contracts cannot receive an array as a function parameter, data that requires batch processing rather than a single value is converted into a string and delivered. Therefore, in the present invention, a batch-processed string is defined as a batch string, and the string is parsed in the contract and stored in an array.

먼저, 초기 단계에서는, 일괄 처리를 진행하기 전에 사용자가 정한 일정 기간 만큼의 데이터가 모일 때까지 기다린다. 이때, 초기 단계의 데이터는 서버의 임시 버퍼에 저장되며, 초기 단계에서의 이동 평균은 단순 이동 평균 방법을 통해 초기 평균값이 구해진다. 초기 평균값이 구해진 이후의 데이터는 지수 이동 평균 방법을 이용하여 최신 데이터에 가중치를 두어 평균값을 구하게 된다. First, in the initial stage, it waits until the data for a certain period determined by the user is collected before proceeding with the batch processing. At this time, the data of the initial stage is stored in a temporary buffer of the server, and the initial average value of the moving average in the initial stage is obtained through a simple moving average method. After the initial average is obtained, the average value is obtained by weighting the latest data using the exponential moving average method.

다음, 현재 데이터의 이동 평균값과 이전 데이터의 편차의 크기를 비교하여 이상치를 탐지하게 된다. 이상치 탐지 과정을 통해 데이터를 함께 처리할 지, 하나의 값을 보낼지 결정된 후, 일괄 처리용 스마트 컨트랙트로 값이 전달된다. 이때, 일괄 처리용 스마트 컨트랙트로 전달된 값은 사용자에 의해 사전 설정된 규칙에 따라 저장 공간이 블록체인과 외부 데이터베이스로 나뉘게 된다. Next, an outlier is detected by comparing the moving average value of the current data with the size of the deviation of the previous data. After determining whether to process data together or to send a single value through the outlier detection process, the value is transmitted to the smart contract for batch processing. At this time, the storage space of the value delivered to the smart contract for batch processing is divided into a block chain and an external database according to a rule preset by the user.

도 5는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법을 구현하기 위한 일괄 처리 알고리즘을 도시한 흐름도이다. 5 is a flowchart illustrating a batch processing algorithm for implementing a batch processing method for IoT data storage according to a preferred embodiment of the present invention.

도 5를 참조하면, 본 발명에 있어서, 일괄 처리하는 기준은 이상치를 탐지하기 전과 후로 구분이 되며, 실시간으로 발생하는 데이터가 이상치가 아니면 임시 버퍼에 데이터들을 모아두었다가, 이상치가 발생한 순간에 데이터들을 일괄 처리하게 된다. 처리되는 데이터는 이상치인 현재 측정값과 현재 측정값 이전까지 모아진 데이터들로서, 이들은 일괄 처리용 스마트 컨트랙트로 보내게 된다. Referring to FIG. 5 , in the present invention, the standard for batch processing is divided into before and after detecting an outlier, and if the data generated in real time is an outlier, the data is collected in a temporary buffer, will be processed in batches. The processed data is the current measurement value, which is an outlier, and data collected before the current measurement value, and these are sent to the smart contract for batch processing.

본 발명에 있어서, 지수 이동 평균 방법을 적용할 때, a 값에 따라 최근 데이터의 가중치가 결정된다. 본 발명에서는 일반적으로 많이 사용되는 a 값을 2/(N+1) 로 정의한다. 초기 데이터의 양이 배치 사이즈(N)보다 작을 경우, 임시 버퍼에 N 만큼 데이터가 발생할 때까지 기다린 후, 초기 평균은 단순 이동 평균을 통해 초기 평균값을 구한다. 초기 평균값이 구해진 이후 발생되는 데이터는 지수 이동 평균 방법에 따라 가중치를 두어 평균값을 구한다. 초기 평균값이 설정되면 이상치 탐지 함수(Outlier Detection)를 호출하여 현재 데이터의 값이 기존 데이터보다 편차가 큰 데이터인지 아니면 정상값인지를 판단하여 결과값에 따라 데이터의 처리방식이 정해진다. 이상치 탐지 함수의 반환값이 TRUE 이면 해당 데이터의 값과 그 이전까지의 일괄 처리된 데이터들의 문자열을 컨트랙트의 매개변수로 전달된다. 이상치 탐지 함수의 반환값이 FALSE 이면 이상치가 탐지되지 않은 것이므로 기존 일괄 처리된 데이터에 현재 데이터를 추가한다. 이를 통해, 이상치가 탐지되는 경우에만 컨트랙트를 호출함으로써, 컨트랙트 호출시 발생되는 하나의 트랜잭션에서 여러 개의 데이터를 담게 되어 처리 시간이 향상될 수 있다. In the present invention, when the exponential moving average method is applied, the weight of recent data is determined according to the value of a. In the present invention, a commonly used value of a is defined as 2/(N+1). When the amount of initial data is smaller than the batch size (N), after waiting until N data is generated in the temporary buffer, the initial average is obtained through a simple moving average. The data generated after the initial average value is obtained is weighted according to the exponential moving average method to obtain the average value. When the initial average value is set, an outlier detection function is called to determine whether the current data value is data with a larger deviation than the existing data or a normal value, and the data processing method is determined according to the result value. If the return value of the outlier detection function is TRUE, the value of the data and the string of data processed in batches up to that point are passed as parameters of the contract. If the return value of the outlier detection function is FALSE, the outlier has not been detected, so the current data is added to the existing batched data. Through this, by calling the contract only when an outlier is detected, multiple data can be included in one transaction generated when the contract is called, thereby improving processing time.

데이터를 처리할 때 기존의 데이터의 추세와 크게 차이가 나는 값은 데이터를 분석하는 데 있어 왜곡된 결과를 얻을 수 있다. 정확한 분석 결과를 얻기 위해서는 실시간으로 발생하는 센서 데이터의 이상치를 측정하는 것이 중요하다. 본 발명에서는 이상치를 탐지하기 위하여 일정 기간 구해진 지수 이동 평균과 현재 데이터의 편차를 활용한다. When processing data, values that are significantly different from the existing data trends may result in distorted data analysis. In order to obtain accurate analysis results, it is important to measure outliers in sensor data that occur in real time. In the present invention, the deviation between the exponential moving average obtained for a certain period of time and the current data is used to detect an outlier.

도 6은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 이상치 탐지 알고리즘을 도시한 흐름도이다. 도 7은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 이상치 탐지를 통한 데이터 일괄 처리 과정을 도시한 흐름도이다. 6 is a flowchart illustrating an outlier detection algorithm in a batch processing method for IoT data storage according to a preferred embodiment of the present invention. 7 is a flowchart illustrating a data batch processing process through outlier detection in a batch processing method for storing IoT data according to a preferred embodiment of the present invention.

도 6 및 도 7을 참조하면, 본 발명에 따른 방법에서는 이상치를 탐지하기 위하여 비교하는 기준 편차의 크기는 사용자에 의해 사전 설정된 민감도 비율에 따라 달라진다. n 값이 작을수록 이상치라고 판단하는 경우가 많아지며, n 값이 클수록 정상치로 판단되는 경우가 많아져, 일괄 처리되는 데이터의 양이 많아진다. 따라서, 데이터의 특성에 맞게 값의 편차에 따라 값을 적절하게 조정되어야 한다. 6 and 7 , in the method according to the present invention, the size of the reference deviation to be compared to detect an outlier varies according to a sensitivity ratio preset by the user. The smaller the value of n, the more cases it is judged to be an outlier. The larger the value of n, the more cases it is judged to be a normal value, resulting in an increase in the amount of data to be processed in batches. Therefore, the value should be appropriately adjusted according to the deviation of the value according to the characteristics of the data.

본 발명에서는 데이터의 저장 공간을 블록체인과 외부 데이터베이스로 구분한다. 도 8에 따라 데이터를 저장할 곳을 결정하게 된다. In the present invention, the data storage space is divided into a block chain and an external database. A location to store data is determined according to FIG. 8 .

도 8은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 사용자 규칙 기반의 데이터 필터링 알고리즘을 도시한 코드이다. 도 8은 스마트 컨트랙트 내 진행되는 코드를 나태내며, 사용자가 처음 지정한 규칙에 따라 부합되는 데이터는 블록체인에 저장되며, 외부 데이터베이스에는 이상치를 제외한 정상값들이 배치 형태로 저장된다. 데이터의 형태는 데이터가 생성된 시간(TIMESTAMP)과 현재 데이터의 값이 저장된다. 8 is a code illustrating a data filtering algorithm based on a user rule in a batch processing method for storing IoT data according to a preferred embodiment of the present invention. FIG. 8 shows the code in progress in the smart contract, data matching the rules initially specified by the user is stored in the block chain, and normal values excluding outliers are stored in the external database in batch form. As for the data type, the time when the data was created (TIMESTAMP) and the value of the current data are stored.

본 발명에서 제안한 방법에 따른 연속적인 데이터 처리를 위한 성능 측정을 위해 기준 편차의 크기와 데이터 개수에 따라 처리되는 시간 및 저장 공간의 변화에 대한 실험을 진행함으로써, 일괄 처리와 개별 처리에 따른 저장 공간과 처리 시간의 비교를 통해 본 발명에 따른 방법의 효율성을 평가한다. In order to measure the performance for continuous data processing according to the method proposed in the present invention, by conducting an experiment on the change in processing time and storage space according to the size of the reference deviation and the number of data, storage space according to batch processing and individual processing Efficiency of the method according to the invention is evaluated by comparing the treatment time with

먼저, 데이터 개수에 따라 기존의 방법에 따라 개별 처리했을 때의 저장 공간과 본 발명에 따라 일괄 처리했을 때의 저장 공간을 비교한다. 도 9는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 데이터개수에 따른 저장 공간 크기 비교 그래프이다. 도 9를 참조하면, 개별 처리 했을 경우 double형으로 데이터를 저장하여 (8 byte*데이터 개수)만큼의 저장 공간을 차지했다면, 본 발명에 따라 일괄 처리한 경우 해당 데이터의 유효 숫자를 제외후 데이터를 처리하기 때문에, 기존 방법보다 일괄 처리된 총 데이터의 크기가 평균 약 24% 감소했다. First, according to the number of data, the storage space when individually processed according to the existing method and the storage space when processed in batch according to the present invention are compared. 9 is a comparison graph of storage space size according to the number of data in a batch processing method for storing IoT data according to a preferred embodiment of the present invention. Referring to FIG. 9, if the data is stored in double type and occupied as much storage space as (8 bytes * number of data) when individually processed, the data is stored after excluding significant numbers of the data in the case of batch processing according to the present invention. Because of the processing, the size of the total batched data was reduced by an average of about 24% compared to the conventional method.

다음, 기준 편차 크기에 따라 일괄 처리될 수 있는 배치개수의 변화에 대해 살펴본다. 본 발명에 따른 방법은 이상치를 탐지함에 따라 한번에 처리될 수 있는 데이터의 개수가 정해진다. 이상치가 탐지되지 않을 때는 계속해서 배치 스트링에 해당 데이터를 추가하다가 이상치를 탐지된 순간 이상치와 이전 정상 데이터를 한번에 컨트랙트에 전달한다. 이때, 기준 편차의 크기에 따라 이상치를 탐지하는 횟수가 정해지는 데, 이상치를 탐지하기 위하여 지정한 편차의 크기가 크면 이상치를 탐지하는 횟수가 적어지며(false positive), 편차가 작을 때는 이상치를 탐지하는 횟수가 증가한다. 도 10은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 배치 개수 비교 그래프이다. 도 10을 참조하면, 기준 편차의 크기에 따라 이상치를 탐지하는 비율이 달라지는데, 기준 편차의 크기를 너무 낮게 잡으면 이상치를 탐지하는 횟수가 증가한다(false positive). 또한, 기준 편차의 크기를 너무 높게 잡으면 이상치를 정상값으로 판단하는 경우가 증가한다(false negative). 따라서 기준 편차의 크기가 이상치를 탐지하는 민감도를 결정함을 알 수 있다. Next, we will look at the change in the number of batches that can be batch processed according to the size of the reference deviation. The method according to the present invention determines the number of data that can be processed at one time according to the detection of an outlier. When an outlier is not detected, the data is continuously added to the batch string, and when an outlier is detected, the outlier and previous normal data are delivered to the contract at once. At this time, the number of times to detect an outlier is determined according to the size of the reference deviation. If the size of the deviation designated for detecting an outlier is large, the number of times to detect an outlier is small (false positive), and when the deviation is small, the number of detecting an outlier is small. the number increases 10 is a graph comparing the number of batches according to a reference deviation size in a batch processing method for storing IoT data according to a preferred embodiment of the present invention. Referring to FIG. 10 , the rate of detecting outliers varies according to the size of the reference deviation. If the size of the reference deviation is set too low, the number of times to detect the outliers increases (false positive). In addition, if the size of the reference deviation is set too high, the case of judging the outlier as a normal value increases (false negative). Therefore, it can be seen that the size of the reference deviation determines the sensitivity for detecting outliers.

다음, 기준 편차 크기에 따른 실제 처리 시간을 비교한다. 도 11은 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 데이터 처리량 비교 그래프이다. 도 11을 참조하면, 기존 방법은 하나의 트랜잭션에 하나의 데이터만 처리할 경우를 나타내는 것으로서, 기준 편차와 상관없이 동일한 데이터 처리량을 갖는다. 반면에, 본 발명에 따른 방법은 기준 편차에 따라 한번에 처리되는 데이터의 개수가 달라지므로 편차가 커짐에 따라 데이터의 처리량이 증가됨을 확인할 수 있다. Next, the actual processing time according to the size of the reference deviation is compared. 11 is a data throughput comparison graph according to a reference deviation size in a batch processing method for IoT data storage according to a preferred embodiment of the present invention. Referring to FIG. 11 , the existing method represents a case in which only one data is processed in one transaction, and has the same data throughput regardless of the reference deviation. On the other hand, in the method according to the present invention, since the number of data processed at one time varies according to the reference deviation, it can be confirmed that the data throughput increases as the deviation increases.

한편, 앞서 설명한 바와 같이, 기준 편차의 크기와 한번에 처리되는 데이터의 크기는 비례한다. 즉, 기준 편차의 크기가 커지면 이상치 탐지 횟수가 적어져 정상값으로 분류되는 데이터가 많아 일괄 처리량이 많아지기 때문이다. 실험을 통해, 기존 데이터에 임의로 이상치 값 100개를 넣어 본 발명에 따른 방법의 이상치 탐지율을 통한 데이터 신뢰도를 측정했다. 도 12는 본 발명의 바람직한 실시예에 따른 IoT 데이터 저장에 대한 일괄 처리 방법에 있어서, 기준 편차 크기에 따른 이상치 탐지 확률 그래프이다. 도 12를 참조하면, 기준 편차의 크기를 너무 크게 잡으면 이상치 탐지율이 낮아지는 것을 확인할 수 있다. Meanwhile, as described above, the size of the reference deviation is proportional to the size of data processed at one time. That is, as the size of the reference deviation increases, the number of outlier detections decreases, and the amount of batch processing increases because more data classified as normal values. Through the experiment, 100 outlier values were randomly added to the existing data, and data reliability was measured through the outlier detection rate of the method according to the present invention. 12 is a graph showing an outlier detection probability according to a reference deviation size in a batch processing method for storing IoT data according to a preferred embodiment of the present invention. Referring to FIG. 12 , it can be seen that if the size of the reference deviation is set too large, the outlier detection rate is lowered.

이상에서 본 발명에 대하여 그 바람직한 실시예를 중심으로 설명하였으나, 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 발명의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 그리고, 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구 범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다. In the above, the present invention has been mainly described with respect to its preferred embodiment, but this is only an example and does not limit the present invention. It will be appreciated that various modifications and applications not exemplified above in the scope are possible. And, the differences related to such modifications and applications should be construed as being included in the scope of the present invention defined in the appended claims.

Claims (10)

(a) IoT 네트워크 시스템으로부터 발생되는 IoT 데이터를 제공받는 단계;
(b) 상기 IoT 데이터에 대한 초기 평균값을 설정하는 단계;
(c) 상기 IoT 데이터가 초기 평균값을 설정한 이후에 제공된 데이터이면, 사전 설정된 이상치 탐지 알고리즘에 따라 상기 제공된 상기 IoT 데이터가 이상치인지 여부를 판단하는 단계;
(d) 상기 데이터가 이상치가 아니면, 임시 버퍼에 순차적으로 저장하여 일괄 처리하는 단계;
(e) 상기 데이터가 이상치이면, 현재 IoT 데이터와 임시 버퍼에 저장된 이전 IoT 데이터들을 모아서 일괄 처리용 스마트 컨트랙트로 전송하는 단계;
(f) 상기 일괄 처리용 스마트 컨트랙트에 의해, 상기 전송된 현재 IoT 데이터와 이전 IoT 데이터들은, 사전 설정된 규칙에 따라 분류되어 하나의 블록으로 생성되어 블록체인에 저장되거나, 외부 데이터베이스에 저장되는 단계;
를 구비하여, 시계열 IoT 데이터들을 일괄 처리하는 것을 특징으로 하는 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법.
(a) receiving IoT data generated from an IoT network system;
(b) setting an initial average value for the IoT data;
(c) if the IoT data is data provided after setting an initial average value, determining whether the IoT data provided is an outlier according to a preset outlier detection algorithm;
(d) if the data is not an outlier, sequentially storing the data in a temporary buffer for batch processing;
(e) if the data is an outlier, collecting the current IoT data and previous IoT data stored in a temporary buffer and transmitting it to a smart contract for batch processing;
(f) by the smart contract for batch processing, the transmitted current IoT data and previous IoT data are classified according to a preset rule, generated as one block, and stored in a block chain or stored in an external database;
A batch processing method for storage of IoT data based on a block chain, characterized in that by having, batch processing time series IoT data.
제1항에 있어서, 상기 (b) 단계의 초기 평균값 설정 단계는,
상기 데이터가 초기 데이터이면, 임시 버퍼에 저장된 초기 데이터 양이 사전 설정된 배치 사이즈(N)보다 작을 경우, 임시 버퍼에 N 만큼 데이터가 발생될 때까지 기다린 후, 이동 평균을 통해 초기 평균값을 구하는 것을 특징으로 하는 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법.
The method of claim 1, wherein the setting of the initial average value in step (b) comprises:
If the data is initial data, when the amount of initial data stored in the temporary buffer is smaller than a preset batch size (N), wait until N data is generated in the temporary buffer, and then obtain an initial average value through a moving average A batch processing method for the storage of IoT data based on a blockchain.
제1항에 있어서, 상기 (c) 단계의 이상치 탐지 알고리즘은,
(b1) 상기 데이터에 대하여 지수 이동 평균 방법에 따라 가중치를 두어 평균값을 구하는 단계;
(b2) 현재 데이터의 이동 평균값과 이전 데이터의 편차의 크기와 사전 설정된 기준 편차값을 비교하여 이상치를 탐지하는 단계;
를 구비하는 것을 특징으로 하는 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법.
The method of claim 1, wherein the outlier detection algorithm of step (c) comprises:
(b1) calculating an average value by weighting the data according to an exponential moving average method;
(b2) detecting an outlier by comparing the moving average value of the current data with the size of the deviation of the previous data with a preset reference deviation value;
A batch processing method for storage of IoT data based on a block chain, characterized in that it comprises a.
제3항에 있어서, 상기 기준 편차값은 이상치를 탐지하는 민감도에 따라 결정되는 것을 특징으로 하는 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법.The batch processing method for storage of IoT data based on a block chain according to claim 3, wherein the reference deviation value is determined according to the sensitivity of detecting an outlier. 제1항에 있어서, 상기 (f) 단계는,
상기 일괄 처리용 스마트 컨트랙트에 의해, 상기 전송된 현재 데이터와 이전 데이터들 중 이상치인 현재 데이터는 블록으로 생성되어 블록체인에 저장되며, 정상값인 이전 데이터들은 외부 데이터베이스에 저장되는 것을 특징으로 하는 블록체인을 기반으로 한 IoT 데이터의 저장을 위한 일괄 처리 방법.
According to claim 1, wherein the step (f),
Block, characterized in that by the smart contract for batch processing, the current data that is an outlier among the transmitted current data and the previous data is generated as a block and stored in the block chain, and the previous data that is a normal value is stored in an external database. Batch processing method for storage of IoT data based on chain.
사물 인터넷 기기로부터 발생된 IoT 데이터를 실시간으로 수신하고, IoT 데이터에 대한 초기 평균값을 구하고, 상기 초기 평균값을 이용하여 사전 설정된 이상치 탐지 알고리즘에 따라 IoT 데이터가 이상치인지 여부를 판단하고, 판단 결과가 이상치가 아니면 현재 IoT 데이터를 임시 버퍼에 저장하고, 판단 결과가 이상치이면 현재 IoT 데이터 및 임시 버퍼에 저장된 이전 데이터들을 묶어서 블록체인 프록시 서버로 전송하여 일괄 처리하는 사물인터넷 플랫폼;
상기 사물 인터넷 플랫폼으로부터 현재 데이터 및 이전 데이터들이 전송되면, 상기 현재 데이터 및 이전 데이터들을 매개 변수로 하여 일괄 처리용 스마트 컨트랙트를 호출하는 블록체인 프록시 서비; 및
복수 개의 블록체인 노드들로 이루어지고, 일괄 처리용 스마트 컨트랙트를 구비하는 블록체인 네트워크;
를 구비하고, 상기 일괄 처리용 스마트 컨트랙트는 현재 데이터 및 이전 데이터들이 매개변수로 입력되어 호출되면, 사전 설정된 규칙에 따라 매개 변수들을 분류하여 저장하는 것을 특징으로 하는 블록체인을 기반으로 한 사물인터넷 시스템.
Receive IoT data generated from IoT devices in real time, obtain an initial average value for IoT data, use the initial average value to determine whether IoT data is an outlier according to a preset outlier detection algorithm, and determine whether the determination result is abnormal an IoT platform that stores the current IoT data in a temporary buffer if it is not a value, and if the determination result is an outlier, bundles the current IoT data and previous data stored in the temporary buffer and transmits it to a block chain proxy server for batch processing;
When the current data and previous data are transmitted from the IoT platform, a blockchain proxy service that calls a smart contract for batch processing using the current data and previous data as parameters; and
A blockchain network comprising a plurality of blockchain nodes and having a smart contract for batch processing;
In the smart contract for batch processing, when current data and previous data are input as parameters and called, the IoT system based on block chain, characterized in that it classifies and stores the parameters according to a preset rule .
제6항에 있어서, 상기 사물인터넷 플랫폼은,
실시간으로 수신된 IoT 데이터가 초기 데이터이면, 임시 버퍼에 저장된 초기 데이터 양이 사전 설정된 배치 사이즈(N)보다 작을 경우, 임시 버퍼에 N 만큼 데이터가 발생될 때까지 기다린 후, 이동 평균을 통해 초기 평균값을 구하는 것을 특징으로 하는 블록체인을 기반으로 한 사물인터넷 시스템.
The method of claim 6, wherein the IoT platform comprises:
If the IoT data received in real time is initial data, if the amount of initial data stored in the temporary buffer is smaller than the preset batch size (N), wait until N data is generated in the temporary buffer, and then the initial average value through the moving average An Internet of Things system based on a block chain, characterized in that
제6항에 있어서, 상기 이상치 탐지 알고리즘은,
상기 데이터에 대하여 지수 이동 평균 방법에 따라 가중치를 두어 평균값을 구하고, 현재 IoT 데이터의 이동 평균값과 이전 데이터의 편차의 크기와 사전 설정된 기준 편차값을 비교하여 이상치를 탐지하는 것을 특징으로 하는 블록체인을 기반으로 한 사물인터넷 시스템.
The method of claim 6, wherein the outlier detection algorithm comprises:
A block chain characterized in that the data is weighted according to the exponential moving average method to obtain an average value, and an outlier is detected by comparing the moving average value of the current IoT data with the size of the deviation of the previous data and a preset reference deviation value. based IoT system.
제8항에 있어서, 상기 기준 편차값은 이상치를 탐지하는 민감도에 따라 결정되는 것을 특징으로 하는 블록체인을 기반으로 한 사물인터넷 시스템.The system of claim 8 , wherein the reference deviation value is determined according to the sensitivity of detecting anomalies. 제6항에 있어서, 상기 일괄 처리용 스마트 컨트랙트는,
상기 전송된 현재 IoT 데이터와 이전 IoT 데이터들 중 이상치인 현재 데이터는 블록으로 생성하여 블록체인에 저장하며, 정상값인 이전 데이터들은 외부 데이터베이스에 저장하는 것을 특징으로 하는 블록체인을 기반으로 한 사물인터넷 시스템.
According to claim 6, The smart contract for batch processing,
The current data, which is an outlier among the transmitted current IoT data and previous IoT data, is generated as a block and stored in a block chain, and previous data, which is a normal value, is stored in an external database. system.
KR1020200114760A 2020-09-08 2020-09-08 Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method KR102507829B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200114760A KR102507829B1 (en) 2020-09-08 2020-09-08 Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200114760A KR102507829B1 (en) 2020-09-08 2020-09-08 Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method

Publications (2)

Publication Number Publication Date
KR20220032884A true KR20220032884A (en) 2022-03-15
KR102507829B1 KR102507829B1 (en) 2023-03-07

Family

ID=80817042

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200114760A KR102507829B1 (en) 2020-09-08 2020-09-08 Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method

Country Status (1)

Country Link
KR (1) KR102507829B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140245071A1 (en) * 2009-06-22 2014-08-28 Johnson Controls Technology Company Automated fault detection and diagnostics in a building management system
KR101992981B1 (en) 2018-12-07 2019-06-25 한전케이디엔 주식회사 IoT Platform System using IoT Herb and Block-Chain
KR102041341B1 (en) 2017-09-14 2019-11-27 숭실대학교산학협력단 IoT Security System Based on the BlockChain and Security Method thereof
KR20190140687A (en) * 2018-06-12 2019-12-20 주식회사 호윤 Transactional Batch Processing System and Method using Block Chain
KR20200019061A (en) * 2018-08-13 2020-02-21 인제대학교 산학협력단 General Data Protection Regulation Complied Blockchain Architecture for Personally Identifiable Information Management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140245071A1 (en) * 2009-06-22 2014-08-28 Johnson Controls Technology Company Automated fault detection and diagnostics in a building management system
KR102041341B1 (en) 2017-09-14 2019-11-27 숭실대학교산학협력단 IoT Security System Based on the BlockChain and Security Method thereof
KR20190140687A (en) * 2018-06-12 2019-12-20 주식회사 호윤 Transactional Batch Processing System and Method using Block Chain
KR20200019061A (en) * 2018-08-13 2020-02-21 인제대학교 산학협력단 General Data Protection Regulation Complied Blockchain Architecture for Personally Identifiable Information Management
KR101992981B1 (en) 2018-12-07 2019-06-25 한전케이디엔 주식회사 IoT Platform System using IoT Herb and Block-Chain

Also Published As

Publication number Publication date
KR102507829B1 (en) 2023-03-07

Similar Documents

Publication Publication Date Title
CN108650218B (en) Network Traffic Monitoring method, apparatus, computer equipment and storage medium
CN113468071B (en) Fuzzy test case generation method, system, computer equipment and storage medium
US20180007578A1 (en) Machine-to-Machine Anomaly Detection
WO2022127342A1 (en) Method and device for detecting eclipse attack for blockchain
CN114189347B (en) Data safety transmission method combining data granulation and gatekeeper
CN109167812B (en) Method for evaluating service quality and determining adjustment strategy, server and storage medium
CN110430226B (en) Network attack detection method and device, computer equipment and storage medium
CN113206860B (en) DRDoS attack detection method based on machine learning and feature selection
CN110430224B (en) Communication network abnormal behavior detection method based on random block model
CN110572297A (en) Network performance evaluation method, server and storage medium
CN113705604A (en) Botnet flow classification detection method and device, electronic equipment and storage medium
CN112839017A (en) Network attack detection method and device, equipment and storage medium thereof
Li Detection of ddos attacks based on dense neural networks, autoencoders and pearson correlation coefficient
KR102507829B1 (en) Batch processing method for storing continuous IoT data on the blockchain and system for storing IoT data using the method
CN116738354B (en) Method and system for detecting abnormal behavior of electric power Internet of things terminal
CN110415182B (en) Fundus OCT image enhancement method, device, equipment and storage medium
CN115002031B (en) Federal learning network flow classification model training method, model and classification method based on unbalanced data distribution
Oikawa et al. Density-based data selection and management for edge computing
CN114997877A (en) Network topology data analysis method of IP of virtual currency public link network transaction node, storage medium and electronic equipment
Santos et al. Network traffic characterization based on time series analysis and computational intelligence
CN115018502A (en) Virtual currency public link network transaction node IP-based tracing method and system
Borgnat et al. Evolving networks
CN115333801A (en) Method and system based on bidirectional message intrusion detection
CN115018646B (en) IP distinguishing method and system based on virtual currency public network transaction originating node
WO2019227227A1 (en) A method of digital signal feature extraction comprising multiscale analysis

Legal Events

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