KR102331202B1 - Method for transmitting message between nodes based on blockcahin sharding - Google Patents

Method for transmitting message between nodes based on blockcahin sharding Download PDF

Info

Publication number
KR102331202B1
KR102331202B1 KR1020190098404A KR20190098404A KR102331202B1 KR 102331202 B1 KR102331202 B1 KR 102331202B1 KR 1020190098404 A KR1020190098404 A KR 1020190098404A KR 20190098404 A KR20190098404 A KR 20190098404A KR 102331202 B1 KR102331202 B1 KR 102331202B1
Authority
KR
South Korea
Prior art keywords
shard
node
message
destination
routing table
Prior art date
Application number
KR1020190098404A
Other languages
Korean (ko)
Other versions
KR20200058273A (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 서강대학교 산학협력단
Publication of KR20200058273A publication Critical patent/KR20200058273A/en
Application granted granted Critical
Publication of KR102331202B1 publication Critical patent/KR102331202B1/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/104Peer-to-peer [P2P] networks
    • H04L67/1042Peer-to-peer [P2P] networks using topology management mechanisms
    • H04L67/327
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

복수의 노드들과 복수의 샤드들을 포함하는 블록체인 샤딩 네트워크에서 노드의 메시지 전달 방법으로서, 임의의 샤드가 주소를 알고 있는 서로 다른 샤드들과의 거리를 각각 계산하는 단계, 상기 계산된 거리를 기준으로 샤딩 네트워크를 구성하는 샤드들의 라우팅 테이블을 작성하는 단계, 임의의 출발 노드를 포함하는 출발 샤드의 라우팅 테이블에 목적지 샤드의 주소가 존재하는지 확인하는 단계, 그리고 상기 출발 샤드의 라우팅 테이블에 상기 목적지 샤드의 주소가 존재하면, 상기 출발 노드는 상기 주소를 이용하여 상기 목적지 샤드에 메시지를 전달하는 단계를 포함한다. A method for transmitting a message of a node in a blockchain sharding network including a plurality of nodes and a plurality of shards, the method comprising the steps of calculating distances from different shards of which an arbitrary shard knows an address, based on the calculated distance Creating a routing table of shards constituting a sharding network with If the address of , the originating node forwards the message to the destination shard using the address.

Description

블록체인 샤딩 환경에서 노드 간 메시지 전달 방법{METHOD FOR TRANSMITTING MESSAGE BETWEEN NODES BASED ON BLOCKCAHIN SHARDING}How to pass messages between nodes in a blockchain sharding environment {METHOD FOR TRANSMITTING MESSAGE BETWEEN NODES BASED ON BLOCKCAHIN SHARDING}

본 발명은 블록체인 샤딩 환경에서 노드 간 메시지를 전달하는 기술에 관한 것이다.The present invention relates to a technology for transferring messages between nodes in a blockchain sharding environment.

블록체인은 동등 계층간 통신망(Peer-to-Peer, P2P) 네트워크에서 모든 참여자가 합의 알고리즘을 통해서 정해진 공유 원장을 소유함으로써, 기록의 위조 및 변조를 불가능하게 만드는 분산 원장 시스템(Distributed Ledger System)이다. 분산 원장 시스템은 중앙관리자의 제어 없이 각 노드가 분산 환경에서 원장이라는 데이터베이스를 동기화하여 유지하는 시스템이다. Blockchain is a Distributed Ledger System that makes forgery and falsification of records impossible by all participants in a peer-to-peer (P2P) network owning a shared ledger determined through a consensus algorithm. . A distributed ledger system is a system in which each node synchronizes and maintains a database called a ledger in a distributed environment without the control of a central administrator.

블록체인에서 모든 노드가 동기화된 원장을 유지하기 위해서는 네트워크에서 발생하는 모든 트랜잭션과 블록이 저장되어야 한다. 이를 위해 종래에는 네트워크의 모든 멤버 노드에 플러딩(Flooding) 방식으로 모든 메시지를 블록체인 네트워크에 전파하였다. 그러나 이는 모든 노드가 모든 메시지를 수신하고 저장해야 한다는 문제, 즉 확장성의 문제를 수반한다.In order for all nodes to maintain a synchronized ledger in a blockchain, all transactions and blocks occurring in the network must be stored. For this purpose, conventionally, all messages were propagated to the blockchain network by flooding all member nodes of the network. However, this entails the problem of scalability, that every node must receive and store every message.

확장성 문제를 해결하기 위해서 블록체인 샤딩(Sharding)이라는 방법이 제시되었다. 샤딩은 블록체인 네트워크에서 발생하는 트랜잭션과 블록을 작은 그룹인 샤드 단위로 나누어, 각 샤드에 속한 노드들은 다른 샤드의 트랜잭션과 블록을 처리할 필요 없이 자신이 속한 샤드의 트랜잭션과 블록만을 처리하여 전체 네트워크의 트랜잭션 처리량과 분산 원장의 크기를 줄이는 방법이다. 기존에는 플러딩 방식으로 자신과 연결된 모든 노드에게 모든 메시지를 전달하는 단순한 방식을 사용했지만, 종래 기술인 플러딩 방식을 그대로 블록체인 샤딩에 적용하면, 샤딩을 적용하기 전과 똑같은 양의 트래픽이 발생하는 문제가 있다. To solve the scalability problem, a method called blockchain sharding has been proposed. Sharding divides the transactions and blocks that occur in the blockchain network into small groups, called shards, so that nodes belonging to each shard do not have to process transactions and blocks from other shards, but only the transactions and blocks of the shard to which they belong. It is a method to reduce the transaction throughput and the size of the distributed ledger. In the past, a simple method of delivering all messages to all nodes connected to itself as a flooding method was used, but if the conventional flooding method is applied to blockchain sharding as it is, there is a problem that the same amount of traffic is generated as before sharding is applied. .

따라서 네트워크가 샤드로 나뉘는 샤딩 환경에서는, 플러딩 방식과는 다른 방법을 이용하여 자신이 속해있지 않은 샤드의 메시지를 최소한으로 전달받으면서 자신이 속한 샤드의 메시지는 빠짐없이 전달받아야 한다.Therefore, in a sharding environment in which the network is divided into shards, messages from the shards to which it belongs should be delivered without omission by using a method different from the flooding method to receive messages from shards to which it does not belong to a minimum.

본 발명이 해결하고자 하는 과제는 라우팅 테이블과 노드 간 XOR 거리를 바탕으로, 중개 노드 없이 최소한의 트래픽을 사용하여 목표 샤드에 속한 노드에 메시지를 전달하는 방법 및 시스템을 제공하는 것이다.An object of the present invention is to provide a method and system for delivering a message to a node belonging to a target shard using a minimum amount of traffic without an intermediary node based on the XOR distance between the routing table and the node.

한 실시예에 따른 복수의 노드들과 복수의 샤드들을 포함하는 블록체인 샤딩 네트워크에서 노드의 메시지 전달 방법으로서, 임의의 샤드가 주소를 알고 있는 서로 다른 샤드들과의 거리를 각각 계산하는 단계, 상기 계산된 거리를 기준으로 샤딩 네트워크를 구성하는 샤드들의 라우팅 테이블을 작성하는 단계, 임의의 출발 노드를 포함하는 출발 샤드의 라우팅 테이블에 목적지 샤드의 주소가 존재하는지 확인하는 단계, 그리고 상기 출발 샤드의 라우팅 테이블에 상기 목적지 샤드의 주소가 존재하면, 상기 출발 노드는 상기 주소를 이용하여 상기 목적지 샤드에 메시지를 전달하는 단계를 포함한다.A method for transmitting a message of a node in a blockchain sharding network including a plurality of nodes and a plurality of shards according to an embodiment, the method comprising: calculating a distance from each shard of which an arbitrary shard knows an address, the above; Creating a routing table of the shards constituting the sharding network based on the calculated distance, checking whether the address of the destination shard exists in the routing table of the departure shard including an arbitrary departure node, and routing of the departure shard and when the address of the destination shard exists in the table, the originating node uses the address to forward a message to the destination shard.

상기 목적지 샤드에 메시지를 전달하는 단계 이후에 상기 목적지 샤드에 포함된 목적지 노드에 상기 메시지가 전달되지 않은 경우, 상기 목적지 샤드에 속하며 상기 메시지를 받은 임의의 노드가 상기 목적지 노드에 메시지를 전달하는 단계를 더 포함할 수 있다.If the message is not delivered to the destination node included in the destination shard after the step of delivering the message to the destination shard, any node belonging to the destination shard and receiving the message forwarding the message to the destination node may further include.

상기 임의의 노드가 상기 목적지 노드에 메시지를 전달하는 단계는 상기 임의의 노드의 노드 라우팅 테이블에 상기 목적지 노드의 주소가 존재하지 않으면, 상기 임의의 노드는 자신의 노드 라우팅 테이블과 상기 목적지 노드의 노드 라우팅 테이블을 참조하여 중간 노드를 설정하고, 상기 중간 노드에 상기 메시지를 전달하는 단계, 그리고 상기 중간 노드가 상기 목적지 노드에 상기 메시지를 전달하는 단계를 포함하고, 노드 라우팅 테이블은 노드들 간 거리를 기준으로 작성된 것일 수 있다.In the step of the arbitrary node transmitting the message to the destination node, if the address of the destination node does not exist in the node routing table of the arbitrary node, the arbitrary node transfers its own node routing table and the node of the destination node. setting up an intermediate node by referring to a routing table, forwarding the message to the intermediate node, and the intermediate node forwarding the message to the destination node, wherein the node routing table determines the distance between nodes It may be written based on

다른 실시예에 따른 복수의 노드들과 복수의 샤드들을 포함하는 블록체인 샤딩 네트워크에서 노드의 메시지 전달 방법으로서, 임의의 샤드가 주소를 알고 있는 서로 다른 샤드들과의 거리를 각각 계산하는 단계, 상기 계산된 거리를 기준으로 샤딩 네트워크를 구성하는 샤드들의 라우팅 테이블을 작성하는 단계, 임의의 출발 노드를 포함하는 출발 샤드의 라우팅 테이블에 목적지 샤드의 주소가 존재하는지 확인하는 단계, 그리고 상기 출발 샤드의 라우팅 테이블에 상기 목적지 샤드의 주소가 존재하지 않으면, 상기 출발 노드는 상기 출발 샤드의 라우팅 테이블과 상기 목적지 샤드의 라우팅 테이블을 참조하여 중간 샤드를 설정하고, 상기 중간 샤드에 메시지를 전달하는 단계, 그리고 상기 중간 샤드가 자신의 라우팅 테이블에 상기 목적지 샤드의 연결 정보가 존재하는지 확인하고, 상기 목적지 샤드에 상기 메시지를 전달하는 단계를 포함하고, 상기 중간 샤드는 상기 출발 샤드의 라우팅 테이블에 주소가 기재된 샤드들 중, 상기 목적지 샤드와 거리가 가장 가까운 샤드이다. A method for transmitting a message of a node in a blockchain sharding network including a plurality of nodes and a plurality of shards according to another embodiment, the method comprising the steps of calculating distances from different shards of which a certain shard knows an address, the above Creating a routing table of the shards constituting the sharding network based on the calculated distance, checking whether the address of the destination shard exists in the routing table of the departure shard including an arbitrary departure node, and routing of the departure shard If the address of the destination shard does not exist in the table, the originating node sets up an intermediate shard by referring to the routing table of the originating shard and the routing table of the destination shard, and transmitting a message to the intermediate shard; and The intermediate shard checks whether the connection information of the destination shard exists in its routing table, and transmits the message to the destination shard, wherein the intermediate shard includes shards whose addresses are written in the routing table of the originating shard. Among them, the shard closest to the destination shard is the shard.

상기 거리는 각 샤드의 주소를 이진화하고, 이진화된 주소의 접두부(Prefix)를 비교하여 접두부의 공통 부분이 길수록 거리가 가까운 것으로 결정될 수 있다.The distance may be determined to be closer as the common part of the prefix is longer by binarizing the address of each shard and comparing prefixes of the binarized addresses.

상기 목적지 샤드에 상기 메시지를 전달하는 단계 이후에 상기 목적지 샤드에 포함된 목적지 노드에 상기 메시지가 전달되지 않은 경우, 상기 목적지 샤드에 속하며 상기 메시지를 받은 임의의 노드가 자신의 노드 라우팅 테이블을 참조하여 상기 목적지 노드에 메시지를 전달하는 단계를 더 포함하고, 상기 노드 라우팅 테이블은 노드들 간 거리를 기준으로 작성된 것일 수 있다.If the message is not delivered to the destination node included in the destination shard after the step of delivering the message to the destination shard, any node belonging to the destination shard and receiving the message refers to its own node routing table. The method may further include transmitting a message to the destination node, and the node routing table may be created based on a distance between nodes.

또 다른 실시예에 따른 복수의 노드들을 포함하는 블록체인 샤딩 네트워크에서 노드의 메시지 전달 방법으로서, 임의의 노드가 주소를 알고 있는 서로 다른 노드들과의 거리를 각각 계산하는 단계, 상기 계산된 거리를 기준으로 샤딩 네트워크를 구성하는 노드들의 라우팅 테이블을 작성하는 단계, 임의의 출발 노드가 자신의 라우팅 테이블에 목적지 노드의 주소가 존재하는지 확인하는 단계, 그리고 상기 출발 노드의 라우팅 테이블에 상기 목적지 노드의 주소가 존재하면, 상기 출발 노드는 상기 주소를 이용하여 상기 목적지 노드에 메시지를 전달하는 단계를 포함하고, 상기 출발 노드와 상기 목적지 노드는 동일 샤드에 속한다.As a message delivery method of a node in a blockchain sharding network including a plurality of nodes according to another embodiment, a random node calculating a distance from different nodes for which an address is known, respectively, using the calculated distance Creating a routing table of the nodes constituting the sharding network as a reference, the step of checking whether an address of the destination node exists in its routing table, and the address of the destination node in the routing table of the originating node if , the departure node forwards a message to the destination node using the address, wherein the departure node and the destination node belong to the same shard.

상기 목적지 노드에 메시지를 전달하는 단계는, 상기 출발 노드의 라우팅 테이블에 상기 목적지 노드의 주소가 존재하지 않으면, 상기 출발 노드는 자신의 라우팅 테이블과 상기 목적지 노드의 라우팅 테이블을 참조하여 중간 노드를 설정하고, 상기 중간 노드에 메시지를 전달하는 단계, 그리고 상기 중간 노드가 자신의 라우팅 테이블에 상기 목적지 노드의 연결 정보가 존재하는지 확인하고, 상기 목적지 노드에 상기 메시지를 전달하는 단계를 포함할 수 있다.In the step of delivering the message to the destination node, if the address of the destination node does not exist in the routing table of the originating node, the originating node refers to its own routing table and the routing table of the destination node to set up an intermediate node and delivering the message to the intermediate node, and the intermediate node confirming whether connection information of the destination node exists in its routing table, and delivering the message to the destination node.

상기 중간 노드는 상기 출발 노드의 라우팅 테이블에 주소가 기재된 노드들 중, 상기 목적지 노드와 거리가 가장 가까운 노드일 수 있다.The intermediate node may be a node having the closest distance to the destination node among nodes whose addresses are written in the routing table of the departure node.

상기 거리는 각 노드의 주소를 이진화하고, 이진화된 주소의 접두부(Prefix)를 비교하여 접두부의 공통 부분이 길수록 거리가 가까운 것으로 결정될 수 있다.The distance may be determined to be closer as the common part of the prefix is longer by binarizing the address of each node and comparing prefixes of the binarized addresses.

본 발명에 따르면, 노드 간 거리를 기준으로 하는 기존의 라우팅 방식에 비해, 샤드 간 거리를 기준으로 하는 라우팅 테이블을 이용하므로 전체 네트워크 트래픽 낭비를 최소화할 수 있고, 컨트롤 메시지와 라우팅 테이블을 함께 이용하므로 더 짧은 거리로 메시지를 전달할 수 있다.According to the present invention, compared to the existing routing method based on the distance between nodes, since a routing table based on the distance between shards is used, overall network traffic waste can be minimized, and the control message and the routing table are used together. Messages can be delivered over shorter distances.

또한 본 발명에 따르면, 중개 노드라는 특정 노드의 도움 없이 목표 샤드의 노드들에게 직접 메시지를 전달할 수 있어 보안성을 향상시킬 수 있고, 기존 플러딩 방식과는 달리 분할된 네트워크에서도 노드 간 통신이 가능하다.In addition, according to the present invention, a message can be delivered directly to the nodes of the target shard without the help of a specific node called an intermediary node, thereby improving security, and unlike the existing flooding method, inter-node communication is possible in a divided network. .

도 1은 한 실시예에 따른 블록체인 샤딩 환경의 구성도이다.
도 2는 한 실시예에 따른 노드 간 XOR 거리를 구하는 방법의 설명도이다.
도 3은 한 실시예에 따른 동일 샤드 내에 속하는 노드 간 내부 라우팅 메시지 전달 방법의 흐름도이다.
도 4는 한 실시예에 따른 내부 라우팅 메시지 전달 방법의 설명도이다.
도 5는 다른 실시예에 따른 내부 라우팅 메시지 전달 방법의 설명도이다.
도 6은 한 실시예에 따른 서로 다른 샤드에 속하는 노드 간 외부 라우팅 메시지 전달 방법의 흐름도이다.
도 7은 한 실시예에 따른 외부 라우팅 메시지 전달 방법의 설명도이다.
도 8은 다른 실시예에 따른 외부 라우팅 메시지 전달 방법의 설명도이다.
1 is a block diagram of a blockchain sharding environment according to an embodiment.
2 is an explanatory diagram of a method for obtaining an XOR distance between nodes according to an embodiment.
3 is a flowchart of a method for delivering an internal routing message between nodes belonging to the same shard according to an embodiment.
4 is an explanatory diagram of an internal routing message delivery method according to an embodiment.
5 is an explanatory diagram of an internal routing message delivery method according to another embodiment.
6 is a flowchart of a method for forwarding an external routing message between nodes belonging to different shards according to an embodiment.
7 is an explanatory diagram of a method for delivering an external routing message according to an embodiment.
8 is an explanatory diagram of a method for delivering an external routing message according to another embodiment.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, embodiments of the present invention will be described in detail so that those of ordinary skill in the art to which the present invention pertains can easily implement them. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. Throughout the specification, when a part "includes" a certain element, it means that other elements may be further included, rather than excluding other elements, unless otherwise stated.

이하 본 명세서에서 사용되는 용어에 대해 설명한다. Hereinafter, terms used in this specification will be described.

트랜잭션은 공유 원장에 저장되는 모든 기록의 단위를 의미하고, 블록은 트랜잭션의 묶음으로, 공유 원장을 이루는 단위를 의미한다.A transaction means the unit of all records stored in the shared ledger, and a block is a bundle of transactions, which means the unit that makes up the shared ledger.

분산 해시 테이블(Distributed Hash Table)이란, 일반적으로 해시 테이블을 중앙 시스템이 아닌 각 노드가 관리하는 방식을 의미한다. 따라서 분산 동등 계층간 통신망 컴퓨터 네트워크 환경에서 모든 노드는 라우터의 역할을 할 수 있다. 분산 해시 테이블 토폴로지에서는 테이블의 키(Key)-값(Value) 쌍을 저장할 노드가 지정되고, 각 노드는 원하는 키-값 쌍이 저장된 노드를 찾을 수 있다.A distributed hash table generally refers to a method in which each node manages a hash table rather than a central system. Therefore, in a distributed peer-to-peer inter-layer network computer network environment, any node can act as a router. In a distributed hash table topology, a node is designated to store a key-value pair of a table, and each node can find a node that stores a desired key-value pair.

한편, 본 명세서에서 분산 해시 테이블은, 분산 해시 테이블을 작성하기 위한 방식으로 각 노드의 식별자(ID)를 이용하며, 노드의 ID를 해시 테이블의 주소로 사용하고, 주소 간 XOR 거리 기반으로 라우팅 테이블을 구성한 것을 의미한다. 예를 들어, 라우팅 테이블의 첫번째 행은 XOR 거리가 1인 노드들의 ID를 포함하고, 두번째 행은 XOR 거리가 2인 노드들의 ID를 포함할 수 있다.Meanwhile, in the present specification, the distributed hash table uses the identifier (ID) of each node as a method for creating a distributed hash table, uses the node ID as the address of the hash table, and a routing table based on the XOR distance between addresses means to constitute For example, the first row of the routing table may include IDs of nodes having an XOR distance of 1, and the second row may include IDs of nodes having an XOR distance of 2.

노드 ID는 노드의 IP 주소를 해시 함수를 통해 얻은 값이며, 각 노드는 자신의 ID와 일치하는 주소에 배치된다.The node ID is a value obtained through a hash function of the node's IP address, and each node is placed at an address that matches its own ID.

도 1은 한 실시예에 따른 블록체인 샤딩 환경의 구성도이다.1 is a block diagram of a blockchain sharding environment according to an embodiment.

도 1을 참고하면, 블록체인 샤딩 환경은 복수의 샤드(100)들, 복수의 노드(200)들을 포함하고, 하나의 샤드(100)는 복수의 노드(200)들을 포함한다.Referring to FIG. 1 , the blockchain sharding environment includes a plurality of shards 100 and a plurality of nodes 200 , and one shard 100 includes a plurality of nodes 200 .

샤드(100)는 블록체인을 구성하는 복수의 노드들을 일정하게 나눈 블록을 의미한다.The shard 100 refers to a block in which a plurality of nodes constituting the block chain are uniformly divided.

노드(200)는 블록체인 네트워크에 참여하는 구성원으로서, 메시지를 보내는 주체 또는 메시지를 받을 수 있는 객체이다. 노드는 자신이 속한 샤드에 있는 노드에게 메시지를 전달하거나, 다른 샤드에 속한 노드에게 메시지를 전달할 수 있다. 전자의 경우 전달되는 메시지를 내부 라우팅 메시지, 후자의 경우 전달되는 메시지를 외부 라우팅 메시지라고 호칭한다. The node 200 is a member that participates in the blockchain network, and is a subject that sends a message or an object that can receive a message. A node can forward a message to a node in its own shard or to a node in another shard. In the former case, the forwarded message is called an internal routing message, and in the latter case, the forwarded message is called an external routing message.

본 명세서에서 제안하는 방법으로, 메시지를 전달하고자 하는 노드(200)는, 자신의 라우팅 테이블에 존재하는 노드들의 정보만을 이용하여, 노드(200)들의 라우팅을 돕는 중개 노드(200)의 존재 없이 컨트롤 메시지를 사용하여 원하는 목적지 노드(200b) 또는 목적지 샤드(100b)에 메시지를 직접 전달할 수 있다.In the method proposed in this specification, the node 200 to transmit a message uses only the information of the nodes existing in its routing table, and controls without the presence of an intermediary node 200 that helps the routing of the nodes 200 The message can be used to directly deliver the message to the desired destination node 200b or the destination shard 100b.

도 2는 한 실시예에 따른 노드 간 XOR 거리를 구하는 방법의 설명도이다.2 is an explanatory diagram of a method for obtaining an XOR distance between nodes according to an embodiment.

도 2를 참고하면, 노드(200) 사이의 XOR 거리는 노드(200) ID를 우선 이진수로 표현하고, 이진화된 ID의 비트(Bit)를 앞자리부터 비교하여, 일치하는 정도에 따라 결정된다. 즉, 노드(200) ID의 공통 비트의 길이가 길수록 노드(200) 사이의 거리가 가깝다고 볼 수 있다. 공통 비트의 길이를 접두부(Prefix)가 공통되는 길이라고 볼 수도 있다.Referring to FIG. 2 , the XOR distance between nodes 200 is determined according to the degree of matching by first expressing the ID of the node 200 as a binary number, and comparing the bits of the binary ID from the first digit. That is, it can be seen that the longer the length of the common bit of the node 200 ID is, the closer the distance between the nodes 200 is. The length of the common bit may be regarded as the length in which the prefixes are common.

예를 들어, 노드 200a의 ID가 11111이고, 노드 200b의 ID는 0111이고, 노드 200c의 ID가 1110이라고 가정한다. 노드의 ID에 따라 도 2와 같은 가지 그림을 그릴 수 있다. For example, it is assumed that the ID of the node 200a is 11111, the ID of the node 200b is 0111, and the ID of the node 200c is 1110. According to the ID of the node, a branch picture as shown in FIG. 2 can be drawn.

노드 200a의 ID인 11111과 노드 200b의 ID인 0111을 앞자리부터 비교하면, 첫째 자리가 1과 0으로 다르므로 공통 비트의 길이는 0이다. 노드 200a의 ID인 11111과 노드 200c의 ID인 1110을 앞자리부터 비교하면, 앞에서부터 3번째 자리까지가 1로 같으므로, 공통 비트의 길이는 3이다. 따라서 노드 200a는 노드 200b와는 XOR 거리가 멀고, 노드 200c와는 XOR 거리가 가깝다. If 11111, which is the ID of node 200a, and 0111, which is the ID of node 200b, are compared from the first digit, the length of the common bit is 0 because the first digit is different from 1 and 0. If 11111, which is the ID of node 200a, and 1110, which is the ID of node 200c, are compared from the first digit, the length of the common bit is 3 because the first to third digit is equal to 1. Therefore, the node 200a is far from the node 200b by the XOR distance, and the node 200c is close to the XOR distance.

도 3은 한 실시예에 따른 동일 샤드 내에 속하는 노드 간 내부 라우팅 메시지 전달 방법의 흐름도이고, 도 4는 한 실시예에 따른 내부 라우팅 메시지 전달 방법의 설명도이고, 도 5는 다른 실시예에 따른 내부 라우팅 메시지 전달 방법의 설명도이다.3 is a flowchart of an internal routing message forwarding method between nodes belonging to the same shard according to an embodiment, FIG. 4 is an explanatory diagram of an internal routing message forwarding method according to an embodiment, and FIG. 5 is an internal routing message according to another embodiment It is an explanatory diagram of a routing message delivery method.

도 3을 참고하면, 하나의 샤드(100)에 속한 노드(200) 간의 메시지 전달을 위해서 우선 노드(200) ID와, 노드(200) 간 XOR 거리를 기반으로 내부 라우팅 테이블을 작성한다(S101). 내부 라우팅 테이블이란, 동일 샤드(100)에 속한 노드(200)만으로 구성된 라우팅 테이블을 의미한다.Referring to FIG. 3 , for message delivery between nodes 200 belonging to one shard 100 , first, an internal routing table is created based on the node 200 ID and the XOR distance between the nodes 200 ( S101 ) . The internal routing table refers to a routing table composed only of nodes 200 belonging to the same shard 100 .

내부 라우팅 테이블은 도 2에서 설명한 방식으로 이웃 노드들과의 XOR 거리를 계산하여 작성한다. 여기서 이웃 노드란, 특정 노드와 직접 연결이 가능한 노드를 의미하며, 특정 노드와 물리적 거리 또는 XOR 거리가 가까운 노드를 의미하는 것은 아니다.The internal routing table is created by calculating the XOR distance with the neighboring nodes in the manner described in FIG. 2 . Here, a neighbor node means a node that can be directly connected to a specific node, and does not mean a node having a close physical distance or XOR distance to the specific node.

예를 들어, 노드 a의 ID가 15, 노드 b의 ID가 16, 노드 c의 ID가 17, 노드 d의 ID가 18이라고 하고, 노드 b의 내부 라우팅 테이블을 구하는 과정을 설명한다. For example, assuming that the ID of node a is 15, the ID of node b is 16, the ID of node c is 17, and the ID of node d is 18, the process of obtaining the internal routing table of node b will be described.

우선 노드들의 ID를 기반으로 도 2의 방법을 통해 노드 b와 다른 노드 간 XOR 거리를 구한다.First, an XOR distance between node b and another node is obtained through the method of FIG. 2 based on the IDs of the nodes.

노드 a의 ID를 이진화하면 01111, 노드 b의 ID를 이진화하면 10000, 노드 c의 ID를 이진화하면 10001, 노드 b의 ID를 이진화하면 10010이다. 노드 b를 기준으로, 앞자리부터 공통 비트의 길이를 구하면 노드 a는 공통 비트가 0개, 노드 c는 공통 비트가 1000이므로 4개, 노드 d는 공통 비트가 100이므로 3개이다. 따라서 노드 간 XOR 거리는 노드 a의 경우가 가장 멀고, 노드 c와 가장 가깝다. If the ID of node a is binarized, it is 01111, if the ID of node b is binarized, it is 10000, if the ID of node c is binarized, it is 10001, and if the ID of node b is binarized, it is 10010. If the length of common bits is calculated from the first digit based on node b, node a has 0 common bits, node c has 4 common bits because it has 1000 bits, and node d has 3 common bits because it has 100 bits. Therefore, the XOR distance between nodes is furthest for node a and closest to node c.

결과적으로 노드 b의 내부 라우팅 테이블은 표 1과 같이 작성될 수 있다As a result, the internal routing table of node b can be written as Table 1.

노드 간 XOR 거리XOR distance between nodes 노드 IDNode ID 1One 노드 cnode c 22 노드 dnode d 33 44 55 노드 anode a

작성된 내부 라우팅 테이블을 참조하여, 출발 노드(200a)는 자신의 내부 라우팅 테이블에 목적지 노드(200b)의 정보가 존재하는지 확인한다(S102). 이는 도 4의 경우에 해당한다.With reference to the created internal routing table, the departure node 200a checks whether information of the destination node 200b exists in its internal routing table (S102). This corresponds to the case of FIG. 4 .

도 4를 참고하면, 출발 노드(200a)를 노드 2, 목적지 노드(200b)를 노드 3이라고 가정한다. 노드 2는 내부 라우팅 테이블에 노드 3의 정보가 있는지 확인한다.Referring to FIG. 4 , it is assumed that a departure node 200a is a node 2 and a destination node 200b is a node 3 . Node 2 checks whether the information of Node 3 exists in its internal routing table.

목적지 노드(200b)의 정보를 바로 알 수 있는 경우, 목적지 노드(200b)에 내부 라우팅 메시지를 전달할 수 있다(S109). 즉, 노드 2는 노드 3에 메시지를 전달하여 과정이 종료된다. When information of the destination node 200b is immediately known, an internal routing message may be transmitted to the destination node 200b (S109). That is, node 2 sends a message to node 3 and the process ends.

출발 노드(200a)의 라우팅 테이블에 목적지 노드(200b)의 정보가 없는 경우, 출발 노드(200a)는 내부 라우팅 테이블에 존재하는 노드들 중, 목적지 노드(200b)와 XOR 거리가 가장 가까운 노드를 확인하여 중간 노드(200c)로 선정한다(S103). 이는 도 5의 경우에 해당한다.If there is no information of the destination node 200b in the routing table of the departure node 200a, the departure node 200a checks the node having the closest XOR distance to the destination node 200b among the nodes existing in the internal routing table to select the intermediate node 200c (S103). This corresponds to the case of FIG. 5 .

도 5를 참고하면, 출발 노드(200a)인 노드 2의 라우팅 테이블에 목적지 노드(200b)인 노드 3의 정보가 없는 경우이다. 노드 2는 자신의 내부 라우팅 테이블에 존재하는 노드들 중, 목적지 노드(200b)인 노드 3과 XOR 거리가 가장 가까운 노드를 중간 노드(200c)로 선정한다. 따라서 노드 3과 XOR 거리가 1인 노드 4를 중간 노드(200c)로 선정한다.Referring to FIG. 5 , there is no information on node 3 as a destination node 200b in the routing table of node 2 as a departure node 200a. The node 2 selects the node having the closest XOR distance to the node 3, which is the destination node 200b, as the intermediate node 200c among the nodes existing in its internal routing table. Therefore, node 3 and node 4 having an XOR distance of 1 are selected as the intermediate node 200c.

출발 노드(200a)는 중간 노드(200c)에 내부 라우팅 메시지를 전달한다(S104). 즉 노드 2는 노드 4에게 내부 라우팅 메시지를 전달한다.The departure node 200a forwards the internal routing message to the intermediate node 200c (S104). That is, node 2 forwards an internal routing message to node 4.

중간 노드(200c)는 자신의 내부 라우팅 테이블에 목적지 노드(200b)의 정보가 존재하는지 확인한다(S105). 즉 노드 4는 자신의 내부 라우팅 테이블에 노드 3이 존재하는지 확인한다.The intermediate node 200c checks whether information of the destination node 200b exists in its internal routing table (S105). That is, node 4 checks whether node 3 exists in its internal routing table.

존재하는 경우, 중간 노드(200c)는 목적지 노드(200b)에 내부 라우팅 메시지를 전달하여 과정을 종료할 수 있다(S109).If present, the intermediate node 200c may transfer the internal routing message to the destination node 200b to terminate the process (S109).

만약 중간 노드(200c)의 내부 라우팅 테이블에 목적지 노드(200b)의 정보가 존재하지 않는 경우, 즉 노드 4의 라우팅 테이블에 노드 3의 정보가 없는 경우에는 중간 노드(200c)의 내부 라우팅 테이블에 존재하는 노드 중, 목적지 노드(200b)와 XOR 거리가 가장 가까운 새로운 중간 노드를 선정한다(S106).If the information of the destination node 200b does not exist in the internal routing table of the intermediate node 200c, that is, when there is no information of the node 3 in the routing table of the node 4, it exists in the internal routing table of the intermediate node 200c A new intermediate node with the closest XOR distance to the destination node 200b is selected from among the nodes to be used (S106).

중간 노드(200c)는 새로 선정된 중간 노드에 내부 라우팅 메시지를 전달한다(S107).The intermediate node 200c delivers the internal routing message to the newly selected intermediate node (S107).

메시지를 전달받은 새로운 노드는, 자신의 내부 라우팅 테이블을 확인하여 목적지 노드(200b)의 정보가 존재하는지 확인한다(S108).The new node receiving the message checks its internal routing table and checks whether information on the destination node 200b exists (S108).

새로운 중간 노드의 내부 라우팅 테이블에 목적지 노드(200b)의 정보가 존재하는 경우, 새로운 중간 노드는 목적지 노드(200b)에 내부 라우팅 메시지를 전달하여 과정을 종료할 수 있다(S109).When the information of the destination node 200b exists in the internal routing table of the new intermediate node, the new intermediate node may transfer the internal routing message to the destination node 200b to terminate the process (S109).

새로운 중간 노드의 내부 라우팅 테이블에 목적지 노드(200b)의 정보가 존재하지 않는 경우, 새로운 중간 노드는 S106 단계부터 다시 반복하여 새로운 중간 노드를 선정하고, 메시지를 전달하는 과정을 반복하여 목적지 노드(200b)까지 메시지를 전달할 수 있다. 이와 같이, 출발 노드(200a)가 목적지 노드(200b)에 바로 메시지를 전달할 수 없는 경우, 중간 노드를 반복하여 경유하는 과정을 릴레이(Relay)라고 한다.When the information of the destination node 200b does not exist in the internal routing table of the new intermediate node, the new intermediate node repeats the process from step S106 again to select a new intermediate node, and repeats the process of delivering the message to the destination node 200b ) to pass the message. In this way, when the departure node 200a cannot directly transmit the message to the destination node 200b, the process of repeatedly passing through the intermediate node is called a relay.

메시지를 전달한 이후, 출발 노드(200a)는 컨트롤 메시지를 이용하여 노드(200)의 변화를 라우팅 테이블을 반영하여 업데이트 할 수 있다. 예를 들어 특정 노드(200)가 샤드(100)에 참여한 경우는 JOIN, 특정 노드(200)가 샤드(100)에서 떠난 경우는 LEAVE라는 메시지를 이용할 수 있다. 노드(200)가 자신이 속한 샤드(100)를 이동하거나, 네트워크에서 이탈된 경우 라우팅 테이블에 기록된 노드(200)의 개수가 줄어들게 된다. 이때는 다른 노드(200)의 정보를 받아서 라우팅 테이블을 업데이트 하며, FIND_NODE라는 컨트롤 메시지를 이용할 수 있다.After transmitting the message, the departure node 200a may update the change of the node 200 by reflecting the routing table using the control message. For example, a JOIN message can be used when a specific node 200 has joined the shard 100, and a LEAVE message can be used when a specific node 200 has left the shard 100. When the node 200 moves the shard 100 to which it belongs, or leaves the network, the number of nodes 200 recorded in the routing table is reduced. In this case, the routing table is updated by receiving information from the other node 200, and a control message called FIND_NODE can be used.

한편, 라우팅 테이블에 목적지 노드(200b)의 정보가 없는 경우, 출발 노드(200a)는 목적지 노드(200b)와 XOR 거리가 가까운 다른 노드를 경유하는 방법 이외에도, 목적지 노드(200b)의 정보를 얻기 위해 컨트롤 메시지를 이용할 수도 있다.On the other hand, if there is no information of the destination node 200b in the routing table, the departure node 200a is to obtain information of the destination node 200b in addition to the method of passing through another node having a close XOR distance to the destination node 200b. Control messages can also be used.

예를 들어, 출발 노드(200a)의 라우팅 테이블에서 특정 행이 비어있는 경우를 가정한다. 이 경우, 출발 노드(200a)는 라우팅 테이블에 존재하는 다른 이웃 노드들에게 FIND_NODE 등의 메시지를 보낼 수 있다. FIND_NODE 메시지는 출발 노드(200a)와 특정 행에 대응되는 XOR 거리를 갖는 노드의 정보를 요청하는 내용을 포함할 수 있다. 출발 노드(200a)는 이웃 노드로부터 해당 노드의 정보를 전달받으면, 이를 라우팅 테이블에 기록하여 업데이트 할 수 있다.For example, it is assumed that a specific row is empty in the routing table of the departure node 200a. In this case, the departure node 200a may send a message such as FIND_NODE to other neighboring nodes existing in the routing table. The FIND_NODE message may include a request for information on a node having an XOR distance between the departure node 200a and a specific row. When the departure node 200a receives information of the corresponding node from the neighboring node, it can be updated by recording it in the routing table.

이하에서는 출발 노드(200a)와 목적지 노드(200b)가 서로 다른 샤드에 속하는 경우 메시지를 전달하는 방법에 대해 설명한다. Hereinafter, a method of transmitting a message when the departure node 200a and the destination node 200b belong to different shards will be described.

도 6은 한 실시예에 따른 서로 다른 샤드에 속하는 노드 간 외부 라우팅 메시지 전달 방법의 흐름도이고, 도 7은 한 실시예에 따른 외부 라우팅 메시지 전달 방법의 설명도이고, 도 8은 다른 실시예에 따른 외부 라우팅 메시지 전달 방법의 설명도이다. 6 is a flowchart of an external routing message forwarding method between nodes belonging to different shards according to an embodiment, FIG. 7 is an explanatory diagram of an external routing message forwarding method according to an embodiment, and FIG. 8 is another embodiment It is an explanatory diagram of an external routing message delivery method.

도 6을 참고하면, 서로 다른 샤드(100)에 속한 노드(200) 간의 메시지 전달을 위해서는 샤드(100) ID의 주소와, 샤드(100) 간 XOR 거리를 기반으로 작성된 라우팅 테이블을 작성한다(S201). 도 2와 구별하기 위해, 이때 작성된 라우팅 테이블을 외부 라우팅 테이블이라 하고, 내부 메시지와 구별하기 위해 서로 다른 샤드(100) 간 전달되는 메시지를 외부 메시지라고 호칭한다. 그리고, 편의상 출발 노드(200a)가 속한 샤드를 출발 샤드(100a), 목적지 노드(200b)가 속한 샤드를 목적지 샤드(100b)라고 호칭한다. Referring to FIG. 6 , for message delivery between nodes 200 belonging to different shards 100, a routing table created based on the address of the ID of the shard 100 and the XOR distance between the shards 100 is created (S201) ). In order to distinguish it from FIG. 2, the created routing table is called an external routing table, and a message transferred between different shards 100 is called an external message to distinguish it from an internal message. And, for convenience, the shard to which the departure node 200a belongs is called the departure shard 100a and the shard to which the destination node 200b belongs is called the destination shard 100b.

한편, 하나의 샤드에 속한 노드들은 각각 서로 다른 내부 라우팅 테이블을 가지고 있으나, 외부 라우팅 테이블은 모두 동일하다. On the other hand, nodes belonging to one shard each have different internal routing tables, but all external routing tables are the same.

예를 들어, 샤드 6에 속한 노드의 외부 라우팅 테이블을 작성하기 위해 우선 도 2에서 설명된 방식으로 우선 샤드 간 XOR 거리를 구한다. 이하 편의상 샤드의 이름이 곧 샤드의 주소라고 가정한다. 따라서 샤드 6의 주소가 6이고, 6을 이진화한 110이 샤드 6의 ID라고 할 수 있다. For example, in order to create an external routing table of a node belonging to shard 6, the XOR distance between shards is first obtained in the manner described in FIG. 2 . Hereinafter, for convenience, it is assumed that the name of the shard is the address of the shard. Therefore, it can be said that the address of shard 6 is 6, and the ID of shard 6 is 110, which is the binary number of 6.

샤드 1 내지 샤드 5 그리고 샤드 7이 이웃 샤드일 때, 샤드 6의 ID와 각 샤드의 ID의 이진화된 비트의 앞자리부터 비교하여, 공통 비트의 길이가 길수록 샤드 간 XOR 거리는 가깝다고 볼 수 있다.When shards 1 to 5 and shard 7 are neighboring shards, it can be seen that the longer the common bit length, the closer the XOR distance between shards is by comparing the ID of shard 6 and the binarized bits of the ID of each shard.

샤드 7의 ID는 7을 이진화한 111이므로 샤드 6의 ID인 110과 공통 비트의 길이가 2이다. 샤드 4의 ID는 100, 샤드 5의 ID는 101이므로 샤드 6의 ID와 공통 비트의 길이가 1이다. 샤드 1, 샤드 2, 샤드 3의 경우를 구해보면 공통 비트의 각각 0이다. 따라서 샤드 6의 외부 라우팅 테이블의 첫번째 행은 샤드 7, 두 번째 행은 샤드 4와 샤드 5, 세 번째 행은 샤드 1, 샤드 2, 샤드 3을 포함한다. The ID of shard 7 is 111, which is binary 7, so the length of the common bit with 110, the ID of shard 6, is 2. Since the ID of shard 4 is 100 and the ID of shard 5 is 101, the length of the common bit with the ID of shard 6 is 1. In the case of shard 1, shard 2, and shard 3, each of the common bits is 0. Thus, the first row of the external routing table of shard 6 contains shard 7, the second row contains shards 4 and 5, and the third row contains shards 1, 2, and 3.

결과적으로 샤드 6의 외부 라우팅 테이블은 표 2와 같이 작성될 수 있다.As a result, the external routing table of shard 6 can be created as shown in Table 2.

샤드 간 XOR 거리XOR distance between shards 샤드 IDShard ID 1One 샤드 7shard 7 22 샤드 4, 샤드 5shard 4, shard 5 33 샤드 1, 샤드 2, 샤드 3shard 1, shard 2, shard 3

출발 노드(200a)는 자신의 외부 라우팅 테이블을 참조하여, 목적지 샤드(100b)의 정보가 존재하는지 확인한다(S202). 예를 들어, 출발 노드(200a)는 샤드 6에 속한 임의의 노드라고 하고, 목적지 노드(200b)는 샤드 5에 속한 임의의 노드라고 가정한다. 출발 노드(200a)는, 자신의 외부 라우팅 테이블에 목적지 샤드(100b)인 샤드 5의 정보가 존재하는지 확인한다.The departure node 200a refers to its external routing table and checks whether information on the destination shard 100b exists (S202). For example, it is assumed that the departure node 200a is an arbitrary node belonging to shard 6, and the destination node 200b is an arbitrary node belonging to shard 5. The departure node 200a checks whether information of the shard 5, which is the destination shard 100b, exists in its external routing table.

만약 외부 라우팅 테이블에 목적지 샤드(100b)의 정보가 있다면, 목적지 샤드(100b)에 바로 메시지를 전달할 수 있다(S209). 이는 도 7의 경우에 해당한다. If there is information on the destination shard 100b in the external routing table, the message can be directly delivered to the destination shard 100b (S209). This corresponds to the case of FIG. 7 .

외부 라우팅 테이블에 목적지 샤드(100b)의 정보가 없는 경우, 출발 노드(200a)의 외부 라우팅 테이블에 존재하는 샤드 중 목적지 샤드(100b)와 XOR 거리가 가장 가까운 샤드를 중간 샤드(100c)로 선정한다(S203). 이는 도 8의 경우에 해당한다. 샤드 6의 외부 라우팅 테이블에 목적지 샤드(100b)인 샤드 5의 정보가 존재하지 않는다. 따라서 목적지 샤드(100b)인 샤드 5의 외부 라우팅 테이블을 참조하여, 샤드 5와 XOR 거리가 가장 가까운 샤드 4를 중간 샤드(100c)로 선정한다.If there is no information of the destination shard 100b in the external routing table, the shard with the closest XOR distance to the destination shard 100b among shards existing in the external routing table of the departure node 200a is selected as the intermediate shard 100c. (S203). This corresponds to the case of FIG. 8 . There is no information of shard 5, which is the destination shard 100b, in the external routing table of shard 6. Therefore, referring to the external routing table of shard 5, which is the destination shard 100b, shard 4 with the closest XOR distance to shard 5 is selected as the intermediate shard 100c.

이후 출발 노드(200a)는 중간 샤드(100c)에 외부 라우팅 메시지를 전달한다(S204). 중간 샤드(100c)에 외부 라우팅 메시지를 전달한다는 것은 중간 샤드(100c)에 속한 임의의 노드들에게 메시지를 전달한다는 것을 의미한다.Thereafter, the departure node 200a delivers an external routing message to the intermediate shard 100c (S204). Delivering an external routing message to the intermediate shard 100c means delivering the message to arbitrary nodes belonging to the intermediate shard 100c.

외부 라우팅 메시지를 전달받은 중간 샤드(100c)는, 자신의 외부 라우팅 테이블에 목적지 샤드(100b)의 정보가 존재하는지 확인한다(S205). 도 8을 참고하면, 중간 샤드(100c)인 샤드 4는 자신의 외부 라우팅 테이블에 목적지 샤드(100b)인 샤드 5가 존재하는지 확인한다.The intermediate shard 100c that has received the external routing message checks whether information of the destination shard 100b exists in its external routing table (S205). Referring to FIG. 8 , shard 4, which is the intermediate shard 100c, checks whether shard 5, which is the destination shard 100b, exists in its external routing table.

목적지 샤드(100b)의 정보가 존재하면, 중간 샤드(100c)는 목적지 샤드(100b)에 바로 외부 라우팅 메시지를 전달할 수 있다(S209). 즉, 샤드 4는 샤드 5에 외부 라우팅 메시지를 전달할 수 있다.If the information of the destination shard 100b exists, the intermediate shard 100c may directly transmit an external routing message to the destination shard 100b (S209). That is, shard 4 may forward an external routing message to shard 5.

목적지 샤드(100b)의 정보가 존재하지 않는 경우, 중간 샤드(100c)는 자신의 외부 라우팅 테이블에 존재하는 샤드 중, 목적지 샤드(100b)와 XOR 거리가 가장 가까운 새로운 중간 샤드를 선정한다(S206).If information of the destination shard 100b does not exist, the intermediate shard 100c selects a new intermediate shard with the closest XOR distance to the destination shard 100b from among the shards existing in its external routing table (S206) .

중간 샤드(100c)는 새로운 중간 샤드에 외부 라우팅 메시지를 전달한다(S207).The intermediate shard 100c delivers an external routing message to the new intermediate shard (S207).

메시지를 전달 받은 샤드는 자신의 외부 라우팅 테이블에 목적지 샤드(100b)의 정보가 존재하는지 확인한다(S208).The shard receiving the message checks whether information of the destination shard 100b exists in its external routing table (S208).

목적지 샤드(100b)의 정보가 존재하면 목적지 샤드(100b)에 메시지를 전송하고, 그렇지 않은 경우는 단계 S206 이하의 릴레이 과정을 반복한다. If the information of the destination shard 100b exists, the message is transmitted to the destination shard 100b. Otherwise, the relay process of step S206 and below is repeated.

목적지 샤드(100b)에 메시지가 전달된 경우, 목적지 샤드(100b) 내에 있는 목적지 노드에 메시지가 전달되었는지 확인한다(S210). 목적지 샤드(100b)에 메시지를 전달한다는 것은, 목적지 샤드(100b)에 속한 임의의 노드들에게 메시지를 전달한다는 의미이다. 따라서, 목적지 샤드(100b)에 속한 노드들에게 메시지를 전달하여, 목적지 노드가 메시지를 받은 경우 메시지 전달 과정이 종료된다.When the message is delivered to the destination shard 100b, it is checked whether the message is delivered to the destination node in the destination shard 100b (S210). Delivering a message to the destination shard 100b means delivering the message to arbitrary nodes belonging to the destination shard 100b. Accordingly, the message is delivered to the nodes belonging to the destination shard 100b, and when the destination node receives the message, the message delivery process is terminated.

목적지 샤드(100b)에는 메시지가 전달 되었으나, 목적지 노드에 메시지가 전달되지 않은 경우는 내부 라우팅 테이블을 이용하여 내부 라우팅 메시지 형태로 메시지를 전달한다(S211). 내부 라우팅 형태로 메시지를 전달하는 방법은 도 3에서 설명한 방법을 이용할 수 있다. Although the message is delivered to the destination shard 100b, when the message is not delivered to the destination node, the message is delivered in the form of an internal routing message using the internal routing table (S211). The method described with reference to FIG. 3 may be used as a method of delivering a message in the form of internal routing.

한편, 각 노드(200)는, 컨트롤 메시지를 통해 외부 라우팅 테이블을 업데이트 할 수 있다. 따라서 목적지 노드(200)가 속하는 목적지 샤드(100b)가 가변적인 경우에도 목적지 샤드(100)에 메시지를 전달할 수 있다.Meanwhile, each node 200 may update an external routing table through a control message. Therefore, even when the destination shard 100b to which the destination node 200 belongs is variable, a message can be delivered to the destination shard 100 .

본 발명에 따르면, 노드 간 거리를 기준으로 하는 기존의 라우팅 방식에 비해, 샤드 간 거리를 기준으로 하는 라우팅 테이블을 이용므로 전체 네트워크 트래픽 낭비를 최소화할 수 있고, 컨트롤 메시지와 라우팅 테이블을 함께 이용하므로 더 짧은 거리로 메시지를 전달할 수 있다.According to the present invention, compared to the existing routing method based on the distance between nodes, since a routing table based on the distance between shards is used, overall network traffic waste can be minimized, and the control message and the routing table are used together. Messages can be delivered over shorter distances.

또한 본 발명에 따르면, 중개 노드라는 특정 노드의 도움 없이 목표 샤드의 노드들에게 직접 메시지를 전달할 수 있어, 보안성을 향상시킬 수 있고, 기존 플러딩 방식과는 달리 분할된 네트워크에서도 노드 간 통신이 가능하다.In addition, according to the present invention, messages can be delivered directly to the nodes of the target shard without the help of a specific node called an intermediary node, thereby improving security, and unlike the existing flooding method, inter-node communication is possible in a divided network do.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다.The embodiment of the present invention described above is not implemented only through the apparatus and method, and may be implemented through a program for realizing a function corresponding to the configuration of the embodiment of the present invention or a recording medium in which the program is recorded.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improved forms of the present invention are also provided by those skilled in the art using the basic concept of the present invention as defined in the following claims. is within the scope of the right.

Claims (10)

복수의 노드들과 복수의 샤드들을 포함하는 블록체인 샤딩 네트워크에서 노드의 메시지 전달 방법으로서,
임의의 샤드가 주소를 알고 있는 서로 다른 샤드들과의 샤드 간 XOR 거리를 각각 계산하고, 상기 계산된 샤드 간 XOR 거리를 기준으로 샤딩 네트워크를 구성하는 샤드들의 외부 라우팅 테이블을 작성하는 단계, 그리고
임의의 샤드에 속하는 각 노드가 동일한 샤드에서 주소를 알고 있는 서로 다른 노드들과의 노드 간 XOR 거리를 각각 계산하고, 상기 계산된 노드 간 XOR 거리를 기준으로 동일한 샤드에서의 내부 라우팅 테이블을 작성하는 단계를 포함하고,
동일한 샤드에 속하는 노드들이 가지는 내부 라우팅 테이블은 서로 다르고,
동일한 샤드에 속하는 노드들이 가지는 외부 라우팅 테이블은 동일하며,
상기 샤드 간 XOR 거리 및 상기 노드 간 XOR 거리는 이진화된 두 주소의 접두부(Prefix)를 비교하여 계산되고,
임의의 출발 노드는
1) 목적지 노드의 샤드가 자신과 동일한 샤드인 경우, 자신의 내부 라우팅 테이블을 이용하여 동일한 샤드에 속한 목적지 노드 또는 중간 노드로 메시지를 전달하고,
2) 상기 목적지 노드의 샤드가 자신과 다른 목적지 샤드인 경우, 자신이 속하는 출발 샤드의 외부 라우팅 테이블에 상기 목적지 샤드가 존재하는 지 확인하고, 3) 상기 외부 라우팅 테이블에 상기 목적지 샤드가 존재하는 경우, 상기 목적지 샤드로 상기 메시지를 전달하고, 4) 상기 외부 라우팅 테이블에 상기 목적지 샤드가 존재하지 않는 경우, 상기 외부 라우팅 테이블에서 XOR 거리가 가장 가까운 샤드를 중간 샤드로 설정하고, 상기 중간 샤드로 상기 메시지를 전달하는, 메시지 전달 방법.
A method for transmitting a message of a node in a blockchain sharding network including a plurality of nodes and a plurality of shards, the method comprising:
Each shard calculates the XOR distance between shards with different shards whose addresses are known, and creates an external routing table of shards constituting the sharding network based on the calculated XOR distance between shards, and
Each node belonging to a random shard calculates the XOR distance between nodes with different nodes that know the address in the same shard, and creates an internal routing table in the same shard based on the calculated XOR distance between nodes. comprising steps,
Nodes belonging to the same shard have different internal routing tables,
Nodes belonging to the same shard have the same external routing table,
The XOR distance between the shards and the XOR distance between the nodes are calculated by comparing the prefixes of the two binary addresses,
Any starting node is
1) If the shard of the destination node is the same as itself, the message is delivered to the destination node or intermediate node belonging to the same shard using its own internal routing table,
2) If the shard of the destination node is a different destination shard than itself, check whether the destination shard exists in the external routing table of the originating shard to which it belongs, 3) If the destination shard exists in the external routing table , forwards the message to the destination shard, and 4) if the destination shard does not exist in the external routing table, the shard with the closest XOR distance in the external routing table is set as the intermediate shard, and the intermediate shard is used as the intermediate shard. A method of passing a message, a method of passing a message.
제1항에서,
상기 목적지 샤드에 속하는 임의의 노드가 상기 메시지를 수신한 경우, 자신의 내부 라우팅 테이블을 이용하여 상기 메시지를 상기 목적지 노드에 메시지를 전달하거나 상기 목적지 샤드에 속하는 중간 노드로 메시지를 전달하는, 메시지 전달 방법.
In claim 1,
When an arbitrary node belonging to the destination shard receives the message, the message is delivered to the destination node using its own internal routing table or the message is transferred to an intermediate node belonging to the destination shard. Way.
삭제delete 제1항에서,
상기 중간 샤드에 속하는 임의의 노드가 상기 메시지를 수신한 경우, 1) 자신이 속하는 중간 샤드의 외부 라우팅 테이블에 상기 목적지 샤드가 존재하는지 확인하고, 2) 상기 목적지 샤드가 존재하는 경우, 상기 목적지 샤드로 상기 메시지를 전달하고, 3) 상기 목적지 샤드가 존재하지 않는 경우, 상기 중간 샤드의 외부 라우팅 테이블에서 XOR 거리가 가장 가까운 샤드로 상기 메시지를 전달하는, 메시지 전달 방법.
In claim 1,
When any node belonging to the intermediate shard receives the message, 1) it checks whether the destination shard exists in the external routing table of the intermediate shard to which it belongs, and 2) if the destination shard exists, the destination shard and 3) if the destination shard does not exist, forwarding the message to the shard with the closest XOR distance in the external routing table of the intermediate shard.
제1항에서,
상기 샤드 간 XOR 거리는
각 샤드의 주소를 이진화하고, 이진화된 주소의 접두부(Prefix)를 비교하여 접두부의 공통 부분이 길수록 XOR 거리가 가까운 것으로 결정되고,
상기 노드 간 XOR 거리는
각 노드의 주소를 이진화하고, 이진화된 주소의 접두부(Prefix)를 비교하여 접두부의 공통 부분이 길수록 XOR 거리가 가까운 것으로 결정되는, 메시지 전달 방법.
In claim 1,
The XOR distance between the shards is
The address of each shard is binarized, and the prefixes of the binarized addresses are compared. The longer the common part of the prefix, the closer the XOR distance is determined.
The XOR distance between the nodes is
A message delivery method in which the address of each node is binarized and the prefixes of the binarized addresses are compared, and the longer the common part of the prefix, the closer the XOR distance is determined.
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete
KR1020190098404A 2018-11-19 2019-08-12 Method for transmitting message between nodes based on blockcahin sharding KR102331202B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020180142865 2018-11-19
KR20180142865 2018-11-19

Publications (2)

Publication Number Publication Date
KR20200058273A KR20200058273A (en) 2020-05-27
KR102331202B1 true KR102331202B1 (en) 2021-11-26

Family

ID=70910970

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190098404A KR102331202B1 (en) 2018-11-19 2019-08-12 Method for transmitting message between nodes based on blockcahin sharding

Country Status (1)

Country Link
KR (1) KR102331202B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220089383A (en) 2020-12-21 2022-06-28 서강대학교산학협력단 Load balancing method based on transaction execution time in Ethereum sharding environment and Ethereum sharding system
CN114745382B (en) * 2022-04-07 2024-05-24 中国邮政储蓄银行股份有限公司 Task slicing method, task slicing device and service system
KR102596700B1 (en) * 2022-06-03 2023-11-09 주식회사 블룸테크놀로지 System and method for inter shard transaction in blockchain network
KR102628759B1 (en) * 2022-06-14 2024-01-23 주식회사 블룸테크놀로지 System and method for changing a working-shard of an account in blockchain network

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100686732B1 (en) * 2000-08-26 2007-02-23 삼성전자주식회사 Method for foriming database for routing data packet from plural prefix and method for routing and router using the method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100607139B1 (en) * 2004-06-28 2006-08-02 주식회사 젤라인 Smart routing method based a relative distance between nodes in communication system using the shared medium
US7957277B2 (en) * 2005-02-25 2011-06-07 Interdigital Technology Corporation Wireless communication method and system for routing packets via intra-mesh and extra-mesh routes

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100686732B1 (en) * 2000-08-26 2007-02-23 삼성전자주식회사 Method for foriming database for routing data packet from plural prefix and method for routing and router using the method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Identity management application using Blockchain, MongoDB Stitch & MongoDB Atlas - Part 1, https://www.mongodb.com/blog/post/identity-management-application-using-blockchain-mongodb-stitch-mongodb-atlas-part-1(2018.11.12.) 1부.*
Kan Luo, et al. "A multiple blockchains architecture on inter-blockchain communication." IEEE International Conference on Software Quality, Reliability and Security Companion (QRS-C). IEEE(2018.08.) 1부.*
MongoDB Sharding: Step by step, https://www.javahotchocolate.com/notes/mongodb-sharding.html(2013.09.17.) 1부.*

Also Published As

Publication number Publication date
KR20200058273A (en) 2020-05-27

Similar Documents

Publication Publication Date Title
KR102331202B1 (en) Method for transmitting message between nodes based on blockcahin sharding
US6810259B1 (en) Location update protocol
KR101183050B1 (en) Distributed Hashing Mechanism for self-organizing networks
US8041942B2 (en) Robust peer-to-peer networks and methods of use thereof
JP2009543188A (en) Inter-region communication within a rendezvous federation
US20070230468A1 (en) Method to support mobile devices in a peer-to-peer network
CN110166220B (en) Slicing method for slicing according to hash value of partition key
JP2007148545A (en) Information delivery system, information delivery method, node device and node processing program
CN112995211B (en) Data processing method, device and equipment based on block chain network and storage medium
JP2009543447A (en) Inter-region communication within a rendezvous federation
US20110208828A1 (en) Node apparatus and computer-readable storage medium for computer program
JP2009543447A5 (en)
JP2009508410A (en) Parallel execution of peer-to-peer overlay communication using multi-destination routing
KR100418383B1 (en) Mobile communications network and data delivery method in mobile communications network
JPWO2015108106A1 (en) Packet transfer device, control device, communication system, communication method, and program
CN113411376A (en) Sensor data processing method and device based on block chain fragmentation storage
JP6580212B1 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
US20160142213A1 (en) Authentication service and certificate exchange protocol in wireless ad hoc networks
US10855578B1 (en) Anonymous communications network utilizing bridging connections between broadcast domains
CN115914074A (en) Point-to-point network message transmission method, routing equipment and computer storage medium
CN109831313B (en) Group communication method, apparatus and computer-readable storage medium
Zghaibeh et al. d-SHAM: a constant degree-scalable homogeneous addressing mechanism for structured P2P networks
JP6207770B1 (en) Communication system, communication device, and communication destination switching method
CN111327628A (en) Anonymous communication system based on SDN
US20180176129A1 (en) Communication method, control device, and system

Legal Events

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