WO2020019342A1 - Method for delivering message in server cluster, device, and storage medium. - Google Patents

Method for delivering message in server cluster, device, and storage medium. Download PDF

Info

Publication number
WO2020019342A1
WO2020019342A1 PCT/CN2018/097649 CN2018097649W WO2020019342A1 WO 2020019342 A1 WO2020019342 A1 WO 2020019342A1 CN 2018097649 W CN2018097649 W CN 2018097649W WO 2020019342 A1 WO2020019342 A1 WO 2020019342A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
group
message
node
nodes
Prior art date
Application number
PCT/CN2018/097649
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2018/097649 priority Critical patent/WO2020019342A1/en
Priority to CN201880002395.5A priority patent/CN109792406B/en
Publication of WO2020019342A1 publication Critical patent/WO2020019342A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks

Definitions

  • the present invention relates to the field of blockchain, and in particular, to a method, device, and storage medium for message passing in a server cluster.
  • Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms.
  • Blockchain technology uses a blockchain-type data structure to verify and store data, and uses distributed node consensus algorithms to generate A new distributed infrastructure and computing method that updates and updates data, uses cryptography to ensure data transmission and access security, and uses smart contracts composed of automated script code to program and manipulate data.
  • one of the main bottlenecks restricting transaction processing speed or message processing speed is the network based on flooding routing algorithm. The biggest problem of flooding algorithm is that it will generate a large number of repeated packets. Occupies network resources, making router and link resources too wasteful, resulting in low efficiency.
  • High network delays cause messages in the blockchain system to not be quickly propagated to most nodes in the network, and a server node may Receiving the same message sent by multiple server nodes, receiving repeated messages consumes a lot of network bandwidth resources and hardware device resources, thereby reducing the message propagation efficiency.
  • the present invention provides a message passing method in a server cluster, including:
  • the server node is divided into several server groups according to a preset rule, the server nodes form a ring-shaped network topology, the server node is configured with a routing table, and the routing table includes intra-group routing buckets and inter-group routing buckets;
  • a server node in a server group When a server node in a server group receives a message, it passes the message to other server nodes in the server group according to the routing bucket in the group;
  • the message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • the dividing the server node into several server groups according to a preset rule includes:
  • the number of server nodes grouped by each server is Divide the server node into Server groups; where the number of server nodes is N, Is a positive integer.
  • the number of server nodes grouped according to each server is Divide the server node into After grouping the servers, it also includes:
  • Sort the grouped server nodes with adjacent intervals Server nodes that are integer multiples of each other are peer nodes.
  • the passing the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passing the message to other server nodes corresponding to the server group of the designated server node includes:
  • the message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  • the present invention provides a message passing method in a server cluster from the perspective of a single server node of a server cluster, which is applied to a blockchain system.
  • the server node is divided into several server groups according to preset rules, including:
  • routing table includes intra-group routing buckets and inter-group routing buckets
  • the message When a message is received, the message is delivered to other server nodes corresponding to the server group of the server node according to the routing bucket in the group; and,
  • the message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • the number of server nodes of each server group is The number of server nodes is N, Is a positive integer; adjacent intervals Server nodes that are integer multiples of each other are peer nodes.
  • the passing the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passing the message to other server nodes corresponding to the server group of the designated server node includes:
  • the message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  • the present invention also provides a messaging device in a server cluster, which is applied to a blockchain system.
  • the server nodes in the server cluster form a ring-shaped network topology, and the server nodes follow a preset rule. Divided into several server groups, including:
  • a configuration module configured to configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
  • In-group messaging module when a message is received, the message is delivered to other server nodes corresponding to the server group of the server node according to the routing bucket in the group;
  • Inter-group messaging module used to pass the message to a specified server node grouped by other servers according to the inter-group routing bucket, and the specified server node passes the message to other server nodes corresponding to the server group of the specified server node .
  • the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and the computer program implements the foregoing message passing method in a server cluster when executed by a processor.
  • the present invention has the following beneficial effects:
  • the server nodes in the block chain system network form a ring-shaped network topology structure, and the server nodes are divided into a plurality of server groups.
  • Each server node is configured with message transmission and server between groups for the server nodes in the group.
  • the server node can realize the point-to-point and point-to-multipoint transmission of the message.
  • any server node When any server node receives the message, it will pass the message to other server nodes in the group, and meanwhile Passed to the designated server node of other groups, and the designated server node will pass the message to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hops of server nodes, effectively improving the blockchain
  • the efficiency of message passing between server nodes in a server cluster in the network When any server node receives the message, it will pass the message to other server nodes in the group, and meanwhile Passed to the designated server node of other groups, and the designated server node will pass the message to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hops of server nodes, effectively improving the blockchain The efficiency of message passing between server nodes in a server cluster in the network.
  • FIG. 1 is a schematic flowchart of an embodiment of a message passing method in a server cluster according to the present invention
  • FIG. 2 is a schematic diagram of a ring topology structure composed of server nodes according to the present invention
  • FIG. 3 is another schematic diagram of a ring topology composed of server nodes according to the present invention.
  • FIG. 4 is a schematic flowchart of another embodiment of a message passing method in a server cluster according to the present invention.
  • FIG. 5 is a schematic diagram of an embodiment of a message passing device in a server cluster according to the present invention.
  • FIG. 6 is a schematic diagram of a ring structure composed of server nodes in a blockchain system of the present invention.
  • FIG. 7 is a schematic structural diagram of an embodiment of a server node according to the present invention.
  • the present invention provides a message passing method in a server cluster.
  • the method is applied to a blockchain system. As shown in FIG. 1, the method includes the following steps:
  • the server node is divided into several server groups according to a preset rule.
  • the server nodes form a ring-shaped network topology.
  • the server node is configured with a routing table.
  • the routing table includes intra-group routing buckets and inter-group routing buckets. .
  • the blockchain system requires a large amount of computing power. Platforms equipped with the blockchain system require a large number of servers for transaction calculation and information transmission.
  • a specific number of server nodes are divided into several servers according to preset rules. Grouping, and the server nodes form a ring-shaped network topology, as shown in FIG. 2, the ring structure made up of the server nodes of this embodiment, and the nodes on the ring are named Aa, Ab, ..., Ba, Bb, in order. ..., Ja, Jb..., as shown in FIG. 2, nodes with the same capital letter belong to the same server group, such as Aa, Ab, ... Aj are the same server group, and the server nodes logically pass the forwarding rules based on the IEEE 802.1 specification.
  • server node messages support point-to-point, multipoint-to-multipoint, and point-to-multipoint transmission.
  • message transmission is preferably performed in a point-to-point and point-to-multipoint manner; further
  • the server nodes are all configured with a routing table, specifically a DHT (Distributed Hash Table) routing table.
  • the routing table consists of 2 It consists of buckets, including intra-group routing buckets and inter-group routing buckets.
  • the routing buckets in the group contain other distances from the server node's address and location within a preset range.
  • the address location information of the server node; the inter-group routing bucket contains the address location information of other server nodes that is an integer multiple of a preset value from the address location of the server node.
  • server nodes on the ring provide logical computing power for processing blockchain services.
  • a server node on the ring receives a message, it passes the message according to the routing bucket in the group.
  • each server node on the ring has the same status and the same role.
  • Each server node is both an index server and a resource server.
  • the server node will pass the message to the same group based on the address location information of other server nodes that are located within a preset range from the address location of the server node in the routing bucket in the group.
  • Other server nodes In FIG. 2, when the server node Aa receives the message, it transmits the message to other server nodes Ab, Ac, ... Aj in the group according to the intra-group routing bucket.
  • S30 Pass the message to a designated server node of another server group according to the inter-group routing bucket, so that the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • the received message is passed to other server nodes in the same server group
  • the received message is passed to a designated server node of the other server group
  • the designated server node passes the message to
  • the designated server node corresponds to other server nodes of the server group.
  • the server node Aa passes the received message to the designated server nodes of other server groups, including the server nodes Ba, Ca, ..., Ja
  • the designated server nodes then pass the message to other server nodes in the corresponding group, such as the designated server node Ba to pass the message to other server nodes Bb, Bc, ..., Bj of the server group where the server node Ba is located, and Complete the message transfer between server nodes in the blockchain system.
  • the server nodes in the blockchain system network form a ring-shaped network topology structure, and the server nodes are divided into a plurality of server groups.
  • Each server node is configured for message transmission and inter-group communication between the server nodes in the group.
  • the server node can realize the point-to-point and point-to-multipoint transmission of the message.
  • any server node When any server node receives the message, it will pass the message to other server nodes in the group, and meanwhile Messages are sent to designated server nodes in other groups, and the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or querying function between 2-3 hop server nodes, effectively improving the block The efficiency of message passing between server nodes in a server cluster in a chain network.
  • the dividing a server node into a plurality of server groups according to a preset rule includes:
  • the number of server nodes grouped by each server is Divide the server node into Server groups; where the number of server nodes is N, Is a positive integer.
  • the server nodes are fragmented into When the corresponding server is grouped, the number of server nodes for each server is Divide server nodes into Server groups to ensure that the number of shards in a ring composed of server nodes is equal to the number of server nodes in each server group, thereby facilitating the dynamic shard management of the formed server node ring, where the number of server nodes Is N, and said Is a positive integer, as shown in Figure 2, there are 100 server nodes, then the ring formed by the 100 server nodes is divided into Shards, that is, 10 server groups, each server group contains 10 server nodes, at this time, the routing table in each server node only needs to configure the address locations of 10 server nodes including itself information.
  • the number of server nodes grouped according to each server is Divide the server node into After grouping the servers, it also includes:
  • Sort the grouped server nodes with adjacent intervals Server nodes that are integer multiples of each other are peer nodes.
  • each application server node can receive a message from the blockchain system or as a designated server node grouped as a server.
  • each The number of server nodes in a server group is After the server nodes are grouped, the grouped server nodes are sorted. Specifically, the server nodes are sorted along a unified direction of the ring, and the address and location information of the server nodes are separated. Server nodes that are integer multiples of each other are peer nodes. The positions of these nodes in each group are the same.
  • the message delivery method in the server node in Figure 2 is transformed into a dimension and transformed into the one shown in Figure 3.
  • each server group includes one of the specified server nodes, and the specified server node is a slice node of the server group, such as Aa, Ba, Ca, and Da are slice nodes of each server group under the current group.
  • the message is passed to a designated server node grouped by another server according to an inter-group routing bucket, so that the designated server node passes the message to a server group corresponding to the designated server node.
  • Other server nodes including:
  • the message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  • the component routing table of each server node on the ring is configured to be separated from its own address location information. Address location information of other server nodes that are integer multiples of each other. These other server nodes are peer nodes to each other. After a server node receives a message, it not only passes the message to the server group and the server node through the routing table in the group. Address locations 1 to Server node of the server node also passes the message to the server node by the component routing table A designated server node of another server grouping that is an integer multiple of that, that is, other server nodes that are peer nodes with this server node, and then the peer node passes the message to other server nodes in the corresponding server grouping .
  • the server node Aa After receiving the message, the server node Aa passes the message to the peer nodes Ba, Ca, Da, ..., and then the peer nodes pass the message to other server nodes in the corresponding packet, such as the peer node Ba. Pass the message to other server nodes Bb, Bc, Bd, etc. in the corresponding group to complete the message passing between the server nodes in the blockchain system.
  • the method further includes:
  • the time delay of receiving the message by each server node is acquired, and the performance index of each server node is calculated according to the time delay.
  • the time delay for each server node to receive the message is obtained, and then the performance index of each server node is counted according to the time delay. If the delay is too high, the performance of the server node may exist Inadequate, in order to ensure the normal operation of the blockchain system, the corresponding server nodes are adjusted according to the performance indicators to ensure the efficient transmission of messages in the blockchain system.
  • the present invention illustrates a message passing method in a server cluster provided by the present invention.
  • the method is applied to a server cluster.
  • the server nodes in the cluster are divided into several server groups according to a preset rule, and the method includes:
  • S100 Configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
  • S300 Pass the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • the blockchain system requires a large amount of computing power. Platforms equipped with the blockchain system require a large number of servers for transaction calculation and information transmission.
  • a specific number of server nodes are divided into several servers according to preset rules. Grouping, and the server nodes form a ring-shaped network topology, and the server nodes are all configured with a routing table, the routing table is composed of 2 buckets, including intra-group routing buckets and inter-group routing buckets,
  • the routing buckets in the group contain the address location information of other server nodes that are within a preset range from the address location of the server node; the routing buckets in the group contain the addresses of other server nodes that are integer multiples of the preset value from the address location of the server node Location information; when a server node receives a message, it passes the message to other server nodes grouped by the server according to the routing buckets in the group.
  • Each server node on the ring has the same status and the same role.
  • a server node needs to broadcast a message (such as block information) after receiving the message, the Service node address based on the position information from the other server nodes a preset range from the present location of the address within the set of routing server node tub configured, the server passes the message to other nodes in the same group.
  • the server node Aa receives a message, it transmits the message to other server nodes Ab, Ac,... Aj in the group according to an intra-group routing table.
  • the received message is passed to other server nodes within the same server group, the received message is passed to a specified server node of the other server group, and then the specified server node passes the message to the specified server
  • the node corresponds to other server nodes of the server group.
  • the server node Aa passes the received message to the designated server node of the other server group, including the server nodes Ba, Ca, ..., Ja, and Some designated server nodes pass the message to other server nodes in the corresponding group, such as designated server node Ba to pass the message to other server nodes Bb, Bc ..., Bj of the server group where the server node Ba is located, thereby completing the block Message passing between server nodes in a chain system.
  • the number of server nodes of each of the server groups is The number of server nodes is N, Is a positive integer; adjacent intervals Server nodes that are integer multiples of each other are peer nodes.
  • the message is passed to a designated server node grouped by another server according to an inter-group routing bucket, and the designated server node passes the message to a server group corresponding to the designated server node.
  • Other server nodes including:
  • the message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  • the present invention provides a message passing device in a server cluster, which is applied to a blockchain system.
  • the server nodes in the server cluster form a ring-shaped network topology.
  • the server node is divided into several server groups according to a preset rule, including:
  • Configuration module 100 configured to configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
  • In-group messaging module 200 configured to pass the message to other server nodes corresponding to the server group corresponding to the server node according to the routing bucket in the group when a message is received;
  • Inter-group messaging module 300 configured to deliver the message to a designated server node grouped by another server according to the inter-group routing bucket, and the designated server node passes the message to other servers corresponding to the server group of the designated server node node.
  • the present invention provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • messages in the server cluster according to the foregoing embodiment are implemented. Delivery method.
  • the computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory, read-only memory), and RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or Rays card.
  • the storage device includes any medium that stores or transmits information in a readable form by a device (for example, a computer, a mobile phone), and may be a read-only memory, a magnetic disk, or an optical disk.
  • a computer-readable storage medium provided by an embodiment of the present invention can be implemented to divide a server node into several server groups according to a preset rule, the server nodes form a ring-shaped network topology, and the server node is configured with a routing table.
  • the routing table includes intra-group routing buckets and inter-group routing buckets; when a server node in a server group receives a message, the message is delivered to other server nodes in the server group according to the intra-group routing bucket; and The routing bucket passes the message to a designated server node of another server group, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • each server node is configured for the messaging of the server nodes within the group and the server nodes between the groups.
  • Server nodes can implement point-to-point and point-to-multipoint delivery of messages.
  • any server node receives a message, it passes the message to other server nodes in the group, and at the same time passes the message to Designated server nodes of other groups, the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hop server nodes, effectively improving the blockchain network The efficiency of message passing between the server nodes of a server cluster.
  • the computer-readable storage medium provided by the embodiment of the present invention can implement the foregoing embodiment of the message passing method in the server cluster.
  • the present invention also provides a blockchain system.
  • the blockchain system includes Ring 0 and Ring 1 which are ring networks composed of server nodes. Topology structure, each point (Unity) on the ring represents a server node, multiple server nodes (Unity) form a server group (Group), server nodes in the same position of each server group (Group) are peer nodes to each other (Counterpart).
  • the server shown in FIG. 7 is used as the server node in the blockchain system in FIG. 6 to complete the message passing method in the server cluster.
  • the server includes a processor 703, a memory 705, and other devices. Those skilled in the art can understand that the structural device shown in FIG.
  • the memory 705 may be configured to store a computer program 701 and various functional modules, and the processor 703 runs the computer program 701 stored in the memory 705 to execute various functional applications and data processing of the device.
  • the memory 705 may be an internal memory or an external memory, or include both an internal memory and an external memory.
  • the internal memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory.
  • External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on.
  • the memory disclosed by the present invention includes, but is not limited to, these types of memory.
  • the memory 705 disclosed in the present invention is only an example and not a limitation.
  • One or more processors 703 shown in FIG. 7 can execute and implement the functions of the configuration module 100, the intra-group messaging module 200, and the inter-group messaging module 300 shown in FIG. 5.
  • the server includes one or more processors 703, and one or more memories 705, one or more computer programs 701, wherein the one or more computer programs 701 are stored in the memory 705 And is configured to be executed by the one or more processors 703, and the one or more computer programs 701 are configured to execute the message passing method in the server cluster described in the above embodiments.
  • a blockchain system provided by an embodiment of the present invention can realize the division of server nodes into several server groups according to preset rules.
  • the server nodes form a ring-shaped network topology.
  • the server nodes are configured with routing tables.
  • the routing table includes intra-group routing buckets and inter-group routing buckets; when a server node in a server group receives a message, the message is delivered to other server nodes in the server group according to the intra-group routing bucket; and according to the inter-group routing
  • the bucket passes the message to a designated server node of another server group, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  • each server node is configured for the messaging of the server nodes within the group and the server nodes between the groups.
  • Server nodes can implement point-to-point and point-to-multipoint delivery of messages.
  • any server node receives a message, it passes the message to other server nodes in the group, and at the same time passes the message to Designated server nodes of other groups, the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hop server nodes, effectively improving the blockchain network The efficiency of message passing between the server nodes of a server cluster.
  • the blockchain system provided by the embodiment of the present invention can implement the embodiment of the message passing method in the server cluster provided above.

Abstract

The present invention relates to the field of blockchains, and specifically relates to a method for delivering a message in a server cluster, a device, and a storage medium. The method comprises: dividing, according to a pre-determined rule, server nodes into multiple server groups, the server nodes forming a ring network topology structure, and the server nodes being configured with routing tables comprising an intra-group routing bucket and an inter-group routing bucket; when a server node in a server group receives a message, delivering, according to the intra-group routing bucket, the message to the other server nodes in the server group; and delivering, according to the inter-group routing bucket, the message to specified server nodes of the other server groups, such that the specified server nodes deliver the message to the other server nodes in the server groups corresponding to the specified server nodes. The present invention effectively improves the efficiency of delivering a message between server nodes in a server cluster in a blockchain network.

Description

服务器集群中的消息传递方法、装置及存储介质Message passing method, device and storage medium in server cluster 技术领域Technical field
本发明涉及区块链领域,具体涉及一种服务器集群中的消息传递方法、装置及存储介质。The present invention relates to the field of blockchain, and in particular, to a method, device, and storage medium for message passing in a server cluster.
背景技术Background technique
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式,区块链技术是利用块链式数据结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全、利用由自动化脚本代码组成的智能合约来编程和操作数据的一种全新的分布式基础架构与计算方式。现有技术的区块链系统中,制约交易处理速度或称消息处理速度的主要瓶颈之一是基于泛洪(flooding)路由算法的网络,泛洪算法最大的问题是会产生大量的重复分组,占用网络资源,使路由器和链路的资源过于浪费,以致效率很低,较高的网络延迟导致区块链系统内的消息无法快速地传播到网络中的大部分节点,并且,一个服务器节点可能接收到多个服务器节点发送的相同消息,接收重复的消息消耗了大量的网络带宽资源以及硬件设备资源,从而降低消息的传播效率。Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms. Blockchain technology uses a blockchain-type data structure to verify and store data, and uses distributed node consensus algorithms to generate A new distributed infrastructure and computing method that updates and updates data, uses cryptography to ensure data transmission and access security, and uses smart contracts composed of automated script code to program and manipulate data. In the prior art blockchain system, one of the main bottlenecks restricting transaction processing speed or message processing speed is the network based on flooding routing algorithm. The biggest problem of flooding algorithm is that it will generate a large number of repeated packets. Occupies network resources, making router and link resources too wasteful, resulting in low efficiency. High network delays cause messages in the blockchain system to not be quickly propagated to most nodes in the network, and a server node may Receiving the same message sent by multiple server nodes, receiving repeated messages consumes a lot of network bandwidth resources and hardware device resources, thereby reducing the message propagation efficiency.
发明内容Summary of the Invention
为克服以上技术问题,特别是现有技术区块链系统网络中无法高效地传播消息的问题,特提出以下技术方案:In order to overcome the above technical problems, especially the problem of inefficient transmission of messages in the prior art blockchain system network, the following technical solutions are proposed:
第一方面,本发明提供一种服务器集群中的消息传递方法,包括:In a first aspect, the present invention provides a message passing method in a server cluster, including:
按照预设规则将服务器节点分成若干个服务器分组,所述服务器节点组成环状的网络拓扑结构,所述服务器节点配置有路由表,所述路由表包括组内路由桶及组间路由桶;The server node is divided into several server groups according to a preset rule, the server nodes form a ring-shaped network topology, the server node is configured with a routing table, and the routing table includes intra-group routing buckets and inter-group routing buckets;
当服务器分组中的服务器节点接收到消息时,根据组内路由桶将所述 消息传递至该服务器分组的其它服务器节点;以及When a server node in a server group receives a message, it passes the message to other server nodes in the server group according to the routing bucket in the group; and
根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。The message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
进一步的,所述按照预设规则将服务器节点分成若干个服务器分组,包括:Further, the dividing the server node into several server groups according to a preset rule includes:
按照每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000001
将所述服务器节点分成
Figure PCTCN2018097649-appb-000002
个服务器分组;其中,服务器节点的数量为N,
Figure PCTCN2018097649-appb-000003
为正整数。
The number of server nodes grouped by each server is
Figure PCTCN2018097649-appb-000001
Divide the server node into
Figure PCTCN2018097649-appb-000002
Server groups; where the number of server nodes is N,
Figure PCTCN2018097649-appb-000003
Is a positive integer.
进一步的,所述按照每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000004
将所述服务器节点分成
Figure PCTCN2018097649-appb-000005
个服务器分组之后,还包括:
Further, the number of server nodes grouped according to each server is
Figure PCTCN2018097649-appb-000004
Divide the server node into
Figure PCTCN2018097649-appb-000005
After grouping the servers, it also includes:
对分组后的服务器节点进行排序,相邻间隔
Figure PCTCN2018097649-appb-000006
的整数倍的服务器节点互为对等节点。
Sort the grouped server nodes with adjacent intervals
Figure PCTCN2018097649-appb-000006
Server nodes that are integer multiples of each other are peer nodes.
进一步的,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:Further, the passing the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passing the message to other server nodes corresponding to the server group of the designated server node includes:
根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
第二方面,本发明从服务器集群的单个服务器节点视角,提供一种服务器集群中的消息传递方法,应用于区块链系统,所述服务器集群中的服务器节点组成环状的网络拓扑结构,所述服务器节点按照预设规则分成若干个服务器分组,包括:In a second aspect, the present invention provides a message passing method in a server cluster from the perspective of a single server node of a server cluster, which is applied to a blockchain system. The server node is divided into several server groups according to preset rules, including:
配置本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;Configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;以及,When a message is received, the message is delivered to other server nodes corresponding to the server group of the server node according to the routing bucket in the group; and,
根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。The message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
进一步的,所述每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000007
所述服务器节点的数量为N,
Figure PCTCN2018097649-appb-000008
为正整数;相邻间隔
Figure PCTCN2018097649-appb-000009
的整数倍的服务器节点互为对等节点。
Further, the number of server nodes of each server group is
Figure PCTCN2018097649-appb-000007
The number of server nodes is N,
Figure PCTCN2018097649-appb-000008
Is a positive integer; adjacent intervals
Figure PCTCN2018097649-appb-000009
Server nodes that are integer multiples of each other are peer nodes.
进一步的,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:Further, the passing the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passing the message to other server nodes corresponding to the server group of the designated server node includes:
根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
第三方面,本发明还提供了一种服务器集群中的消息传递装置,应用于区块链系统,所述服务器集群中的服务器节点组成环状的网络拓扑结构,所述服务器节点按照预设规则分成若干个服务器分组,包括:In a third aspect, the present invention also provides a messaging device in a server cluster, which is applied to a blockchain system. The server nodes in the server cluster form a ring-shaped network topology, and the server nodes follow a preset rule. Divided into several server groups, including:
配置模块:用于配置本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;A configuration module: configured to configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
组内消息传递模块:用于当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;In-group messaging module: when a message is received, the message is delivered to other server nodes corresponding to the server group of the server node according to the routing bucket in the group;
组间消息传递模块:用于根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。Inter-group messaging module: used to pass the message to a specified server node grouped by other servers according to the inter-group routing bucket, and the specified server node passes the message to other server nodes corresponding to the server group of the specified server node .
第四方面,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述的服务器集群中的消息传递方法。According to a fourth aspect, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program implements the foregoing message passing method in a server cluster when executed by a processor.
本发明与现有技术相比,具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
本发明通过将区块链系统网络中的服务器节点组成环状的网络拓扑结构,并将服务器节点分成若干个服务器分组,每个服务器节点配置了用于分组内服务器节点的消息传递及分组间服务器节点的消息传递的路由表,服务器节点能实现消息的点到点、点到多点的传递,当任一服务器节点接收到消息后,将消息传递至本分组内的其它服务器节点,同时将消息传递至其它分组的指定服务器节点,由所述指定服务器节点将消息传递至 相应分组内的其它服务器节点,从而完成2-3跳的服务器节点间的消息传递或查询功能,有效地提升区块链网络中的服务器集群的各服务器节点间消息传递的效率。In the invention, the server nodes in the block chain system network form a ring-shaped network topology structure, and the server nodes are divided into a plurality of server groups. Each server node is configured with message transmission and server between groups for the server nodes in the group. The routing table of the node's message passing. The server node can realize the point-to-point and point-to-multipoint transmission of the message. When any server node receives the message, it will pass the message to other server nodes in the group, and meanwhile Passed to the designated server node of other groups, and the designated server node will pass the message to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hops of server nodes, effectively improving the blockchain The efficiency of message passing between server nodes in a server cluster in the network.
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be given in part in the following description, which will become apparent from the following description or be learned through the practice of the present invention.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
图1为本发明服务器集群中的消息传递方法的一实施例流程示意图;1 is a schematic flowchart of an embodiment of a message passing method in a server cluster according to the present invention;
图2为本发明服务器节点组成的环拓扑状结构示意图;2 is a schematic diagram of a ring topology structure composed of server nodes according to the present invention;
图3为本发明服务器节点组成的环状拓扑结构的另一维度示意图;3 is another schematic diagram of a ring topology composed of server nodes according to the present invention;
图4为本发明服务器集群中的消息传递方法的另一实施例流程示意图;4 is a schematic flowchart of another embodiment of a message passing method in a server cluster according to the present invention;
图5为本发明服务器集群中的消息传递装置的一实施例示意图;5 is a schematic diagram of an embodiment of a message passing device in a server cluster according to the present invention;
图6为本发明区块链系统中的服务器节点组成的环形结构示意图;6 is a schematic diagram of a ring structure composed of server nodes in a blockchain system of the present invention;
图7为本发明服务器节点的一实施例结构示意图。FIG. 7 is a schematic structural diagram of an embodiment of a server node according to the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Hereinafter, embodiments of the present invention will be described in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present invention, but not to limit the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作。Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "the" may include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, but does not exclude the presence or addition of one or more other features, integers, steps, operations.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员 的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should also be understood that terms such as those defined in the general dictionary should be understood to have meanings consistent with the meanings in the context of the prior art, and unless specifically defined like this, they would not be idealized or overly Formal meaning to explain.
本领域技术人员应当理解,本发明所称的“应用”、“应用程序”、“计算机程序”以及类似表述的概念,是业内技术人员所公知的相同概念,是指由一系列计算机指令及相关数据资源有机构造的适于电子运行的计算机软件。除非特别指定,这种命名本身不受编程语言种类、级别,也不受其赖以运行的操作系统或平台所限制。Those skilled in the art should understand that the concepts of “application”, “application program”, “computer program” and similar expressions in the present invention are the same concepts known to those skilled in the art, and refer to a series of computer instructions and related Data resources are organically constructed computer software suitable for electronic operation. Unless otherwise specified, this naming is not limited by the type or level of programming language, nor by the operating system or platform on which it is running.
在一种实施例中,本发明提供了一种服务器集群中的消息传递方法,该方法应用于区块链系统中,如图1所示,所述方法包括以下步骤:In one embodiment, the present invention provides a message passing method in a server cluster. The method is applied to a blockchain system. As shown in FIG. 1, the method includes the following steps:
S10:按照预设规则将服务器节点分成若干个服务器分组,所述服务器节点组成环状的网络拓扑结构,所述服务器节点配置有路由表,所述路由表包括组内路由桶及组间路由桶。S10: The server node is divided into several server groups according to a preset rule. The server nodes form a ring-shaped network topology. The server node is configured with a routing table. The routing table includes intra-group routing buckets and inter-group routing buckets. .
区块链系统需要大量的运算力资源,搭载了区块链系统的平台都需要大量的服务器进行交易计算、信息传导,本实施例中,将特定数量的服务器节点按照预设规则分成若干个服务器分组,并且,所述服务器节点组成环状的网络拓扑结构,如图2所示为本实施例服务器节点组成的环状结构,环上的节点依次命名为Aa,Ab,…,Ba,Bb,…,Ja,Jb…,如图2所示,相同大写字母开头的节点属于同一服务器分组如Aa,Ab,…Aj为同一服务器分组,所述服务器节点逻辑上通过基于IEEE 802.1规范的转发规则而组成环状结构,服务器节点消息支持点到点、多点到多点和点到多点等方式的传输,本实施例优选地以点到点与点到多点的方式进行消息的传输;进一步的,所述服务器节点都配置有一个路由表,具体为DHT(Distributed Hash Table,分布式哈希表)路由表,所述路由表由2个桶(buckets)构成,包括组内路由桶(Intra-group Routing table)及组间路由桶(Inter-group Routing table),组内路由桶包含从本服务器节点的地址位置距离预设范围的其它服务器节点的地址位置信息;组间路由桶包含从本服务器节点的地址位置距离预设值的整数倍的其它服务器节点的地址位置信息。The blockchain system requires a large amount of computing power. Platforms equipped with the blockchain system require a large number of servers for transaction calculation and information transmission. In this embodiment, a specific number of server nodes are divided into several servers according to preset rules. Grouping, and the server nodes form a ring-shaped network topology, as shown in FIG. 2, the ring structure made up of the server nodes of this embodiment, and the nodes on the ring are named Aa, Ab, ..., Ba, Bb, in order. …, Ja, Jb…, as shown in FIG. 2, nodes with the same capital letter belong to the same server group, such as Aa, Ab, ... Aj are the same server group, and the server nodes logically pass the forwarding rules based on the IEEE 802.1 specification. Forming a ring structure, server node messages support point-to-point, multipoint-to-multipoint, and point-to-multipoint transmission. In this embodiment, message transmission is preferably performed in a point-to-point and point-to-multipoint manner; further The server nodes are all configured with a routing table, specifically a DHT (Distributed Hash Table) routing table. The routing table consists of 2 It consists of buckets, including intra-group routing buckets and inter-group routing buckets. The routing buckets in the group contain other distances from the server node's address and location within a preset range. The address location information of the server node; the inter-group routing bucket contains the address location information of other server nodes that is an integer multiple of a preset value from the address location of the server node.
S20:当服务器分组中的服务器节点接收到消息时,根据组内路由桶将所述消息传递至该服务器分组的其它服务器节点。S20: When a server node in a server group receives a message, it passes the message to other server nodes in the server group according to the routing bucket in the group.
本实施例的区块链系统中,由环上的服务器节点提供处理区块链业务的逻辑运算力,当环上的服务器节点接收到消息时,根据所述组内路由桶将所述消息传递至该服务器分组的其它服务器节点,环上的每个服务器节点的地位相同,角色也相同,每个服务器节点既是索引服务器,也是资源服务器,当环上某一个服务器节点接收到消息后需要广播消息(如区块信息)时,该服务器节点会根据组内路由桶中配置的从本服务器节点的地址位置距离预设范围的其它服务器节点的地址位置信息,将所述消息传递至同一分组内的其它服务器节点。图2中,当服务器节点Aa接收到消息时,根据组内路由桶(Intra-group Routing table)将消息传递至组内的其它服务器节点Ab,Ac,…Aj。In the blockchain system of this embodiment, server nodes on the ring provide logical computing power for processing blockchain services. When a server node on the ring receives a message, it passes the message according to the routing bucket in the group. To other server nodes grouped by this server, each server node on the ring has the same status and the same role. Each server node is both an index server and a resource server. When a server node on the ring receives a message, it needs to broadcast a message. (Such as block information), the server node will pass the message to the same group based on the address location information of other server nodes that are located within a preset range from the address location of the server node in the routing bucket in the group. Other server nodes. In FIG. 2, when the server node Aa receives the message, it transmits the message to other server nodes Ab, Ac, ... Aj in the group according to the intra-group routing bucket.
S30:根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,以由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。S30: Pass the message to a designated server node of another server group according to the inter-group routing bucket, so that the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
进一步的,在将接收到的消息传递至同一服务器分组内的其它服务器节点的同时,将接收到的消息传递至其它服务器分组的指定服务器节点,然后由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,例如,图2所示中,服务器节点Aa将接收到的消息传递至其它服务器分组的指定服务器节点,包括服务器节点Ba、Ca、……、Ja,然后由该些指定服务器节点将所述消息传递至相应分组内的其它服务器节点,如指定服务器节点Ba将消息传递至服务器节点Ba所在的服务器分组的其它服务器节点Bb、Bc……、Bj,从而完成区块链系统内服务器节点间消息的传递。Further, while the received message is passed to other server nodes in the same server group, the received message is passed to a designated server node of the other server group, and then the designated server node passes the message to The designated server node corresponds to other server nodes of the server group. For example, as shown in FIG. 2, the server node Aa passes the received message to the designated server nodes of other server groups, including the server nodes Ba, Ca, ..., Ja, The designated server nodes then pass the message to other server nodes in the corresponding group, such as the designated server node Ba to pass the message to other server nodes Bb, Bc, ..., Bj of the server group where the server node Ba is located, and Complete the message transfer between server nodes in the blockchain system.
本实施例通过将区块链系统网络中的服务器节点组成环状的网络拓扑结构,并将服务器节点分成若干个服务器分组,每个服务器节点配置了用于分组内服务器节点的消息传递及分组间服务器节点的消息传递的路由表,服务器节点能实现消息的点到点、点到多点的传递,当任一服务器节点接收到消息后,将消息传递至本分组内的其它服务器节点,同时将消 息传递至其它分组的指定服务器节点,由所述指定服务器节点将消息传递至相应分组内的其它服务器节点,从而完成2-3跳的服务器节点间的消息传递或查询功能,有效地提升区块链网络中的服务器集群的各服务器节点间消息传递的效率。In this embodiment, the server nodes in the blockchain system network form a ring-shaped network topology structure, and the server nodes are divided into a plurality of server groups. Each server node is configured for message transmission and inter-group communication between the server nodes in the group. The routing table of the message passing of the server node. The server node can realize the point-to-point and point-to-multipoint transmission of the message. When any server node receives the message, it will pass the message to other server nodes in the group, and meanwhile Messages are sent to designated server nodes in other groups, and the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or querying function between 2-3 hop server nodes, effectively improving the block The efficiency of message passing between server nodes in a server cluster in a chain network.
本发明的一种实施例,所述按照预设规则将服务器节点分成若干个服务器分组,包括:According to an embodiment of the present invention, the dividing a server node into a plurality of server groups according to a preset rule includes:
按照每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000010
将所述服务器节点分成
Figure PCTCN2018097649-appb-000011
个服务器分组;其中,服务器节点的数量为N,
Figure PCTCN2018097649-appb-000012
为正整数。
The number of server nodes grouped by each server is
Figure PCTCN2018097649-appb-000010
Divide the server node into
Figure PCTCN2018097649-appb-000011
Server groups; where the number of server nodes is N,
Figure PCTCN2018097649-appb-000012
Is a positive integer.
为了能减少服务器节点中路由表所需配置的服务器节点的地址信息,减少一个路由表与其它路由表的通信数量,降低网络带宽资源的消耗,本实施例中,在将服务器节点进行分片成相应的服务器分组时,按照每个服务器的服务器节点的数量为
Figure PCTCN2018097649-appb-000013
将服务器节点分成
Figure PCTCN2018097649-appb-000014
个服务器分组,保证由服务器节点组成的环的分片数量与每个服务器分组中的服务器节点的数量相等,从而便于所组成的服务器节点环的动态分片管理,其中,所述服务器节点的数量为N,且所述
Figure PCTCN2018097649-appb-000015
为正整数,如图2中有100个服务器节点,则将该100个服务器节点组成的环分成
Figure PCTCN2018097649-appb-000016
个分片,即10个服务器分组,每个服务器分组中包含了10个服务器节点,此时,每个服务器节点中的组内路由表只需配置包括自身在内的10个服务器节点的地址位置信息。
In order to reduce the address information of the server nodes that need to be configured in the routing table of the server nodes, reduce the amount of communication between a routing table and other routing tables, and reduce the consumption of network bandwidth resources, in this embodiment, the server nodes are fragmented into When the corresponding server is grouped, the number of server nodes for each server is
Figure PCTCN2018097649-appb-000013
Divide server nodes into
Figure PCTCN2018097649-appb-000014
Server groups to ensure that the number of shards in a ring composed of server nodes is equal to the number of server nodes in each server group, thereby facilitating the dynamic shard management of the formed server node ring, where the number of server nodes Is N, and said
Figure PCTCN2018097649-appb-000015
Is a positive integer, as shown in Figure 2, there are 100 server nodes, then the ring formed by the 100 server nodes is divided into
Figure PCTCN2018097649-appb-000016
Shards, that is, 10 server groups, each server group contains 10 server nodes, at this time, the routing table in each server node only needs to configure the address locations of 10 server nodes including itself information.
在上述实施例的基础上,本发明的一种实施例,所述按照每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000017
将所述服务器节点分成
Figure PCTCN2018097649-appb-000018
个服务器分组之后,还包括:
Based on the above embodiment, an embodiment of the present invention, the number of server nodes grouped according to each server is
Figure PCTCN2018097649-appb-000017
Divide the server node into
Figure PCTCN2018097649-appb-000018
After grouping the servers, it also includes:
对分组后的服务器节点进行排序,相邻间隔
Figure PCTCN2018097649-appb-000019
的整数倍的服务器节点互为对等节点。
Sort the grouped server nodes with adjacent intervals
Figure PCTCN2018097649-appb-000019
Server nodes that are integer multiples of each other are peer nodes.
本发明实施例中,环上的服务器节点的角色都是相同的,并且每个应用服务器节点都可以接收区块链系统的消息,或作为一个服务器分组的指定服务器节点,上述实施例中,每一个服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000020
在将服务器节点分组后,对分组后的服务器节点进行排序,具体的,沿着环的统一方向对所述服务器节点进行排序,并且服务器节点的地址位 置信息相隔
Figure PCTCN2018097649-appb-000021
的整数倍的服务器节点互为对等节点,该些节点在每个分组所处的位置是一样的,将图2中服务器节点中消息的传递方式转换一下维度,变换为如图3所示的结构,此时每个服务器分组中处于相同位置的节点为对等节点,如Aa、Ba、Ca、Da互为对等节点,Ab、Bb、Cb、Db亦互为对等节点,且每个服务器分组中包含一个所述指定服务器节点,该指定服务器节点即为服务器分组的片头节点,如Aa、Ba、Ca、Da为当前分组下各服务器分组的片头节点。
In the embodiment of the present invention, the roles of the server nodes on the ring are the same, and each application server node can receive a message from the blockchain system or as a designated server node grouped as a server. In the above embodiment, each The number of server nodes in a server group is
Figure PCTCN2018097649-appb-000020
After the server nodes are grouped, the grouped server nodes are sorted. Specifically, the server nodes are sorted along a unified direction of the ring, and the address and location information of the server nodes are separated.
Figure PCTCN2018097649-appb-000021
Server nodes that are integer multiples of each other are peer nodes. The positions of these nodes in each group are the same. The message delivery method in the server node in Figure 2 is transformed into a dimension and transformed into the one shown in Figure 3. Structure, at this time the nodes in the same position in each server group are peer nodes, such as Aa, Ba, Ca, Da are peer nodes to each other, Ab, Bb, Cb, Db are also peer nodes to each other, and each The server group includes one of the specified server nodes, and the specified server node is a slice node of the server group, such as Aa, Ba, Ca, and Da are slice nodes of each server group under the current group.
本发明的一种实施例,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,以由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:According to an embodiment of the present invention, the message is passed to a designated server node grouped by another server according to an inter-group routing bucket, so that the designated server node passes the message to a server group corresponding to the designated server node. Other server nodes, including:
根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
本实施例中,环上的每个服务器节点的组件路由表配置有与自身的地址位置信息相隔
Figure PCTCN2018097649-appb-000022
的整数倍的其它服务器节点的地址位置信息,该些其他服务器节点互为对等节点,在一个服务器节点接收到消息后,不仅通过组内路由表将消息传递至本服务器分组内与本服务器节点的地址位置相距1至
Figure PCTCN2018097649-appb-000023
的服务器节点,还通过组件路由表将消息传递至与本服务器节点的地址位置相距
Figure PCTCN2018097649-appb-000024
的整数倍的其它服务器分组的指定服务器节点,亦即是与本服务器节点互为对等节点的其它服务器节点,然后由所述对等节点将所述消息传递至相应服务器分组内的其它服务器节点。例如,服务器节点Aa接收到消息后,将消息传递至对等节点Ba、Ca、Da,……,然后由该些对等节点将消息传递至相应分组内的其它服务器节点,如对等节点Ba将消息传递至相应分组内的其它服务器节点Bb、Bc、Bd等,完成区块链系统内服务器节点间的消息传递。
In this embodiment, the component routing table of each server node on the ring is configured to be separated from its own address location information.
Figure PCTCN2018097649-appb-000022
Address location information of other server nodes that are integer multiples of each other. These other server nodes are peer nodes to each other. After a server node receives a message, it not only passes the message to the server group and the server node through the routing table in the group. Address locations 1 to
Figure PCTCN2018097649-appb-000023
Server node of the server node also passes the message to the server node by the component routing table
Figure PCTCN2018097649-appb-000024
A designated server node of another server grouping that is an integer multiple of that, that is, other server nodes that are peer nodes with this server node, and then the peer node passes the message to other server nodes in the corresponding server grouping . For example, after receiving the message, the server node Aa passes the message to the peer nodes Ba, Ca, Da, ..., and then the peer nodes pass the message to other server nodes in the corresponding packet, such as the peer node Ba. Pass the message to other server nodes Bb, Bc, Bd, etc. in the corresponding group to complete the message passing between the server nodes in the blockchain system.
本发明的一种实施例,所述方法还包括:According to an embodiment of the present invention, the method further includes:
获取各服务器节点接收到消息的时间延迟,根据所述时间延迟统计各服务器节点的性能指标。The time delay of receiving the message by each server node is acquired, and the performance index of each server node is calculated according to the time delay.
本实施例中,在每一次发送消息后,获取各服务器节点接收到消息的 时间延迟,然后根据所述时间延迟统计每一个服务器节点的性能指标,若延迟过高,可能该服务器节点的性能存在不足,为了保证区块链系统的正常运行,根据所述性能指标调整相应的服务器节点,以保证区块链系统中消息的高效传递。In this embodiment, after each time a message is sent, the time delay for each server node to receive the message is obtained, and then the performance index of each server node is counted according to the time delay. If the delay is too high, the performance of the server node may exist Inadequate, in order to ensure the normal operation of the blockchain system, the corresponding server nodes are adjusted according to the performance indicators to ensure the efficient transmission of messages in the blockchain system.
在另一种实施例中,如图4所示,本发明从服务器集群的单个服务器节点视角,阐述本发明提供的一种服务器集群中的消息传递方法,该方法应用于服务器集群,所述服务器集群中的服务器节点按照预设规则分成若干个服务器分组,所述方法包括:In another embodiment, as shown in FIG. 4, from the perspective of a single server node of a server cluster, the present invention illustrates a message passing method in a server cluster provided by the present invention. The method is applied to a server cluster. The server nodes in the cluster are divided into several server groups according to a preset rule, and the method includes:
S100:配置本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;S100: Configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
S200:当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;S200: When a message is received, the message is delivered to other server nodes corresponding to the server group corresponding to the server node according to the routing bucket in the group;
S300:根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。S300: Pass the message to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
区块链系统需要大量的运算力资源,搭载了区块链系统的平台都需要大量的服务器进行交易计算、信息传导,本实施例中,将特定数量的服务器节点按照预设规则分成若干个服务器分组,并且,所述服务器节点组成环状的网络拓扑结构,并且服务器节点都配置有一个路由表,所述路由表由2个桶(buckets)构成,包括组内路由桶及组间路由桶,组内路由桶包含从本服务器节点的地址位置距离预设范围的其它服务器节点的地址位置信息;组间路由桶包含从本服务器节点的地址位置距离预设值的整数倍的其它服务器节点的地址位置信息;当服务器节点接收到消息时,根据所述组内路由桶将所述消息传递至该服务器分组的其它服务器节点,环上的每个服务器节点的地位相同,角色也相同,当环上某一个服务器节点接收到消息后需要广播消息(如区块信息)时,该服务器节点会根据组内路由桶中配置的从本服务器节点的地址位置距离预设范围的其它服务器节点的地址位置信息,将所述消息传递至同一分组内的其它服务器节点。如图2中当服务器节点Aa接收到消息时,根据组内路由桶(Intra-group Routing  table)将消息传递至组内的其它服务器节点Ab,Ac,…Aj。在将接收到的消息传递至同一服务器分组内的其它服务器节点的同时,将接收到的消息传递至其它服务器分组的指定服务器节点,然后由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,例如,图2所示中,服务器节点Aa将接收到的消息传递至其它服务器分组的指定服务器节点,包括服务器节点Ba、Ca、……、Ja,然后由该些指定服务器节点将所述消息传递至相应分组内的其它服务器节点,如指定服务器节点Ba将消息传递至服务器节点Ba所在的服务器分组的其它服务器节点Bb、Bc……、Bj,从而完成区块链系统内服务器节点间消息的传递。The blockchain system requires a large amount of computing power. Platforms equipped with the blockchain system require a large number of servers for transaction calculation and information transmission. In this embodiment, a specific number of server nodes are divided into several servers according to preset rules. Grouping, and the server nodes form a ring-shaped network topology, and the server nodes are all configured with a routing table, the routing table is composed of 2 buckets, including intra-group routing buckets and inter-group routing buckets, The routing buckets in the group contain the address location information of other server nodes that are within a preset range from the address location of the server node; the routing buckets in the group contain the addresses of other server nodes that are integer multiples of the preset value from the address location of the server node Location information; when a server node receives a message, it passes the message to other server nodes grouped by the server according to the routing buckets in the group. Each server node on the ring has the same status and the same role. When a server node needs to broadcast a message (such as block information) after receiving the message, the Service node address based on the position information from the other server nodes a preset range from the present location of the address within the set of routing server node tub configured, the server passes the message to other nodes in the same group. As shown in FIG. 2, when the server node Aa receives a message, it transmits the message to other server nodes Ab, Ac,... Aj in the group according to an intra-group routing table. When the received message is passed to other server nodes within the same server group, the received message is passed to a specified server node of the other server group, and then the specified server node passes the message to the specified server The node corresponds to other server nodes of the server group. For example, as shown in FIG. 2, the server node Aa passes the received message to the designated server node of the other server group, including the server nodes Ba, Ca, ..., Ja, and Some designated server nodes pass the message to other server nodes in the corresponding group, such as designated server node Ba to pass the message to other server nodes Bb, Bc ..., Bj of the server group where the server node Ba is located, thereby completing the block Message passing between server nodes in a chain system.
本发明的一种实施例中,每一个所述服务器分组的服务器节点的数量为
Figure PCTCN2018097649-appb-000025
所述服务器节点的数量为N,
Figure PCTCN2018097649-appb-000026
为正整数;相邻间隔
Figure PCTCN2018097649-appb-000027
的整数倍的服务器节点互为对等节点。
In an embodiment of the present invention, the number of server nodes of each of the server groups is
Figure PCTCN2018097649-appb-000025
The number of server nodes is N,
Figure PCTCN2018097649-appb-000026
Is a positive integer; adjacent intervals
Figure PCTCN2018097649-appb-000027
Server nodes that are integer multiples of each other are peer nodes.
本发明的一种实施例中,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:In an embodiment of the present invention, the message is passed to a designated server node grouped by another server according to an inter-group routing bucket, and the designated server node passes the message to a server group corresponding to the designated server node. Other server nodes, including:
根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
在另一种实施例中,如图5所示,本发明提供一种服务器集群中的消息传递装置,应用于区块链系统,所述服务器集群中的服务器节点组成环状的网络拓扑结构,所述服务器节点按照预设规则分成若干个服务器分组,包括:In another embodiment, as shown in FIG. 5, the present invention provides a message passing device in a server cluster, which is applied to a blockchain system. The server nodes in the server cluster form a ring-shaped network topology. The server node is divided into several server groups according to a preset rule, including:
配置模块100:用于配置本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;Configuration module 100: configured to configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
组内消息传递模块200:用于当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;In-group messaging module 200: configured to pass the message to other server nodes corresponding to the server group corresponding to the server node according to the routing bucket in the group when a message is received;
组间消息传递模块300:用于根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至 该指定服务器节点对应服务器分组的其它服务器节点。Inter-group messaging module 300: configured to deliver the message to a designated server node grouped by another server according to the inter-group routing bucket, and the designated server node passes the message to other servers corresponding to the server group of the designated server node node.
在另一种实施例中,本发明提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现上述实施例所述的服务器集群中的消息传递方法。其中,所述计算机可读存储介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,存储设备包括由设备(例如,计算机、手机)以能够读的形式存储或传输信息的任何介质,可以是只读存储器,磁盘或光盘等。In another embodiment, the present invention provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the program is executed by a processor, messages in the server cluster according to the foregoing embodiment are implemented. Delivery method. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory, read-only memory), and RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or Rays card. That is, the storage device includes any medium that stores or transmits information in a readable form by a device (for example, a computer, a mobile phone), and may be a read-only memory, a magnetic disk, or an optical disk.
本发明实施例提供的一种计算机可读存储介质,可实现按照预设规则将服务器节点分成若干个服务器分组,所述服务器节点组成环状的网络拓扑结构,所述服务器节点配置有路由表,所述路由表包括组内路由桶及组间路由桶;当服务器分组中的服务器节点接收到消息时,根据组内路由桶将所述消息传递至该服务器分组的其它服务器节点;以及根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。通过将区块链系统网络中的服务器节点组成环状的网络拓扑结构,并将服务器节点分成若干个服务器分组,每个服务器节点配置了用于分组内服务器节点的消息传递及分组间服务器节点的消息传递的路由表,服务器节点能实现消息的点到点、点到多点的传递,当任一服务器节点接收到消息后,将消息传递至本分组内的其它服务器节点,同时将消息传递至其它分组的指定服务器节点,由所述指定服务器节点将消息传递至相应分组内的其它服务器节点,从而完成2-3跳的服务器节点间的消息传递或查询功能,有效地提升区块链网络中的服务器集群的各服务器节点间消息传递的效率。A computer-readable storage medium provided by an embodiment of the present invention can be implemented to divide a server node into several server groups according to a preset rule, the server nodes form a ring-shaped network topology, and the server node is configured with a routing table. The routing table includes intra-group routing buckets and inter-group routing buckets; when a server node in a server group receives a message, the message is delivered to other server nodes in the server group according to the intra-group routing bucket; and The routing bucket passes the message to a designated server node of another server group, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node. By grouping the server nodes in the blockchain system network into a ring-shaped network topology, and dividing the server nodes into several server groups, each server node is configured for the messaging of the server nodes within the group and the server nodes between the groups. Message routing table. Server nodes can implement point-to-point and point-to-multipoint delivery of messages. When any server node receives a message, it passes the message to other server nodes in the group, and at the same time passes the message to Designated server nodes of other groups, the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hop server nodes, effectively improving the blockchain network The efficiency of message passing between the server nodes of a server cluster.
本发明实施例提供的计算机可读存储介质可以实现上述服务器集群 中的消息传递方法的实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The computer-readable storage medium provided by the embodiment of the present invention can implement the foregoing embodiment of the message passing method in the server cluster. For specific function implementation, refer to the description in the method embodiment, and details are not described herein again.
此外,在又一种实施例中,本发明还提供一种区块链系统,如图6所示,所述区块链系统包括Ring 0和Ring 1两个由服务器节点组成的环状的网络拓扑结构,环上的每一个点(Unity)表示服务器节点,多个服务器节点(Unity)组成一个服务器分组(Group),处于每一个服务器分组(Group)的相同位置的服务器节点互为对等节点(Counterpart)。由如图7所示的服务器作为图6中区块链系统中的服务器节点,完成上述服务器集群中的消息传递方法,所述服务器包括处理器703、存储器705等器件。本领域技术人员可以理解,图7示出的结构器件并不构成对所有服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件。存储器705可用于存储计算机程序701以及各功能模块,处理器703运行存储在存储器705的计算机程序701,从而执行设备的各种功能应用以及数据处理。存储器705可以是内存储器或外存储器,或者包括内存储器和外存储器两者。内存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)、快闪存储器、或者随机存储器。外存储器可以包括硬盘、软盘、ZIP盘、U盘、磁带等。本发明所公开的存储器包括但不限于这些类型的存储器。本发明所公开的存储器705只作为例子而非作为限定。图7中所示的一个或多个处理器703能够执行、实现图5中所示的配置模块100、组内消息传递模块200、组间消息传递模块300的功能。In addition, in another embodiment, the present invention also provides a blockchain system. As shown in FIG. 6, the blockchain system includes Ring 0 and Ring 1 which are ring networks composed of server nodes. Topology structure, each point (Unity) on the ring represents a server node, multiple server nodes (Unity) form a server group (Group), server nodes in the same position of each server group (Group) are peer nodes to each other (Counterpart). The server shown in FIG. 7 is used as the server node in the blockchain system in FIG. 6 to complete the message passing method in the server cluster. The server includes a processor 703, a memory 705, and other devices. Those skilled in the art can understand that the structural device shown in FIG. 7 does not constitute a limitation on all servers, and may include more or fewer components than shown in the figure, or combine some components. The memory 705 may be configured to store a computer program 701 and various functional modules, and the processor 703 runs the computer program 701 stored in the memory 705 to execute various functional applications and data processing of the device. The memory 705 may be an internal memory or an external memory, or include both an internal memory and an external memory. The internal memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. External storage may include hard disks, floppy disks, ZIP disks, U disks, magnetic tapes, and so on. The memory disclosed by the present invention includes, but is not limited to, these types of memory. The memory 705 disclosed in the present invention is only an example and not a limitation. One or more processors 703 shown in FIG. 7 can execute and implement the functions of the configuration module 100, the intra-group messaging module 200, and the inter-group messaging module 300 shown in FIG. 5.
在一种实施方式中,所述服务器包括一个或多个处理器703,以及一个或多个存储器705,一个或多个计算机程序701,其中所述一个或多个计算机程序701被存储在存储器705中并被配置为由所述一个或多个处理器703执行,所述一个或多个计算机程序701配置用于执行以上实施例所述的服务器集群中的消息传递方法。In one embodiment, the server includes one or more processors 703, and one or more memories 705, one or more computer programs 701, wherein the one or more computer programs 701 are stored in the memory 705 And is configured to be executed by the one or more processors 703, and the one or more computer programs 701 are configured to execute the message passing method in the server cluster described in the above embodiments.
本发明实施例提供的一种区块链系统,可实现按照预设规则将服务器节点分成若干个服务器分组,所述服务器节点组成环状的网络拓扑结构,所述服务器节点配置有路由表,所述路由表包括组内路由桶及组间路由桶; 当服务器分组中的服务器节点接收到消息时,根据组内路由桶将所述消息传递至该服务器分组的其它服务器节点;以及根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。通过将区块链系统网络中的服务器节点组成环状的网络拓扑结构,并将服务器节点分成若干个服务器分组,每个服务器节点配置了用于分组内服务器节点的消息传递及分组间服务器节点的消息传递的路由表,服务器节点能实现消息的点到点、点到多点的传递,当任一服务器节点接收到消息后,将消息传递至本分组内的其它服务器节点,同时将消息传递至其它分组的指定服务器节点,由所述指定服务器节点将消息传递至相应分组内的其它服务器节点,从而完成2-3跳的服务器节点间的消息传递或查询功能,有效地提升区块链网络中的服务器集群的各服务器节点间消息传递的效率。A blockchain system provided by an embodiment of the present invention can realize the division of server nodes into several server groups according to preset rules. The server nodes form a ring-shaped network topology. The server nodes are configured with routing tables. The routing table includes intra-group routing buckets and inter-group routing buckets; when a server node in a server group receives a message, the message is delivered to other server nodes in the server group according to the intra-group routing bucket; and according to the inter-group routing The bucket passes the message to a designated server node of another server group, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node. By grouping the server nodes in the blockchain system network into a ring-shaped network topology, and dividing the server nodes into several server groups, each server node is configured for the messaging of the server nodes within the group and the server nodes between the groups. Message routing table. Server nodes can implement point-to-point and point-to-multipoint delivery of messages. When any server node receives a message, it passes the message to other server nodes in the group, and at the same time passes the message to Designated server nodes of other groups, the designated server nodes pass messages to other server nodes in the corresponding group, thereby completing the message passing or query function between 2-3 hop server nodes, effectively improving the blockchain network The efficiency of message passing between the server nodes of a server cluster.
本发明实施例提供的区块链系统可以实现上述提供的服务器集群中的消息传递方法的实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The blockchain system provided by the embodiment of the present invention can implement the embodiment of the message passing method in the server cluster provided above. For specific function implementation, refer to the description in the method embodiment, and details are not described herein again.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above description is only part of the embodiments of the present invention. It should be noted that, for those of ordinary skill in the art, without departing from the principles of the present invention, several improvements and retouches can be made. These improvements and retouches also It should be regarded as the protection scope of the present invention.

Claims (10)

  1. 一种服务器集群中的消息传递方法,其特征在于,包括:A message passing method in a server cluster is characterized in that it includes:
    按照预设规则将服务器节点分成若干个服务器分组,所述服务器节点组成环状的网络拓扑结构,所述服务器节点配置有路由表,所述路由表包括组内路由桶及组间路由桶;The server node is divided into several server groups according to a preset rule, the server nodes form a ring-shaped network topology, the server node is configured with a routing table, and the routing table includes intra-group routing buckets and inter-group routing buckets;
    当服务器分组中的服务器节点接收到消息时,根据组内路由桶将所述消息传递至该服务器分组的其它服务器节点;以及When a server node in a server group receives a message, it passes the message to other server nodes in the server group according to the routing bucket in the group; and
    根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。The message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  2. 根据权利要求1所述的方法,其特征在于,所述按照预设规则将服务器节点分成若干个服务器分组,包括:The method according to claim 1, wherein the dividing the server node into a plurality of server groups according to a preset rule comprises:
    按照每一个服务器分组的服务器节点的数量为
    Figure PCTCN2018097649-appb-100001
    将所述服务器节点分成
    Figure PCTCN2018097649-appb-100002
    个服务器分组;其中,服务器节点的数量为N,
    Figure PCTCN2018097649-appb-100003
    为正整数。
    The number of server nodes grouped by each server is
    Figure PCTCN2018097649-appb-100001
    Divide the server node into
    Figure PCTCN2018097649-appb-100002
    Server groups; where the number of server nodes is N,
    Figure PCTCN2018097649-appb-100003
    Is a positive integer.
  3. 根据权利要求2所述的方法,其特征在于,所述按照每一个服务器分组的服务器节点的数量为
    Figure PCTCN2018097649-appb-100004
    将所述服务器节点分成
    Figure PCTCN2018097649-appb-100005
    个服务器分组之后,还包括:
    The method according to claim 2, wherein the number of server nodes grouped according to each server is
    Figure PCTCN2018097649-appb-100004
    Divide the server node into
    Figure PCTCN2018097649-appb-100005
    After grouping the servers, it also includes:
    对分组后的服务器节点进行排序,相邻间隔
    Figure PCTCN2018097649-appb-100006
    的整数倍的服务器节点互为对等节点。
    Sort the grouped server nodes with adjacent intervals
    Figure PCTCN2018097649-appb-100006
    Server nodes that are integer multiples of each other are peer nodes.
  4. 根据权利要求3所述的方法,其特征在于,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:The method according to claim 3, wherein the message is passed to a designated server node grouped by another server according to an inter-group routing bucket, and the designated server node passes the message to the designated server node Other server nodes corresponding to the server group, including:
    根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    获取各服务器节点接收到消息的时间延迟,根据所述时间延迟统计各 服务器节点的性能指标。A time delay of receiving a message by each server node is acquired, and performance indicators of each server node are calculated according to the time delay.
  6. 一种服务器集群中的消息传递方法,应用于区块链系统,所述服务器集群中的服务器节点组成环状的网络拓扑结构,所述服务器节点按照预设规则分成若干个服务器分组,其特征在于,所述方法包括:A message passing method in a server cluster is applied to a blockchain system. The server nodes in the server cluster form a ring-shaped network topology. The server nodes are divided into several server groups according to preset rules. The method includes:
    配置本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;Configure a routing table of the server node, where the routing table includes intra-group routing buckets and inter-group routing buckets;
    当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;以及,When a message is received, the message is delivered to other server nodes corresponding to the server group of the server node according to the routing bucket in the group; and,
    根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。The message is delivered to a designated server node of another server group according to the inter-group routing bucket, and the designated server node passes the message to other server nodes corresponding to the server group of the designated server node.
  7. 根据权利要求6所述的方法,其特征在于,每一个所述服务器分组的服务器节点的数量为
    Figure PCTCN2018097649-appb-100007
    所述服务器节点的数量为N,
    Figure PCTCN2018097649-appb-100008
    为正整数;相邻间隔
    Figure PCTCN2018097649-appb-100009
    的整数倍的服务器节点互为对等节点。
    The method according to claim 6, wherein the number of server nodes of each of the server groups is
    Figure PCTCN2018097649-appb-100007
    The number of server nodes is N,
    Figure PCTCN2018097649-appb-100008
    Is a positive integer; adjacent intervals
    Figure PCTCN2018097649-appb-100009
    Server nodes that are integer multiples of each other are peer nodes.
  8. 根据权利要求7所述的方法,其特征在于,所述根据组间路由桶将所述消息传递至其它服务器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点,包括:The method according to claim 7, wherein the message is passed to a designated server node grouped by another server according to the inter-group routing bucket, and the designated server node passes the message to the designated server node Other server nodes corresponding to the server group, including:
    根据组间路由桶将所述消息传递至其它服务器分组的对等节点,由所述对等节点将所述消息传递至该对等节点对应服务器分组的其它服务器节点。The message is passed to a peer node of another server group according to the inter-group routing bucket, and the peer node passes the message to other server nodes corresponding to the server group of the peer node.
  9. 一种服务器集群中的消息传递装置,应用于区块链系统,所述服务器集群中的服务器节点组成环状的网络拓扑结构,所述服务器节点按照预设规则分成若干个服务器分组,其特征在于,包括:A message passing device in a server cluster is applied to a blockchain system. The server nodes in the server cluster form a ring-shaped network topology. The server nodes are divided into several server groups according to preset rules. ,include:
    配置模块:用于本服务器节点的路由表,所述路由表包括组内路由桶及组间路由桶;Configuration module: a routing table for the server node, the routing table includes intra-group routing buckets and inter-group routing buckets;
    组内消息传递模块:用于当接收到消息时,根据组内路由桶将所述消息传递至本服务器节点对应服务器分组的其它服务器节点;In-group messaging module: for receiving a message, the message is delivered to other server nodes corresponding to the server group corresponding to the server node according to the routing bucket in the group;
    组间消息传递模块:用于根据组间路由桶将所述消息传递至其它服务 器分组的指定服务器节点,由所述指定服务器节点将所述消息传递至该指定服务器节点对应服务器分组的其它服务器节点。Inter-group messaging module: used to pass the message to a specified server node grouped by other servers according to the inter-group routing bucket, and the specified server node passes the message to other server nodes corresponding to the server group of the specified server node .
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至5任一项所述的服务器集群中的消息传递方法;或,该计算机程序被处理器执行时实现权利要求6至8任一项所述的服务器集群中的消息传递方法。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements messages in a server cluster according to any one of claims 1 to 5. A delivery method; or, when the computer program is executed by a processor, the message delivery method in a server cluster according to any one of claims 6 to 8 is implemented.
PCT/CN2018/097649 2018-07-27 2018-07-27 Method for delivering message in server cluster, device, and storage medium. WO2020019342A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/097649 WO2020019342A1 (en) 2018-07-27 2018-07-27 Method for delivering message in server cluster, device, and storage medium.
CN201880002395.5A CN109792406B (en) 2018-07-27 2018-07-27 Message transmission method, device and storage medium in server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097649 WO2020019342A1 (en) 2018-07-27 2018-07-27 Method for delivering message in server cluster, device, and storage medium.

Publications (1)

Publication Number Publication Date
WO2020019342A1 true WO2020019342A1 (en) 2020-01-30

Family

ID=66499476

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097649 WO2020019342A1 (en) 2018-07-27 2018-07-27 Method for delivering message in server cluster, device, and storage medium.

Country Status (2)

Country Link
CN (1) CN109792406B (en)
WO (1) WO2020019342A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110581880B (en) * 2019-05-29 2021-09-07 阿里巴巴集团控股有限公司 Method and device for establishing communication link, method and device for determining node identification
CN111401868B (en) * 2020-03-19 2022-07-01 南开大学 Minimum-cost block chain down-link transaction routing algorithm
CN113556286B (en) * 2021-05-31 2022-07-29 北京邮电大学 Communication method and system of peer-to-peer network
CN113596746B (en) * 2021-07-22 2022-11-04 北京金山云网络技术有限公司 Cluster message processing method and device, electronic equipment and medium
CN117155928B (en) * 2023-10-31 2024-02-09 浪潮电子信息产业股份有限公司 Communication task processing method, system, equipment, cluster and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752146A (en) * 2012-07-13 2012-10-24 中国科学院微电子研究所 Cluster topological graph generation method and server
WO2015120191A1 (en) * 2014-02-07 2015-08-13 Cassidian Communications, Inc. Emergency services routing proxy cluster management
CN106559332A (en) * 2016-11-03 2017-04-05 Tcl集团股份有限公司 A kind of method and system of fast assembling full-mesh server cluster
CN107231399A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 The expansion method and device of High Availabitity server cluster
CN107295080A (en) * 2017-06-19 2017-10-24 北京百度网讯科技有限公司 Date storage method and server applied to distributed server cluster
US20170366604A1 (en) * 2016-06-21 2017-12-21 Facebook, Inc. Load balancing back-end application services utilizing derivative-based cluster metrics

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2922758T3 (en) * 2011-11-28 2022-09-20 Alcatel Lucent Support of user plane transactions over a mobile network
CN103475566A (en) * 2013-07-10 2013-12-25 北京发发时代信息技术有限公司 Real-time message exchange platform and distributed cluster establishment method
CN103825837B (en) * 2014-02-19 2017-06-06 上海视云网络科技有限公司 A kind of method of the Distributed C DN overall schedulings of node load
US10725896B2 (en) * 2016-07-15 2020-07-28 Intuit Inc. System and method for identifying a subset of total historical users of a document preparation system to represent a full set of test scenarios based on code coverage
CN106407011B (en) * 2016-09-20 2019-05-10 焦点科技股份有限公司 A kind of method and system of the search system cluster service management based on routing table

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752146A (en) * 2012-07-13 2012-10-24 中国科学院微电子研究所 Cluster topological graph generation method and server
WO2015120191A1 (en) * 2014-02-07 2015-08-13 Cassidian Communications, Inc. Emergency services routing proxy cluster management
CN107231399A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 The expansion method and device of High Availabitity server cluster
US20170366604A1 (en) * 2016-06-21 2017-12-21 Facebook, Inc. Load balancing back-end application services utilizing derivative-based cluster metrics
CN106559332A (en) * 2016-11-03 2017-04-05 Tcl集团股份有限公司 A kind of method and system of fast assembling full-mesh server cluster
CN107295080A (en) * 2017-06-19 2017-10-24 北京百度网讯科技有限公司 Date storage method and server applied to distributed server cluster

Also Published As

Publication number Publication date
CN109792406A (en) 2019-05-21
CN109792406B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2020019342A1 (en) Method for delivering message in server cluster, device, and storage medium.
Li et al. ESM: Efficient and scalable data center multicast routing
Yang et al. An efficient hybrid peer-to-peer system for distributed data sharing
US20170063613A1 (en) Aggregation protocol
JP2023071805A (en) Method of high-speed transmission in block chain network and special network node
CN109146677B (en) Method, computer system and readable storage medium for parallel building of block chain views
US11502956B2 (en) Method for content caching in information-centric network virtualization
CN112817752A (en) Distributed database dynamic load balancing method
CN114745140B (en) Urban planning field block chain consensus verification method and system based on aggregation encryption
Ranjan et al. Decentralised resource discovery service for large scale federated grids
WO2020019343A1 (en) Message transmission method and apparatus in blockchain system, and storage medium
Guclu et al. Limited scale-free overlay topologies for unstructured peer-to-peer networks
Guo Aggregating uncertain incast transfers in BCube-like data centers
Aguilar et al. A hamming distance and fuzzy logic-based algorithm for P2P content distribution in enterprise networks
Guclu et al. Scale-free overlay topologies with hard cutoffs for unstructured peer-to-peer networks
Fan et al. Distributed and dynamic multicast scheduling in fat-tree data center networks
Kumari et al. Ad-hoc limited scale-free models for unstructured peer-to-peer networks
Li et al. Cache networks of counting queues
Chen et al. Topology and mapping co-design for complex communication systems on wireless NoC platforms
Zhang et al. Analysis of the communication traffic model for permissioned blockchain based on proof-of-work
Patil et al. Resource allocation using multiple edge-sharing multicast trees
Ya et al. Multipath load-balancing routing mechanism in data center network
Alrfaay et al. R-sor: Ranked social-based routing protocol in opportunistic mobile social networks
Carzaniga et al. Understanding content-based routing schemes
CN114339941B (en) Opportunistic network routing method based on cluster division

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18927744

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18927744

Country of ref document: EP

Kind code of ref document: A1