A message transmission method, applied to a first relay node in a blockchain relay communication network, wherein blockchain nodes of a blockchain network are configured to communicate with each other by using relay nodes of the blockchain relay communication network, the method comprising: registering each blockchain node of a plurality of blockchain nodes in the blockchain network to a blockchain node set indicated in a registration request submitted by the each blockchain node, to respectively generate a routing policy corresponding to the each blockchain node, the routing policy comprising the blockchain node set to which the each blockchain node belongs and a relay node in the blockchain relay communication network to which the each blockchain node is connected; receiving a blockchain message sent for a target blockchain node in a target blockchain node set; determining a target relay node connected to the target blockchain node in the blockchain relay communication network according to a tree-structured routing table, wherein the tree-structured routing table is formed based on a hierarchical relationship between blockchain node sets and obtained by organizing routing policies in a tree structure, wherein the routing policies correspond to paths from a root node to leaf nodes in the tree structure respectively, a leaf node in each path represents a blockchain node corresponding to a corresponding routing policy of the routing policies, a value of the leaf node is information about a relay node connected to the corresponding blockchain node, and a non-leaf node represents a blockchain node set comprised in a path corresponding to the corresponding routing policy; and transmitting the blockchain message to the target blockchain node by using the target relay node. registering each blockchain node of a plurality of blockchain nodes in the blockchain network to a blockchain node set indicated in a registration request submitted by the each blockchain node, to respectively generate a routing policy corresponding to the each blockchain node, the routing policy comprising the blockchain node set to which the each blockchain node belongs and a relay node in the blockchain relay communication network to which the each blockchain node is connected; receiving a blockchain message sent for a target blockchain node in a target blockchain node set; determining a target relay node connected to the target blockchain node in the blockchain relay communication network according to a tree-structured routing table, wherein the tree-structured routing table is formed based on a hierarchical relationship between blockchain node sets and obtained by organizing routing policies in a tree structure, wherein the routing policies correspond to paths from a root node to leaf nodes in the tree structure respectively, a leaf node in each path represents a blockchain node corresponding to a corresponding routing policy of the routing policies, a value of the leaf node is information about a relay node connected to the corresponding blockchain node, and a non-leaf node represents a blockchain node set comprised in a path corresponding to the corresponding routing policy; and transmitting the blockchain message to the target blockchain node by using the target relay node. <EOS>