WO2021249490A1 - 区块链网络中的通信方法、业务数据传输方法 - Google Patents

区块链网络中的通信方法、业务数据传输方法 Download PDF

Info

Publication number
WO2021249490A1
WO2021249490A1 PCT/CN2021/099424 CN2021099424W WO2021249490A1 WO 2021249490 A1 WO2021249490 A1 WO 2021249490A1 CN 2021099424 W CN2021099424 W CN 2021099424W WO 2021249490 A1 WO2021249490 A1 WO 2021249490A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
blockchain
node
nodes
relay
Prior art date
Application number
PCT/CN2021/099424
Other languages
English (en)
French (fr)
Inventor
曾超
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021249490A1 publication Critical patent/WO2021249490A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the present disclosure relates to the field of communication, in particular to communication methods and business data transmission methods in a blockchain network.
  • P2P networks Due to the randomness of the distribution of nodes in a P2P (Peer to Peer) network, P2P networks have problems such as poor quality of service (QoS) in some communication links and the quality of service of the communication links. .
  • QoS quality of service
  • the above-mentioned problems of P2P networks can be solved to a certain extent.
  • the same piece of data needs to be replicated and transmitted in the relay network, it causes a waste of network bandwidth and machine resources, and affects the network processing capabilities of nodes to a certain extent.
  • One of the embodiments of the present disclosure provides a communication method in a blockchain network, wherein the blockchain network includes a P2P network with a communication connection and a relay network, and the method is determined by one of the P2P networks.
  • the method is executed by a blockchain node, and the method includes: for any other blockchain node in the P2P network: sending at least one first detection message to the other blockchain node through the P2P network, and receiving the At least one first response message returned by other blockchain nodes through the P2P network, and the at least one first response message corresponds to the at least one first detection message one-to-one; according to the value of the at least one first detection message
  • the sending time and the receiving time of the at least one first response message are used to determine the first quality of service data of the P2P network communication link between the certain blockchain node and the other blockchain nodes;
  • the relay network sends at least one second detection message to the other blockchain nodes, and receives at least one second response message returned by the other blockchain nodes through the relay network
  • the blockchain network includes a P2P network with a communication connection and a relay network, and the communication system is in a certain blockchain in the P2P network.
  • the communication system includes a first quality of service data acquisition module, a second quality of service data acquisition module, a quality of service data comparison module, and a link optimization information recording module; for any other block in the P2P network Chain node: the first quality of service data obtaining module is used to: send at least one first detection message to the other blockchain nodes through the P2P network, and receive the other blockchain nodes to return through the P2P network
  • the at least one first response message of the at least one first detection message is determined according to the sending time of the at least one first probe message and the receiving time of the at least one first response message
  • One of the embodiments of the present disclosure provides a communication device in a blockchain network, which includes a processor and a storage device.
  • the storage device is used to store instructions.
  • the processor executes the instructions, it can implement any The communication method described in the embodiment.
  • One of the embodiments of the present disclosure provides a method for transmitting service data in a blockchain network, wherein the blockchain network includes a P2P network with a communication connection and a relay network; the method is determined by the P2P network
  • the execution of a certain blockchain node includes: obtaining the business data to be transmitted; determining the destination blockchain node of the business data; querying the chain from the certain blockchain node to the destination blockchain node Path optimization information, the link optimization information indicates that service data is transmitted from the certain blockchain node to the destination blockchain node through one of the P2P network and the relay network; One of the P2P network and the relay network transmits the service data to the destination blockchain node.
  • the blockchain network includes a P2P network with communication connections and a relay network; the service data transmission system is in the P2P network It is implemented on a certain block chain node of, which includes: a first business data obtaining module, used to obtain the business data to be transmitted; a target block chain node determining module, used to determine the target block chain node of the business data ; Link optimization information query module, used to query the link optimization information corresponding to the certain block chain node to the destination block chain node, the link optimization information indicates that the P2P network and the relay
  • One of the networks transmits service data from the certain block chain node to the destination block chain node; the first selection module is used to select one of the P2P network and the relay network according to the query result The service data is transmitted to the destination blockchain node.
  • One of the embodiments of the present disclosure provides a business data transmission device in a blockchain network, which includes a processor and a storage device.
  • the storage device is used to store instructions.
  • the processor executes the instructions, the The service data transmission method executed by a blockchain node according to any one of the embodiments.
  • the blockchain network includes a P2P network with communication connections and a relay network; the method is determined by a certain one of the relay network Executed by a relay node, the relay node is directly connected to at least two blockchain nodes in the P2P network; the method includes: obtaining a certain blockchain node from the at least two blockchain nodes Broadcast business data; obtain the link optimization information reported by the certain blockchain node; the link optimization information indicates that the business data is transferred from the certain area through one of the P2P network and the relay network
  • the block chain node transmits to other block chain nodes among the at least two block chain nodes; and selects whether to transfer to the at least two block chain nodes according to the link optimization information reported by the certain block chain node
  • the other blockchain nodes in the network send the business data.
  • the blockchain network includes a P2P network with communication connections and a relay network; the service data transmission system is in the relay network The relay node is directly connected to at least two blockchain nodes in the P2P network; the service data transmission system includes: a second service data obtaining module for obtaining data from The business data broadcasted by a certain block chain node among the at least two block chain nodes; a link optimization information obtaining module for obtaining link optimization information reported by the certain block chain node; the link The optimization information indicates that service data is transmitted from the certain blockchain node to the other blockchain nodes of the at least two blockchain nodes through one of the P2P network and the relay network; the second option The module is used to select whether to send the service data to other blockchain nodes among the at least two blockchain nodes according to the link optimization information reported by the certain blockchain node.
  • One of the embodiments of the present disclosure provides a business data transmission device in a blockchain network, which includes a processor and a storage device.
  • the storage device is used to store instructions.
  • the processor executes the instructions, the The service data transmission method executed by the relay node described in any embodiment.
  • Figure 1 is a topology diagram of a blockchain network according to some embodiments of the present disclosure
  • FIG. 2 is a schematic diagram of establishing a P2P direct connection between auxiliary blockchain nodes according to some embodiments of the present disclosure
  • Fig. 3 is an exemplary flowchart of a communication method in a blockchain network according to some embodiments of the present disclosure
  • Fig. 4 is a schematic diagram of a unicast manner of service data according to some embodiments of the present disclosure
  • Fig. 5 is a schematic diagram of a broadcasting manner of service data according to some embodiments of the present disclosure.
  • Fig. 6 is a block diagram of a communication system in a blockchain network according to some embodiments of the present disclosure.
  • Fig. 7 is a block diagram of a business data transmission system in a blockchain network according to some embodiments of the present disclosure.
  • Fig. 8 is a block diagram of a business data transmission system in a blockchain network according to some embodiments of the present disclosure.
  • system is a method for distinguishing different components, elements, parts, parts, or assemblies of different levels.
  • the words can be replaced by other expressions.
  • a flowchart is used in the present disclosure to illustrate the operations performed by the system according to an embodiment of the present disclosure. It should be understood that the preceding or following operations are not necessarily performed exactly in order. Instead, the steps can be processed in reverse order or at the same time. At the same time, you can also add other operations to these processes, or remove a step or several operations from these processes.
  • Fig. 1 is a topology diagram of a blockchain network according to some embodiments of the present disclosure.
  • the blockchain network may include a P2P network with communication connections and a relay network.
  • P2P stands for peer-to-peer, also known as peer-to-peer technology. It is an Internet system without a central server and relying on peers to exchange information. Different from a central network system with a central server, each user end of a peer-to-peer network is not only a node, but also has the function of a server. The central server means that when the central server is down, the entire network and services will have problems when it is under attack. The advantage of the P2P network is that each node is both a client and a server, so when it is attacked, any machine crashes without affecting the overall service.
  • the core of the blockchain is decentralization, which is consistent with the concept of the P2P network. Therefore, the blockchain network generally uses P2P as the underlying implementation, including most public chains and alliance chains that use similar underlying implementations.
  • the underlying P2P network can include one or more P2P nodes.
  • P2P node is generally also a node in the blockchain network, such as nodes A, B,... , G, H.
  • the relay network may include one or more relay nodes, such as relay1, relay2, relay3, and relay4 as shown in FIG. 1.
  • direct connection in the present disclosure means that there is no other node connection between two nodes, in other words, between two nodes that are connected but not directly connected (ie, indirectly connected) There are other nodes connected between.
  • node A is directly connected to nodes C and D
  • nodes A, B, and C are directly connected to relay1
  • node A is indirectly connected to nodes B, E, F, G, and H, respectively.
  • the one-way arrow pointing from the blockchain node to the relay node indicates that the communication connection between the blockchain node and the relay node can be initiated by the blockchain node. It should be understood that bidirectional communication is possible between blockchain nodes and relay nodes.
  • the relay network has fast transfer capability and is relatively stable, which can make up for the poor service quality of the P2P network in some cases.
  • the network service quality can be measured based on the quality of service (QoS) elements such as the transmission delay of the message. Take transmission delay as an example. For example, if node A wants to send a message to node E, the time delay between sending a message from node A to node E receiving the message is smaller, or sending a message from node A to node A receiving feedback from node E The smaller the delay of the message, the better the quality of service of the link that transmits the message.
  • QoS quality of service
  • the blockchain node can transmit the same service data through the links in the P2P network and the relay network respectively.
  • the target blockchain node of the service data may regard the first received service data as The valid data is retained, and the service data received later is discarded as invalid data.
  • repeated data transmission and reception causes a waste of network bandwidth and machine resources, and also affects the network processing capabilities of nodes to a certain extent.
  • business data may include one or more of transaction records (transactions for short), request messages, and response messages.
  • the embodiments of the present disclosure assist in establishing P2P direct connections between blockchain nodes, recording link optimization information, and selecting better links based on link optimization information, etc., not only to ensure low-latency transmission of business data , It can also effectively reduce repeated data sending and receiving (transmission), which can save network bandwidth and machine resources and reduce the impact on node network processing capabilities.
  • FIG. 2 is a schematic diagram of establishing a P2P direct connection between auxiliary blockchain nodes according to some embodiments of the present disclosure.
  • Fig. 2 is a schematic diagram of establishing a P2P direct connection between auxiliary blockchain nodes according to some embodiments of the present disclosure.
  • FIG. 2 For the parts in FIG. 2 that are the same as those in FIG. 1, reference may be made to FIG. 1 and related descriptions.
  • relay nodes directly connected to these blockchain nodes can assist these nodes in establishing private use
  • the P2P subnet connection of the network address (or called the intranet address) may be called the P2P intranet connection).
  • these blockchain nodes may communicate through the P2P network to obtain better network service quality (for example, low latency, large bandwidth).
  • the relay node can obtain the public network address of the blockchain node.
  • the relay node directly connected to the at least two blockchain nodes can obtain the external network addresses of the at least two blockchain nodes, and determine whether the external network addresses of the at least two blockchain nodes are the same.
  • the relay node can query the at least two blockchain nodes for their respective internal networks And send the intranet addresses of other blockchain nodes to at least one of the at least two blockchain nodes, so that the at least two blockchain nodes establish a P2P direct connection based on the intranet addresses.
  • relay1 can obtain the extranet of nodes A, B, and C Address.
  • relay1 finds that the external network addresses of nodes A, B, and C are the same, it can query one or more of the nodes A, B, and C for its internal network address, and ask one of the nodes A, B, and C or Multiple (may be each one) send the intranet addresses of the remaining blockchain nodes.
  • relay1 can send the intranet addresses of nodes B and C to node A, so that node A initiates a P2P direct connection to nodes B and C based on the intranet addresses of nodes B and C.
  • relay1 can send the intranet addresses of node A to nodes B and C respectively, so that nodes B and C respectively initiate a P2P direct connection to node A based on the intranet addresses of node A.
  • relay1 After assisting nodes A, B, and C to establish a P2P subnet connection, if relay1 finds that the newly connected blockchain node has the same external network address as nodes A, B, and C, then relay1 can use the previously queried node
  • the intranet addresses of A, B, and C are all sent to the newly connected blockchain nodes, so that the newly connected blockchain nodes initiate P2P to nodes A, B, and C based on the intranet addresses of nodes A, B, and C, respectively Direct connection.
  • relay1 initiates a request to query its internal network address to the newly connected blockchain node, and sends the internal network address of the newly connected blockchain node to nodes A, B, and C, so that nodes A, B , C respectively initiate a P2P direct connection to the newly connected blockchain node based on the intranet address of the newly connected blockchain node.
  • relay nodes directly connected to these blockchain nodes can assist these nodes in establishing P2P subnet connections based on external network addresses. Because these blockchain nodes are geographically close, communicating through the P2P network after establishing a P2P direct connection with each other may obtain better network service quality (for example, low latency, large bandwidth).
  • a relay node directly connected to the at least two blockchain nodes can obtain the external network addresses of the at least two blockchain nodes, based on the at least two blockchain nodes.
  • the external network addresses of each blockchain node determine the geographic location information of the at least two blockchain nodes.
  • the relay node may determine whether the geographic locations of the at least two blockchain nodes are close according to the geographic location information of the at least two blockchain nodes, and if they are close, assist the at least two blockchain nodes Establish a P2P subnet connection.
  • the manner of assisting the at least two blockchain nodes to establish a P2P connection may include: sending at least one of the at least two blockchain nodes the external network address of the other blockchain node, so that the at least two blockchain nodes A blockchain node establishes a P2P direct connection based on the address of the external network.
  • the geographic location information may include geographic coordinates (such as latitude and longitude). When the relay node finds that the distance between any two of the any two blockchain nodes (which can be calculated based on the coordinates) is less than a distance threshold, It can be considered that the two are geographically close.
  • the geographic location information may include place names (such as city names) in the physical world. When any two blockchain nodes are found to be located in the same city, the geographic locations of the two can also be considered close.
  • relay4 can obtain the external network addresses of nodes E, H, and G.
  • relay4 finds the addresses of nodes E and H, nodes H and G, and nodes G and E When the distance is less than the distance threshold, or it is found that the nodes E and H, the nodes H and G, and the nodes G and E belong to the same city respectively, relay4 can send the external network address of the node H (or E) to the node E (or H).
  • Node H (or G) sends the external network address of node G (or H), and sends the external network address of node E (or G) to node G (or E), so that nodes E and H, nodes H and G, Nodes G and E respectively establish P2P direct connections based on external network addresses.
  • the network address mentioned in this disclosure may be an IP address.
  • the relay node may query the geographic location information corresponding to the IP address in the IP geographic information database, and the geographic location information corresponding to each IP address is stored in the IP geographic information database.
  • the blockchain nodes that the relay node assists in establishing a P2P subnet connection may include blockchain nodes that have established a P2P direct connection.
  • the nodes A and C have already established a P2P direct connection. If nodes A and B have established a P2P direct connection based on the internal network address, nodes A and B do not need to initiate a P2P direct connection based on the internal network address. If nodes A and B establish a P2P direct connection based on an external network address, nodes A and B can re-establish a P2P direct connection based on an internal network address.
  • Fig. 3 is an exemplary flowchart of a communication method in a blockchain network according to some embodiments of the present disclosure.
  • the process 300 can be executed by any blockchain node (denoted as node X) in the P2P network to obtain link optimization information from node X to any other blockchain node (denoted as node Y).
  • the link optimization information indicates that the service data is transmitted from the node X to the node Y through one of the P2P network and the relay network.
  • the process 300 may be implemented by the system 600 shown in FIG. 6. As shown in FIG. 3, the process 300 may include:
  • Step 310 Send at least one first detection message to node Y through the P2P network.
  • Step 320 Receive at least one first response message returned by node Y through the P2P network.
  • the at least one first response message has a one-to-one correspondence with the at least one first detection message.
  • a single probe message (first probe message/second probe message) and its corresponding response message (first response message/second response message) may contain the same tag (such as a message number).
  • the sending node may continuously (eg, periodically) send the probe information to the receiving node.
  • the probe message may be a heartbeat message in the P2P network that allows the sending node to confirm whether the receiving node is online/failed/currently available, etc.
  • Step 330 Obtain first quality of service data of the P2P network communication link between node X and node Y according to the sending time of the at least one first probe message and the receiving time of the at least one first response message.
  • the quality of service data of any network (P2P network/relay network) link can be determined based on the round-trip time (RTT) of the message pair (including the corresponding probe message and response message) . It should be understood that, for any message pair, the RTT of the message pair can be obtained by subtracting the sending time of the message pair detection message from the receiving time of the message pair response message.
  • RTT round-trip time
  • the quality of service of the network communication link in one-way communication and two-way communication can be considered to be stable, so the round-trip delay can be used to measure the network communication link service covering both one-way communication and two-way communication. quality.
  • Node X can continuously send detection messages to dynamically detect the quality of service of the communication link between node X and node Y.
  • node X can continuously calculate the RTT of multiple message pairs, and then node X can perform statistics based on the round trip delay of each message pair to obtain the quality of service data of the network communication link between node X and node Y.
  • node X may accumulate the round-trip delay of each message pair according to a smoothing algorithm to obtain continuously updated QoS data (also referred to as accumulated round-trip delay).
  • Step 340 Send at least one second detection message to node Y through the relay network.
  • Step 350 Receive at least one second response message returned by the node Y through the relay network.
  • Step 360 Obtain second quality of service data of the relay network communication link between node X and node Y according to the sending time of the at least one second probe message and the receiving time of the at least one second response message.
  • Step 370 Compare the first service quality data and the second service quality data.
  • Step 380 Record the link optimization information from node X to node Y according to the comparison result.
  • the quality of service data is associated with the start and end nodes (ie, node X and node Y) and the network (P2P network/relay network) where the communication link is located.
  • the first quality of service (QoS) data corresponds to a P2P network
  • the second quality of service (QoS) data corresponds to a relay network.
  • the nodes in the blockchain network can optimize the data according to the link without sending the business data to the destination blockchain through the communication link of the network with poor service quality (P2P network/relay network) Nodes, which can reduce the amount of repeated data transmission and reception.
  • P2P network/relay network P2P network/relay network
  • the link optimization information can indicate that the service data is transmitted from node X to node Y through one of the P2P network and the relay network by setting different flags, for example, "0" is used in the link optimization information.
  • One of “1” and “1” indicates the transmission of service data through the P2P network, and the other of "0” and “1” indicates the transmission of service data through the relay network.
  • node X may only record link optimization information indicating the transmission of service data from node X to node Y through the P2P network, that is, when the link optimization information about node Y (as the destination node) cannot be queried When the service data is transmitted from the node X to the node Y through the relay network, a better quality of service can be obtained.
  • the link optimization information indicating the transmission of service data from the node X to the node Y through the P2P network may include the identification information of the node Y.
  • the link optimization information containing the identification information of the node Y (as the destination node) cannot be queried, it means that the service data is transmitted from the node X to the node Y through the P2P network to obtain a better quality of service.
  • node X may only record link optimization information indicating the transmission of service data from node X to node Y through the relay network, that is, when the relevant node Y (as the destination node) cannot be queried
  • link optimization information it means that the service data can be transmitted from node X to node Y through the P2P network to obtain better service quality.
  • the link optimization information indicating the transmission of service data from node X to node Y through the relay network may include node Y identification information.
  • the link optimization information containing the identification information of the node Y (as the destination node) cannot be queried, it means that the service data is transmitted from the node X to the node Y through the relay network to obtain a better quality of service.
  • node X may create a link optimization table for storing link optimization information from node X to each other blockchain node, and the link optimization table may follow the link optimization information from node X to each node Dynamic updates.
  • it may be: For any node, when the link optimization table saved by node X contains the identification information of the node, it indicates that the service data is transmitted from node X to the node through the P2P network Better service quality can be obtained.
  • it may also be: For any node, when the link optimization table saved by node X contains the identification information of the node, it means that the service data can be transmitted from node X to the node through the relay network. Get better service quality.
  • node X For the business data (ie unicast message) sent to the designated blockchain node (single destination blockchain node), node X can choose to pass through the P2P network or relay according to the link optimization information from node X to the destination blockchain node The network transmits the business data to the destination blockchain node. That is, for unicast service data, if node X chooses to transmit the service data through one of the P2P network and the relay network according to the query link optimization information, it can no longer transmit the service data through the other of the P2P network and the relay network.
  • the business data can reduce the repeated sending and receiving of data. Specifically, node X can obtain the business data to be transmitted, and determine the destination blockchain node of the business data.
  • node X can query the link optimization information corresponding to the destination blockchain node (refer to the aforementioned node Y), and according to the query result, choose to transmit the service data to the destination block through one of the P2P network and the relay network Chain node.
  • link optimization information please refer to Figure 3 and its related descriptions.
  • the link optimization table (identified by list in Figure 4) saved by node A contains the identification information of nodes B, C, and F.
  • the link optimization table will be used for all other blockchain nodes except node A. Divided into two parts, the first part contains nodes B, C, and F, and the second part contains nodes D, E, G, and H.
  • node A will choose to send the service data to the blockchain node belonging to the first part through the P2P network, and through The relay network sends the business data to the blockchain nodes belonging to the second part. For example, as shown in Figure 4, node A wants to send service data data1 to node F, node A will not send data1 to relay1 directly connected, but will pass through a communication link (for example, ACF) in the P2P network. data1 is sent to node F.
  • a communication link for example, ACF
  • node A will choose to send the service data to the blockchain node belonging to the first part through the relay network, And send the business data to the blockchain nodes belonging to the second part through the relay network. Still taking data1 to be sent to node F as an example, node A will send data1 to node F through a communication link in the relay network.
  • node X may report the link optimization information from node X to the target blockchain node to the same relay node, where the target blockchain node is directly connected to the same relay node with node X Blockchain node.
  • the relay node can determine whether to send the service data broadcast by the node X to the directly connected target blockchain node according to the link optimization information reported by the node X.
  • the link optimization information reported by node X indicates that the service data is transmitted to the target blockchain node through the P2P network
  • the relay node can no longer send broadcast service data to the target blockchain node, which can reduce data duplication Send and receive. It should be understood that since the link optimization information is continuously updated, the node X can report the updated link optimization information to the directly connected relay node, so as to realize the synchronization of the link optimization information.
  • the link optimization table (identified by list in Figure 5) saved by node A contains the identification information of nodes C and E.
  • the link optimization table divides the rest of the blockchain nodes except node A into Two parts, the first part includes nodes C and E (node C is the target blockchain node directly connected to relay1 respectively), and the second part includes nodes B, D, F, G, and H.
  • Node A can report the link optimization table missing the identification information of node E (corresponding to the list containing only C in Figure 5) to the directly connected relay1.
  • node A can also report the complete link optimization table to the directly connected relay1. relay1.
  • the link optimization table indicates that the service data is transmitted from node A to the blockchain node belonging to the first part through the P2P network, as shown in Figure 5, after relay1 receives the broadcast service data data2, it can check the chain reported by node A Whether the path optimization table contains the identification information of the blockchain node directly connected to relay1, when it is found that the link optimization table reported by node A contains the identification information of node C, relay1 can transfer a copy of data2 to node B but not Node C transfers a copy of data2.
  • the link optimization table indicates that the service data is transmitted from node A to the blockchain node belonging to the first part through the relay network
  • relay1 receives the broadcast service data data2
  • it can check whether the link optimization table reported by node A is Contains the identification information of the blockchain node directly connected to relay1.
  • relay1 can transfer a copy of data2 to node C but not to node B. data2.
  • Fig. 6 is a block diagram of a communication system in a blockchain network according to some embodiments of the present disclosure.
  • the system 600 can be implemented on a certain blockchain node (denoted as node X) in a P2P network, and is used to obtain link optimization information from node X to any other blockchain node (denoted as node Y).
  • the system 600 may include a first service quality data obtaining module 610, a second service quality data obtaining module 620, a service quality data comparison module 630, and a link optimization information recording module 640.
  • the first quality of service data obtaining module 610 may be configured to: send at least one first detection message to node Y through a P2P network, and receive at least one first response message returned by node Y through the P2P network, according to the at least one first detection message And the receiving time of the at least one first response message to obtain the first quality of service data of the P2P network communication link between node X and node Y.
  • the second quality of service data obtaining module 620 may be configured to: send at least one second detection message to node Y through a relay network, and receive at least one second response message returned by node Y through the relay network, according to the at least one second response message.
  • the sending time of the probe message and the receiving time of the at least one second response message are used to obtain the second quality of service data of the communication link of the relay network between the node X and the node Y.
  • the service quality data comparison module 630 may be used to compare the first service quality data and the second service quality data.
  • the link optimization information recording module 640 may be used to record the link optimization information from node X to node Y according to the comparison result.
  • Fig. 7 is a block diagram of a communication system in a blockchain network according to some embodiments of the present disclosure.
  • the system 700 can be implemented on a certain blockchain node in a P2P network.
  • the system 700 may include a first service data obtaining module 710, a target blockchain node determination module 720, a link optimization information query module 730, and a first selection module 740.
  • the first service data obtaining module 710 may be used to obtain service data to be transmitted.
  • the target blockchain node determining module 720 may be used to determine the target blockchain node of the business data.
  • the link optimization information query module 730 may be used to query the link optimization information corresponding to the certain blockchain node to the destination blockchain node.
  • the business data is transmitted from the certain blockchain node to the destination blockchain node.
  • the first selection module 740 may be configured to select one of a P2P network and a relay network to transmit the service data to the destination blockchain node according to the query result.
  • Fig. 8 is a block diagram of a communication system in a blockchain network according to some embodiments of the present disclosure.
  • the system 800 may be implemented on a certain relay node in a relay network, and the relay node is directly connected to at least two blockchain nodes in the P2P network.
  • the system 800 may include a second service data obtaining module 810, a link optimization information obtaining module 820, and a second selection module 830.
  • the second service data obtaining module 810 may be used to obtain service data broadcasted from a certain blockchain node of the at least two blockchain nodes.
  • the link optimization information obtaining module 820 may be used to obtain link optimization information reported by the certain blockchain node.
  • the second selection module 830 may be configured to select whether to send the service data to other blockchain nodes of the at least two blockchain nodes according to the link optimization information reported by the certain blockchain node.
  • the systems and modules shown in Figures 6 to 8 can be implemented in various ways.
  • the system and its modules may be implemented by hardware, software, or a combination of software and hardware.
  • the hardware part can be implemented using dedicated logic;
  • the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware.
  • an appropriate instruction execution system such as a microprocessor or dedicated design hardware.
  • processor control codes for example on a carrier medium such as a disk, CD or DVD-ROM, such as a read-only memory (firmware)
  • Such codes are provided on a programmable memory or a data carrier such as an optical or electronic signal carrier.
  • the system and its modules of the present disclosure can not only be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc. It can also be implemented by, for example, software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuit and software (for example, firmware).
  • the above description of the system and its modules is only for convenience of description, and does not limit the present disclosure within the scope of the embodiments mentioned. It can be understood that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine various modules, or form a subsystem to connect with other modules without departing from this principle.
  • the first quality of service data obtaining module 610 and the second quality of service data obtaining module 620 shown in FIG. 6 may be different modules in the same system, or one module may implement these two modules.
  • the first service data obtaining module 710 and the target blockchain node determining module 720 shown in FIG. 7 may be two modules, or may be combined into one module. Such deformations are all within the protection scope of the present disclosure.
  • the possible beneficial effects brought by the embodiments of the present disclosure include, but are not limited to: (1) By assisting in the establishment of some P2P direct connections that may improve the quality of network service, it helps to mine richer link optimization information; (2) Through recording Link optimization information helps to select a better network communication link to transmit business data, and can reduce repeated data transmission and reception, thereby saving network bandwidth and machine resources and reducing the impact on node network processing capabilities. It should be noted that different embodiments may have different beneficial effects. In different embodiments, the possible beneficial effects may be any one or a combination of the above, or any other beneficial effects that may be obtained.
  • the present disclosure uses specific words to describe the embodiments of the present disclosure.
  • “one embodiment”, “an embodiment”, and/or “some embodiments” mean a certain feature, structure, or characteristic related to at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that “one embodiment” or “one embodiment” or “an alternative embodiment” mentioned twice or more in different positions in this disclosure does not necessarily refer to the same embodiment. .
  • certain features, structures, or characteristics in one or more embodiments of the present disclosure can be appropriately combined.
  • a computer storage medium may contain a propagated data signal containing a computer program code, for example on a baseband or as part of a carrier wave.
  • the propagated signal may have multiple manifestations, including electromagnetic forms, optical forms, etc., or suitable combinations.
  • the computer storage medium may be any computer readable medium other than the computer readable storage medium, and the medium may be connected to an instruction execution system, device, or device to realize communication, propagation, or transmission of the program for use.
  • the program code located on the computer storage medium can be transmitted through any suitable medium, including radio, cable, fiber optic cable, RF, or similar medium, or any combination of the above medium.
  • the computer program codes required for the operations of the various parts of the embodiments of the present disclosure can be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET , Python, etc., conventional programming languages such as C language, VisualBasic, Fortran2003, Perl, COBOL2002, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages, etc.
  • the program code can run entirely on the user's computer, or as an independent software package on the user's computer, or partly on the user's computer and partly on a remote computer, or entirely on the remote computer or processing equipment.
  • the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (for example, via the Internet), or in a cloud computing environment, or as a service Use software as a service (SaaS).
  • LAN local area network
  • WAN wide area network
  • SaaS service Use software as a service

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开实施例公开了区块链网络中的通信方法、业务数据传输方法。所述区块链网络包括P2P网络和中继网络。P2P网络中的区块链节点分别通过P2P网络和中继网络发送探测消息至其它区块链节点,根据探测消息的发送时间和响应消息的接收时间获得与P2P网络对应的第一服务质量数据和与中继网络对应的第二服务质量数据,根据第一服务质量数据和第二服务质量数据的比较结果记录链路优化信息。如此,区块链节点、中继节点可以根据链路优化信息选择服务质量更优的网络通信链路传输业务数据。

Description

区块链网络中的通信方法、业务数据传输方法 技术领域
本公开涉及通信领域,特别涉及区块链网络中的通信方法、业务数据传输方法。
背景技术
由于P2P(Peer to Peer,点对点)网络中的节点分布具有随机性等原因,P2P网络存在部分通信链路服务质量(Quality of Service,QoS)差以及通信链路的服务质量时好时坏等问题。借助中继网络的快速中转能力和稳定性,可以一定程度上解决P2P网络存在的上述问题。然而,由于同一份数据还需要在中继网络中复制传输,造成了网络带宽和机器资源的浪费,一定程度上影响节点的网络处理能力。
因此,希望提供一种能够减少重复数据传输量的网络通信方案。
发明内容
本公开实施例之一提供一种区块链网络中的通信方法,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络,所述方法由所述P2P网络中的某一区块链节点执行,所述方法包括:对于所述P2P网络中的任一其它区块链节点:通过所述P2P网络向所述其它区块链节点发送至少一个第一探测消息,接收所述其它区块链节点通过所述P2P网络返回的至少一个第一响应消息,所述至少一个第一响应消息与所述至少一个第一探测消息一一对应;根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第一服务质量数据;通过所述中继网络向所述其它区块链节点发送至少一个第二探测消息,接收所述其它区块链节点通过所述中继网络返回的至少一个第二响应消息,所述至少一个第二响应消息与所述至少一个第二探测消息一一对应;根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得所述某一区块链节点与所述其它区块链节点之间的中继网络通信链路的第二服务质量数据;比较所述第一服务质量数据和所述第二服务质量数据;根据比较结果记录所述某一区块链节点到所述其它区块链节点的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至该其它区块链节点。
本公开实施例之一提供区块链网络中的通信系统,所述区块链网络包括具有通信连接的P2P网络和中继网络,所述通信系统在所述P2P网络中的某一区块链节点上实现,所述通信系统包括第一服务质量数据获得模块、第二服务质量数据获得模块、服务质量数据比较模块和链路优化信息记录模块;对于所述P2P网络中的任一其它区块链节点:所述第一服务质量数据获得模块用于:通过所述P2P网络向所述其它区块链节点发送至 少一个第一探测消息,接收所述其它区块链节点通过所述P2P网络返回的至少一个第一响应消息,根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第一服务质量数据,其中,所述至少一个第一响应消息与所述至少一个第一探测消息一一对应;所述第二服务质量数据获得模块用于:通过所述中继网络向所述其它区块链节点发送至少一个第二探测消息,接收所述其它区块链节点通过所述中继网络返回的至少一个第二响应消息,根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得所述某一区块链节点与所述其它区块链节点之间的中继网络通信链路的第二服务质量数据,其中,所述至少一个第二响应消息与所述至少一个第二探测消息一一对应;所述第一服务质量数据获得模块用于比较所述第一服务质量数据和所述第二服务质量数据;所述链路优化信息记录模块用于根据比较结果记录所述某一区块链节点到所述其它区块链节点的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至该其它区块链节点。
本公开实施例之一提供一种区块链网络中的通信装置,其包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如本公开任一实施例所述的通信方法。
本公开实施例之一提供一种区块链网络中的业务数据传输方法,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述方法由所述P2P网络中的某一区块链节点执行,其包括:获得待传输的业务数据;确定所述业务数据的目的区块链节点;查询所述某一区块链节点到所述目的区块链节点对应的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述目的区块链节点;根据查询结果选择通过所述P2P网络和所述中继网络之一将所述业务数据传输至所述目的区块链节点。
本公开实施例之一提供一种区块链网络中的业务数据传输系统,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述业务数据传输系统在所述P2P网络中的某一区块链节点上实现,其包括:第一业务数据获得模块,用于获得待传输的业务数据;目的区块链节点确定模块,用于确定所述业务数据的目的区块链节点;链路优化信息查询模块,用于查询所述某一区块链节点到所述目的区块链节点对应的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述目的区块链节点;第一选择模块,用于根据查询结果选择通过所述P2P网络和所述中继网络之一将所述业务数据传输至所述目的区块链节点。
本公开实施例之一提供一种区块链网络中的业务数据传输装置,其包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如本公开任一实施例所述的由区块链节点执行的业务数据传输方法。
本公开实施例之一提供一种区块链网络中的业务数据传输方法,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述方法由所述中继网络中的某一中继节点执行,所述中继节点直接连接有P2P网络中的至少两个区块链节点;所述方法包括:获得来自所述至少两个区块链节点中的某一区块链节点广播的业务数据;获得所述某一区块链节点上报的链路优化信息;所述链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述至少两个区块链节点中的其它区块链节点;根据所述某一区块链节点上报的链路优化信息选择是否向所述至少两个区块链节点中的其它区块链节点发送所述业务数据。
本公开实施例之一提供一种区块链网络中的业务数据传输系统,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述业务数据传输系统在所述中继网络中的某一中继节点上实现,所述中继节点直接连接有P2P网络中的至少两个区块链节点;所述业务数据传输系统包括:第二业务数据获得模块,用于获得来自所述至少两个区块链节点中的某一区块链节点广播的业务数据;链路优化信息获得模块,用于获得所述某一区块链节点上报的链路优化信息;所述链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述至少两个区块链节点中的其它区块链节点;第二选择模块,用于根据所述某一区块链节点上报的链路优化信息选择是否向所述至少两个区块链节点中的其它区块链节点发送所述业务数据。
本公开实施例之一提供一种区块链网络中的业务数据传输装置,其包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如本公开任一实施例所述的由中继节点执行的业务数据传输方法。
附图说明
本公开将以示例性实施例的方式进一步说明,这些示例性实施例将通过附图进行详细描述。这些实施例并非限制性的,在这些实施例中,相同的编号表示相同的结构,其中:
图1是根据本公开一些实施例所示的区块链网络的拓扑图;
图2是根据本公开一些实施例所示的辅助区块链节点间建立P2P直连的示意图;
图3是根据本公开一些实施例所示的区块链网络中的通信方法的示例性流程图;
图4是根据本公开一些实施例所示的业务数据的单播方式的示意图;
图5是根据本公开一些实施例所示的业务数据的广播方式的示意图;
图6是根据本公开一些实施例所示的区块链网络中的通信系统的模块图;
图7是根据本公开一些实施例所示的区块链网络中的业务数据传输系统的模块图;
图8是根据本公开一些实施例所示的区块链网络中的业务数据传输系统的模块图。
具体实施方式
为了更清楚地说明本公开实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单的介绍。显而易见地,下面描述中的附图仅仅是本公开的一些示例或实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图将本公开应用于其它类似情景。除非从语言环境中显而易见或另做说明,图中相同标号代表相同结构或操作。
应当理解,本文使用的“系统”、“装置”、“单元”和/或“模组”是用于区分不同级别的不同组件、元件、部件、部分或装配的一种方法。然而,如果其他词语可实现相同的目的,则可通过其他表达来替换所述词语。
如本公开和权利要求书中所示,除非上下文明确提示例外情形,“一”、“一个”、“一种”和/或“该”等词并非特指单数,也可包括复数。一般说来,术语“包括”与“包含”仅提示包括已明确标识的步骤和元素,而这些步骤和元素不构成一个排它性的罗列,方法或者设备也可能包含其它的步骤或元素。
本公开中使用了流程图用来说明根据本公开的实施例的系统所执行的操作。应当理解的是,前面或后面操作不一定按照顺序来精确地执行。相反,可以按照倒序或同时处理各个步骤。同时,也可以将其他操作添加到这些过程中,或从这些过程移除某一步或数步操作。
图1是根据本公开一些实施例所示的区块链网络的拓扑图。如图1所示,区块链网络可包括具有通信连接的P2P网络和中继网络。
P2P全称对等式网络(peer-to-peer),又称点对点技术,是无中心服务器、依靠用户群(peers)交换信息的互联网体系。与有中心服务器的中央网络系统不同,对等网络的每个用户端既是一个节点,也有服务器的功能。中心服务器意味着,当受到攻击的时候,中心服务器一旦宕机,整个网络和服务就会出现问题。P2P网络的优势在于,每个节点既是客户端又是服务端,所以当受到攻击时,任何一台机器垮掉,也不会影响整体的服务。区块链的核心是去中心化,这和P2P网络的观念不约而同,所以区块链网络一般都将P2P作为底层实现,包括大部分的公有链和联盟链都采用了类似的底层实现。
区块链网络中,底层的P2P网络可包括一个或多个P2P节点,这样的一个P2P节点同时一般也是区块链网络中的一个节点,如图1所示的节点A、B、...、G、H。中继网络(简称relay)可包括一个或多个中继节点,如图1所示的relay1、relay2、relay3、relay4。
需要说明的是,本公开中出现的“直接连接”(简称“直连”)表示两个节点之间无其它节点连接,换言之,具有连接但不是直接连接(即间接连接)的两个节点之间还连接有其它节点。例如,如图1所示,节点A与节点C、D分别直接连接,节点A、B、C分别与relay1直接连接,节点A与节点B、E、F、G、H分别间接连接。另外,图1、 图3、图4、图5中由区块链节点指向中继节点间的单向箭头表示区块链节点和中继节点间的通信连接可以是由区块链节点主动发起的,应当理解,区块链节点与中继节点之间是可以双向通信的。
中继网络拥有快速中转能力且较为稳定,可以弥补P2P网络在一些情况下服务质量较差的不足。网络服务质量可以基于消息的传输时延等服务质量(Quality of Service,QoS)要素来衡量。以传输时延为例,例如,节点A要发送一条消息给节点E,消息从节点A发送消息到节点E接收到消息的时延越小或者从节点A发送消息到节点A接收到节点E反馈的消息的时延越小,传输消息的链路的服务质量越好。
在一些实施例中,区块链节点对于同一业务数据可以分别通过P2P网络和中继网络中的链路进行传输,相应地,该业务数据的目的区块链节点可以将先接收到业务数据作为有效数据保留,并将后接收到的业务数据作为无效数据丢弃。其中,重复的数据收发造成了网络带宽和机器资源的浪费,也会一定程度上影响节点的网络处理能力。在区块链网络中,业务数据可包括交易记录(简称交易)、请求消息、响应消息等中的一种或多种。
为此,本公开中的实施例通过辅助区块链节点间建立P2P直连、记录链路优化信息、基于链路优化信息选择更优链路等手段,不仅可以保证业务数据的低时延传输,还能有效减少重复的数据收发(传输),从而可以节省网络带宽和机器资源以及减轻对节点网络处理能力的影响。
图2是根据本公开一些实施例所示的辅助区块链节点间建立P2P直连的示意图。图2中与图1相同的部分可以参考图1及相关描述。
在一些实施例中,对于属于同一Intranet(企事业单位内部网络,可简称为内网)的若干区块链节点,与这些区块链节点直接连接的中继节点可以协助这些节点建立基于私用网络地址(或称为内网地址)的P2P子网连接(可称为P2P内网连接)。建立P2P内网连接后,这些区块链节点通过P2P网络进行通信可能会获得更好的网络服务质量(例如,低时延、大带宽)。
具体地,当区块链节点与中继节点建立直接连接后,该中继节点可获得该区块链节点的公用网络地址。与所述至少两个区块链节点直连的中继节点可获得所述至少两个区块链节点的外网地址,并判断所述至少两个区块链节点的外网地址是否相同。若相同,说明所述至少两个区块链节点属于同一内网(属于同一内网设备的外网地址相同),则中继节点可向所述至少两个区块链节点查询各自的内网地址,并至少向所述至少向两个区块链节点之一发送其它区块链节点节点的内网地址,以使所述至少两个区块链节点基于内网地址建立P2P直连。
参考图2,假设节点A、B、C属于同一内网(图2中用虚线圆圈标识)且节点A、B、C均直连于relay1,则relay1可获得节点A、B、C的外网地址,当relay1发现节点 A、B、C的外网地址相同时,可向节点A、B、C中的一个或多个查询其内网地址,并向节点A、B、C中的一个或多个(可以是每一个)发送其余区块链节点的内网地址。例如,relay1可以向节点A发送节点B和C的内网地址,以使节点A基于节点B和C的内网地址向节点B和C发起P2P直连。又如,relay1可以分别向节点B和C分别发送节点A的内网地址,以使节点B和C分别基于节点A的内网地址向节点A发起P2P直连。
在已经协助节点A、B、C建立P2P子网连接后,若relay1又发现新连接的区块链节点与节点A、B、C具有相同的外网地址,则relay1可以将之前查询到的节点A、B、C的内网地址都发给新连接的区块链节点,以使新连接的区块链节点基于节点A、B、C的内网地址分别向节点A、B、C发起P2P直连。也可以是relay1向新连接的区块链节点发起查询其内网地址的请求,并将新连接的区块链节点的内网地址分别发送给节点A、B、C,以使节点A、B、C分别基于新连接的区块链节点的内网地址向新连接的区块链节点发起P2P直连。
在一些实施例中,对于地理位置相近的若干区块链节点,与这些区块链节点直连的中继节点可以协助这些节点建立基于外网地址的P2P子网连接。由于这些区块链节点的地理位置相近,互相建立P2P直连后通过P2P网络进行通信可能会获得更好的网络服务质量(例如,低时延、大带宽)。
具体地,对于至少两个区块链节点,与所述至少两个区块链节点直连的中继节点可以获得所述至少两个区块链节点的外网地址,并基于所述至少两个区块链节点的外网地址确定所述至少两个区块链节点的地理位置信息。进而,中继节点可以根据所述至少两个区块链节点的地理位置信息确定所述至少两个区块链节点的地理位置是否接近,若接近,则协助所述至少两个区块链节点建立P2P子网连接。其中,协助所述至少两个区块链节点建立P2P连接的方式可包括:至少向所述至少两个区块链节点之一发送其它区块链节点的外网地址,以使所述至少两个区块链节点基于外网地址建立P2P直连。
在一些实施例中,所述地理位置信息可以包括地理坐标(如经纬度),当中继节点发现所述任意两个区块链节点中任意两个的距离(可根据坐标计算)小于距离阈值时,可认为两者的地理位置接近。在一些实施例中,所述地理位置信息可以包括物理世界中的地名(如城市名称),当发现所述任意两个区块链节点位于同一城市时,也可认为两者的地理位置接近。
参考图2,假设节点E、H、G均直连于relay4,则relay4可获得节点E、H、G的外网地址,当relay4发现节点E和H、节点H和G、节点G和E的距离均小于距离阈值,或发现节点E和H、节点H和G、节点G和E分别属于同一城市时,relay4可以向节点E(或H)发送节点H(或E)的外网地址,向节点H(或G)发送节点G(或H)的外网地址,以及向节点G(或E)发送节点E(或G)的外网地址,以使节点E 和H、节点H和G、节点G和E分别基于外网地址建立P2P直连。
在一些实施例中,本公开中提及的网络地址可以是IP地址。在一些实施例中,中继节点可以在IP地理信息库中查询IP地址对应的地理位置信息,所述IP地理信息库中存储有各IP地址对应的地理位置信息。
应当理解,中继节点协助建立P2P子网连接的区块链节点中可能包括已经建立P2P直连的区块链节点。例如,结合参照图1和图2,在中继节点协助节点A、B、C建立P2P内网连接之前,节点A和C已经建立P2P直连。若节点A和B已经建立了基于内网地址的P2P直连,节点A、B可不必再基于内网地址发起P2P直连。若节点A和B建立的是基于外网地址的P2P直连,节点A、B可基于内网地址重新建立P2P直连。
通过协助一些可能提升网络服务质量的P2P直连的建立,有助于挖掘更丰富的链路优化信息。关于链路优化信息的详细内容,可以参考图3及其相关描述。
图3是根据本公开一些实施例所示的区块链网络中的通信方法的示例性流程图。流程300可以由P2P网络中的任一区块链节点(记为节点X)执行,以获得节点X到任一其它区块链节点(记为节点Y)的链路优化信息。所述链路优化信息指示通过P2P网络和中继网络之一将业务数据从节点X传输至节点Y。在一些实施例中,流程300可以由图6所示的系统600实现。如图3所示,流程300可以包括:
步骤310,通过P2P网络向节点Y发送至少一个第一探测消息。
步骤320,接收节点Y通过P2P网络返回的至少一个第一响应消息。
所述至少一个第一响应消息与所述至少一个第一探测消息一一对应。在一些实施例中,单个探测消息(第一探测消息/第二探测消息)及其对应的响应消息(第一响应消息/第二响应消息)可包含相同的标记(如消息编号)。
在一些实施例中,发送节点可以持续地(如周期性地)发送探测信息到接收节点。例如,探测消息可以是P2P网络中让发送节点确认接受节点是否在线/发生故障/当前可用等的心跳消息。
步骤330,根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,获得节点X与节点Y之间的P2P网络通信链路的第一服务质量数据。
在一些实施例,任一网络(P2P网络/中继网络)链路的服务质量数据可基于消息对(包括互相对应的探测消息和响应消息)的往返时延(Round-Trip Time,RTT)确定。应当理解,对于任一消息对,将该消息对中响应消息的接收时间减去该消息对中探测消息的发送时间即可得到该消息对的RTT。
值得说明的是,可以认为单向通信和双向通信中网络通信链路的服务质量是稳定的,因此可以用往返时延去衡量涵盖单向通信和双向通信两种情形下的网络通信链路服务质量。
节点X可持续发出探测消息,以动态探测节点X与节点Y之间通信链路的服务质量。相应地,节点X可以持续计算出多个消息对的RTT,进而节点X可以基于各消息对的往返时延进行统计,得到节点X与节点Y之间的网络通信链路的服务质量数据。在一些实施例中,节点X可以根据平滑算法累计各消息对的往返时延,得到持续更新的QoS数据(也可称为累计往返时延)。具体地,节点X可以按SRTT=(alpha*SRTT)+((1-alpha)*RTT)更新QoS数据(即累计往返时延),其中,等号左右的SRTT表示更新前后的累计往返时延,alpha为预设的权重系数(0<alpha<1),RTT表示当前计算出的某个消息对的往返时延。通常情况下,alpha的取值可以接近1(相应地,1-alpha接近0),例如,alpha=0.9,以避免网络服务质量的短暂波动(体现在单个RTT上)使得整体的QoS数据数值出现较大波动。
步骤340,通过中继网络向节点Y发送至少一个第二探测消息。
步骤350,接收节点Y通过中继网络返回的至少一个第二响应消息。
步骤360,根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得节点X与节点Y之间的中继网络通信链路的第二服务质量数据。
关于获得第二服务质量(QoS)数据的细节,可以参考获得第一服务质量数据(步骤310~330)的相关描述。
步骤370,比较所述第一服务质量数据和所述第二服务质量数据。
步骤380,根据比较结果记录节点X到节点Y的链路优化信息。
服务质量数据与起止节点(即节点X和节点Y)以及通信链路所在的网络(P2P网络/中继网络)关联。第一服务质量(QoS)数据对应P2P网络,第二服务质量(QoS)数据对应中继网络。通过比较第一QoS数据和第二QoS数据,可以确定P2P网络的通信链路和中继网络的通信链路中哪个是更优的选择。因此,节点X可以根据比较结果记录指示通过P2P网络和中继网络之一将业务数据从节点X传输至节点Y的链路优化数据。区块链网络中的节点(区块链节点/中继节点)根据链路优化数据可不将业务数据通过服务质量较差的网络(P2P网络/中继网络)通信链路发送至目的区块链节点,从而可以减少重复的数据收发量。
在一些实施例中,链路优化信息可以通过设置不同的标志来指示通过P2P网络和中继网络之一将业务数据从节点X传输至节点Y,例如,在链路优化信息中用“0”和“1”之一指示通过P2P网络传输业务数据,用“0”和“1”中的另一个指示通过中继网络传输业务数据。
在一些实施例中,节点X可以仅记录指示通过P2P网络将业务数据从节点X传输至节点Y的链路优化信息,即,当查询不到有关节点Y(作为目的节点)的链路优化信息时,说明通过中继网络将业务数据从节点X传输至节点Y可获得更优的服务质量。 具体地,所述指示通过P2P网络将业务数据从节点X传输至节点Y的链路优化信息可以包含节点Y的标识信息。相应地,当查询不到包含节点Y(作为目的节点)的标识信息的链路优化信息时,说明通过P2P网络将业务数据从节点X传输至节点Y可获得更优的服务质量。
类似地,在又一些实施例中,节点X可以仅记录指示通过中继网络将业务数据从节点X传输至节点Y的链路优化信息,即,当查询不到有关节点Y(作为目的节点)的链路优化信息时,说明通过P2P网络将业务数据从节点X传输至节点Y可获得更优的服务质量。具体地,所述指示通过中继网络将业务数据从节点X传输至节点Y的链路优化信息可以包含节点Y的标识信息。相应地,当查询不到包含节点Y(作为目的节点)的标识信息的链路优化信息时,说明通过中继网络将业务数据从节点X传输至节点Y可获得更优的服务质量。
在一些实施例中,节点X可以创建用于保存节点X到各其他区块链节点的链路优化信息的链路优化表,该链路优化表可跟随节点X到各个节点的链路优化信息动态更新。参考前述内容,在一些实施例中,可以是:对于任一节点,当节点X保存的链路优化表中包含该节点的标识信息时,说明通过P2P网络将业务数据从节点X传输至该节点可获得更优的服务质量。在又一些实施例中,也可以是:对于任一节点,当节点X保存的链路优化表中包含该节点的标识信息时,说明通过中继网络将业务数据从节点X传输至该节点可获得更优的服务质量。
对于发送给指定区块链节点(单个目的区块链节点)的业务数据(即单播消息),节点X可以根据节点X到目的区块链节点的链路优化信息选择通过P2P网络或中继网络将该业务数据传输至目的区块链节点。即,对于单播的业务数据,若节点X根据查询链路优化信息选择通过P2P网络和中继网络中的某一个传输该业务数据,则可不再通过P2P网络和中继网络中的另一个传输该业务数据,可减小数据的重复收发。具体地,节点X可以获得待传输的业务数据,确定该业务数据的目的区块链节点。进而,节点X可查询该目的区块链节点(参考前述节点Y)对应的链路优化信息,并根据查询结果选择通过P2P网络和中继网络之一将所述业务数据传输至该目的区块链节点。关于链路优化信息的更多细节,可以参考图3及其相关描述。
下面结合图4对业务数据的单播进行举例说明。如图4所示,节点A保存的链路优化表(图4中用list标识)中包含节点B、C、F的标识信息,该链路优化表将除节点A外的其余区块链节点划分为两部分,第一部分包含节点B、C、F,第二部分包含节点D、E、G、H。
若该链路优化表指示通过P2P网络将业务数据从节点A传输至属于第一部分的区块链节点,节点A会选择通过P2P网络将业务数据发送给属于第一部分的区块链节点,以及通过中继网络将业务数据发送给属于第二部分的区块链节点。例如,如图4所示, 节点A要发送业务数据data1至节点F,节点A不会将data1发送给直连的relay1,而会通过P2P网络中的某条通信链路(例如,A-C-F)将data1发送给至节点F。
若该链路优化表指示通过中继网络将业务数据从节点A传输至属于第一部分的区块链节点,节点A会选择通过中继网络将业务数据发送给属于第一部分的区块链节点,以及通过中继网络将业务数据发送给属于第二部分的区块链节点。仍以待发往节点F的data1为例,节点A会通过中继网络中的某条通信链路将data1发送给至节点F。
在一些实施例中,节点X可以将节点X到目标区块链节点的链路优化信息上报给该同一中继节点,其中,目标区块链节点为与节点X直连于同一中继节点的区块链节点。如此,中继节点可以根据节点X上报的链路优化信息确定是否将节点X广播的业务数据发送给直连的目标区块链节点。其中,若节点X上报的链路优化信息指示通过P2P网络将业务数据传输至目标区块链节点,则中继节点可以不再向目标区块链节点发送广播的业务数据,可以减少数据的重复收发。应当理解,由于链路优化信息可持续更新,节点X可以将更新后的链路优化信息上报至直连的中继节点,以实现链路优化信息的同步。
下面结合图5对业务数据的广播进行举例说明。如图5所示,节点A保存的链路优化表(图5中用list标识)中包含节点C、E的标识信息,该链路优化表将除节点A外的其余区块链节点划分为两部分,第一部分包含节点C、E(节点C即与节点A分别直连于relay1的目标区块链节点),第二部分包含节点B、D、F、G、H。节点A可将缺失节点E的标识信息的链路优化表(对应图5中仅包含C的list)上报给直连的relay1,当然节点A也可将完整的链路优化表上报给直连的relay1。
若该链路优化表指示通过P2P网络将业务数据从节点A传输至属于第一部分的区块链节点,如图5所示,relay1接收到广播的业务数据data2后,可检查节点A上报的链路优化表中是否包含与relay1直连的区块链节点的标识信息,当发现节点A上报的链路优化表中包含节点C的标识信息时,relay1可向节点B中转一份data2但不向节点C中转一份data2。
若该链路优化表指示通过中继网络将业务数据从节点A传输至属于第一部分的区块链节点,relay1接收到广播的业务数据data2后,可检查节点A上报的链路优化表中是否包含与relay1直连的区块链节点的标识信息,当发现节点A上报的链路优化表中包含节点C的标识信息时,relay1可向节点C中转一份data2但不向节点B中转一份data2。
经过POC(Proof of Concept,概念验证)验证发现,借助本公开实施例提供的辅助区块链节点间建立P2P直连的方法、区块链网络中的通信方法、业务数据传输方法,同步交易、区块的速度明显提升(平均共识时延明显下降),且可以节约40%以上的带宽。
应当注意的是,上述有关流程的描述仅仅是为了示例和说明,而不限定本公开的适用范围。对于本领域技术人员来说,在本公开的指导下可以对流程进行各种修正和改变。 然而,这些修正和改变仍在本公开的范围之内。
图6是根据本公开一些实施例所示的区块链网络中的通信系统的模块图。系统600可以在P2P网络中的某一区块链节点(记为节点X)上实现,用于获得节点X到任一其它区块链节点(记为节点Y)的链路优化信息。如图6所示,系统600可以包括第一服务质量数据获得模块610、第二服务质量数据获得模块620、服务质量数据比较模块630和链路优化信息记录模块640。
第一服务质量数据获得模块610可以用于:通过P2P网络向节点Y发送至少一个第一探测消息,接收节点Y通过P2P网络返回的至少一个第一响应消息,根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,获得节点X与节点Y之间的P2P网络通信链路的第一服务质量数据。
第二服务质量数据获得模块620可以用于:通过中继网络向节点Y发送至少一个第二探测消息,接收节点Y通过中继网络返回的至少一个第二响应消息,根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得节点X与节点Y之间的中继网络通信链路的第二服务质量数据。
服务质量数据比较模块630可以用于比较所述第一服务质量数据和所述第二服务质量数据。
链路优化信息记录模块640可以用于根据比较结果记录节点X到节点Y的链路优化信息。
关于系统600及其模块的更多细节,可以参考图3及其相关描述。
图7是根据本公开一些实施例所示的区块链网络中的通信系统的模块图。系统700可以在P2P网络中的某一区块链节点上实现。如图7所示,系统700可以包括第一业务数据获得模块710、目的区块链节点确定模块720、链路优化信息查询模块730和第一选择模块740。
第一业务数据获得模块710可以用于获得待传输的业务数据。
目的区块链节点确定模块720可以用于确定所述业务数据的目的区块链节点。
链路优化信息查询模块730可以用于查询所述某一区块链节点到所述目的区块链节点对应的链路优化信息,该链路优化信息指示通过P2P网络和中继网络之一将业务数据从所述某一区块链节点传输至所述目的区块链节点。
第一选择模块740可以用于根据查询结果选择通过P2P网络和中继网络之一将所述业务数据传输至所述目的区块链节点。
关于系统700及其模块的更多细节,可以参考图4及其相关描述。
图8是根据本公开一些实施例所示的区块链网络中的通信系统的模块图。系统800 可以在中继网络中的某一中继节点上实现,所述中继节点直连有P2P网络中的至少两个区块链节点。如图8所示,系统800可以包括第二业务数据获得模块810、链路优化信息获得模块820和第二选择模块830。
第二业务数据获得模块810可以用于获得来自所述至少两个区块链节点中的某一区块链节点广播的业务数据。
链路优化信息获得模块820可以用于获得所述某一区块链节点上报的链路优化信息。
第二选择模块830可以用于根据所述某一区块链节点上报的链路优化信息选择是否向所述至少两个区块链节点中的其它区块链节点发送所述业务数据。
关于系统800及其模块的更多细节,可以参考图5及其相关描述。
应当理解,图6~8所示的系统及其模块可以利用各种方式来实现。例如,在一些实施例中,系统及其模块可以通过硬件、软件或者软件和硬件的结合来实现。其中,硬件部分可以利用专用逻辑来实现;软件部分则可以存储在存储器中,由适当的指令执行系统,例如微处理器或者专用设计硬件来执行。本领域技术人员可以理解上述的方法和系统可以使用计算机可执行指令和/或包含在处理器控制代码中来实现,例如在诸如磁盘、CD或DVD-ROM的载体介质、诸如只读存储器(固件)的可编程的存储器或者诸如光学或电子信号载体的数据载体上提供了这样的代码。本公开的系统及其模块不仅可以有诸如超大规模集成电路或门阵列、诸如逻辑芯片、晶体管等的半导体、或者诸如现场可编程门阵列、可编程逻辑设备等的可编程硬件设备的硬件电路实现,也可以用例如由各种类型的处理器所执行的软件实现,还可以由上述硬件电路和软件的结合(例如,固件)来实现。
需要注意的是,以上对于系统及其模块的描述,仅为描述方便,并不能把本公开限制在所举实施例范围之内。可以理解,对于本领域的技术人员来说,在了解系统的原理后,可能在不背离这一原理的情况下,对各个模块进行任意组合,或者构成子系统与其他模块连接。例如,在一些实施例中,图6所示的第一服务质量数据获得模块610和第二服务质量数据获得模块620可以是一个系统中的不同模块,也可以是一个模块实现这两个模块的功能。又如,在一些实施例中,图7所示的第一业务数据获得模块710和目的区块链节点确定模块720可以是两个模块,也可以合并为一个模块。诸如此类的变形,均在本公开的保护范围之内。
本公开实施例可能带来的有益效果包括但不限于:(1)通过协助一些可能提升网络服务质量的P2P直连的建立,有助于挖掘更丰富的链路优化信息;(2)通过记录链路优化信息,有助于选择更优的网络通信链路传输业务数据,可以减少重复的数据收发,从而可以节省网络带宽和机器资源以及减轻对节点网络处理能力的影响。需要说明的是,不同实施例可能产生的有益效果不同,在不同的实施例里,可能产生的有益效果可以是以上任意一种或几种的组合,也可以是其他任何可能获得的有益效果。
上文已对基本概念做了描述,显然,对于本领域技术人员来说,上述详细披露仅仅作为示例,而并不构成对本公开实施例的限定。虽然此处并没有明确说明,本领域技术人员可能会对本公开实施例进行各种修改、改进和修正。该类修改、改进和修正在本公开实施例中被建议,所以该类修改、改进、修正仍属于本公开示范实施例的精神和范围。
同时,本公开使用了特定词语来描述本公开的实施例。如“一个实施例”、“一实施例”、和/或“一些实施例”意指与本公开至少一个实施例相关的某一特征、结构或特点。因此,应强调并注意的是,本公开中在不同位置两次或多次提及的“一实施例”或“一个实施例”或“一个替代性实施例”并不一定是指同一实施例。此外,本公开的一个或多个实施例中的某些特征、结构或特点可以进行适当的组合。
此外,本领域技术人员可以理解,本公开实施例的各方面可以通过若干具有可专利性的种类或情况进行说明和描述,包括任何新的和有用的工序、机器、产品或物质的组合,或对他们的任何新的和有用的改进。相应地,本公开实施例的各个方面可以完全由硬件执行、可以完全由软件(包括固件、常驻软件、微码等)执行、也可以由硬件和软件组合执行。以上硬件或软件均可被称为“数据块”、“模块”、“引擎”、“单元”、“组件”或“系统”。此外,本公开实施例的各方面可能表现为位于一个或多个计算机可读介质中的计算机产品,该产品包括计算机可读程序编码。
计算机存储介质可能包含一个内含有计算机程序编码的传播数据信号,例如在基带上或作为载波的一部分。该传播信号可能有多种表现形式,包括电磁形式、光形式等,或合适的组合形式。计算机存储介质可以是除计算机可读存储介质之外的任何计算机可读介质,该介质可以通过连接至一个指令执行系统、装置或设备以实现通讯、传播或传输供使用的程序。位于计算机存储介质上的程序编码可以通过任何合适的介质进行传播,包括无线电、电缆、光纤电缆、RF、或类似介质,或任何上述介质的组合。
本公开实施例各部分操作所需的计算机程序编码可以用任意一种或多种程序语言编写,包括面向对象编程语言如Java、Scala、Smalltalk、Eiffel、JADE、Emerald、C++、C#、VB.NET、Python等,常规程序化编程语言如C语言、VisualBasic、Fortran2003、Perl、COBOL2002、PHP、ABAP,动态编程语言如Python、Ruby和Groovy,或其他编程语言等。该程序编码可以完全在用户计算机上运行、或作为独立的软件包在用户计算机上运行、或部分在用户计算机上运行部分在远程计算机运行、或完全在远程计算机或处理设备上运行。在后种情况下,远程计算机可以通过任何网络形式与用户计算机连接,比如局域网(LAN)或广域网(WAN),或连接至外部计算机(例如通过因特网),或在云计算环境中,或作为服务使用如软件即服务(SaaS)。
此外,除非权利要求中明确说明,本公开实施例所述处理元素和序列的顺序、数字字母的使用、或其他名称的使用,并非用于限定本公开实施例流程和方法的顺序。尽管上述披露中通过各种示例讨论了一些目前认为有用的发明实施例,但应当理解的是, 该类细节仅起到说明的目的,附加的权利要求并不仅限于披露的实施例,相反,权利要求旨在覆盖所有符合本公开实施例实质和范围的修正和等价组合。例如,虽然以上所描述的系统组件可以通过硬件设备实现,但是也可以只通过软件的解决方案得以实现,如在现有的处理设备或移动设备上安装所描述的系统。
同理,应当注意的是,为了简化本公开实施例披露的表述,从而帮助对一个或多个发明实施例的理解,前文对本公开实施例的描述中,有时会将多种特征归并至一个实施例、附图或对其的描述中。但是,这种披露方法并不意味着本公开实施例对象所需要的特征比权利要求中提及的特征多。实际上,实施例的特征要少于上述披露的单个实施例的全部特征。
针对本公开引用的每个专利、专利申请、专利申请公开物和其他材料,如文章、书籍、说明书、出版物、文档等,特此将其全部内容并入本公开作为参考。与本公开内容不一致或产生冲突的申请历史文件除外,对本公开权利要求最广范围有限制的文件(当前或之后附加于本公开中的)也除外。需要说明的是,如果本公开附属材料中的描述、定义、和/或术语的使用与本公开所述内容有不一致或冲突的地方,以本公开的描述、定义和/或术语的使用为准。
最后,应当理解的是,本公开中所述实施例仅用以说明本公开实施例的原则。其他的变形也可能属于本公开实施例的范围。因此,作为示例而非限制,本公开实施例的替代配置可视为与本公开的教导一致。相应地,本公开的实施例不仅限于本公开明确介绍和描述的实施例。

Claims (18)

  1. 一种区块链网络中的通信方法,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络,所述方法由所述P2P网络中的某一区块链节点执行,所述方法包括:
    对于所述P2P网络中的任一其它区块链节点:
    通过所述P2P网络向所述其它区块链节点发送至少一个第一探测消息,接收所述其它区块链节点通过所述P2P网络返回的至少一个第一响应消息,所述至少一个第一响应消息与所述至少一个第一探测消息一一对应;根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第一服务质量数据;
    通过所述中继网络向所述其它区块链节点发送至少一个第二探测消息,接收所述其它区块链节点通过所述中继网络返回的至少一个第二响应消息,所述至少一个第二响应消息与所述至少一个第二探测消息一一对应;根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得所述某一区块链节点与所述其它区块链节点之间的中继网络通信链路的第二服务质量数据;
    比较所述第一服务质量数据和所述第二服务质量数据;
    根据比较结果记录所述某一区块链节点到所述其它区块链节点的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述其它区块链节点。
  2. 如权利要求1所述的方法,其中,所述根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第一服务质量数据,包括:
    获取至少一个第一消息对,其中,所述第一消息对包括互相对应的第一探测信息和第一响应消息;基于所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述至少一个第一消息对的往返时延;基于所述至少一个第一消息对的往返时延进行统计,得到所述第一服务质量数据;
    所述根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第二服务质量数据,包括:
    获取至少一个第二消息对,其中,所述第二消息对包括互相对应的第二探测信息和第二响应消息;基于所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,确定所述至少一个第二消息对的往返时延;基于所述至少一个第二消息对的往返时延进行统计,得到所述第二服务质量数据。
  3. 如权利要求2所述的方法,其中,
    所述基于所述至少一个第一消息对的往返时延进行统计包括:利用平滑算法累计所述至少一个第一消息对的往返时延;
    所述基于所述至少一个第二消息对的往返时延进行统计包括:利用平滑算法累计所 述至少一个第二消息对的往返时延。
  4. 如权利要求1所述的方法,其中,所述方法还包括:
    建立链路优化表,所述链路优化表用于存储所述某一区块链节点到各其它区块链节点的链路优化信息;所述链路优化表跟随所述某一区块链节点到各其它区块链节点的链路优化信息动态更新。
  5. 如权利要求4所述的方法,其中,所述链路优化表包括各其它区块链节点中至少一个区块链节点的标识信息,以指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述至少一个区块链节点。
  6. 如权利要求1~5中任一项所述的方法,其中,还包括:
    将所述某一区块链节点到目标区块链节点的链路优化信息上报给中继节点,其中,所述目标区块链节点为与所述某一区块链节点分别直接连接于所述中继节点的区块链节点。
  7. 一种区块链网络中的通信系统,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络,所述通信系统在所述P2P网络中的某一区块链节点上实现,所述通信系统包括第一服务质量数据获得模块、第二服务质量数据获得模块、服务质量数据比较模块和链路优化信息记录模块;
    对于所述P2P网络中的任一其它区块链节点:
    所述第一服务质量数据获得模块用于:通过所述P2P网络向所述其它区块链节点发送至少一个第一探测消息,接收所述其它区块链节点通过所述P2P网络返回的至少一个第一响应消息,根据所述至少一个第一探测消息的发送时间和所述至少一个第一响应消息的接收时间,确定所述某一区块链节点与所述其它区块链节点之间的P2P网络通信链路的第一服务质量数据,其中,所述至少一个第一响应消息与所述至少一个第一探测消息一一对应;
    所述第二服务质量数据获得模块用于:通过所述中继网络向所述其它区块链节点发送至少一个第二探测消息,接收所述其它区块链节点通过所述中继网络返回的至少一个第二响应消息,根据所述至少一个第二探测消息的发送时间和所述至少一个第二响应消息的接收时间,获得所述某一区块链节点与所述其它区块链节点之间的中继网络通信链路的第二服务质量数据,其中,所述至少一个第二响应消息与所述至少一个第二探测消息一一对应;
    所述第一服务质量数据获得模块用于比较所述第一服务质量数据和所述第二服务质量数据;
    所述链路优化信息记录模块用于根据比较结果记录所述某一区块链节点到所述其它区块链节点的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述其它区块链节点。
  8. 一种区块链网络中的通信装置,其中,包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如权利要求1~6中任一项所述的方法。
  9. 一种区块链网络中的业务数据传输方法,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述方法由所述P2P网络中的某一区块链节点执行,其包括:
    获得待传输的业务数据;
    确定所述业务数据的目的区块链节点;
    查询所述某一区块链节点到所述目的区块链节点对应的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述目的区块链节点;
    根据查询结果选择通过所述P2P网络和所述中继网络之一将所述业务数据传输至所述目的区块链节点。
  10. 如权利要求9所述的方法,其中,所述链路优化信息通过如权利要求1~6任一项所述的方法获得。
  11. 一种区块链网络中的业务数据传输系统,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述业务数据传输系统在所述P2P网络中的某一区块链节点上实现,其包括:
    第一业务数据获得模块,用于获得待传输的业务数据;
    目的区块链节点确定模块,用于确定所述业务数据的目的区块链节点;
    链路优化信息查询模块,用于查询所述某一区块链节点到所述目的区块链节点对应的链路优化信息,该链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述目的区块链节点;
    第一选择模块,用于根据查询结果选择通过所述P2P网络和所述中继网络之一将所述业务数据传输至所述目的区块链节点。
  12. 一种区块链网络中的业务数据传输装置,其中,包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如权利要求9或10所述的方法。
  13. 一种区块链网络中的业务数据传输方法,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述方法由所述中继网络中的某一中继节点执行,所述中继节点直接连接有P2P网络中的至少两个区块链节点;所述方法包括:
    获得来自所述至少两个区块链节点中的某一区块链节点广播的业务数据;
    获得所述某一区块链节点上报的链路优化信息;所述链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述至少两个区块链节点中的其它区块链节点;
    根据所述某一区块链节点上报的链路优化信息选择是否向所述至少两个区块链节点中的其它区块链节点发送所述业务数据。
  14. 如权利要求13所述的方法,其中,所述链路优化信息通过如权利要求1~6任一项所述的方法获得。
  15. 如权利要求13所述的方法,其中,还包括:
    对于与所述中继节点直接连接的至少两个区块链节点:
    获得与至少两个区块链节点的公用网络地址;
    判断所述至少两个区块链节点的公用网络地址是否相同;若是,则协助所述至少两个区块链节点建立P2P直接连接;所述协助所述至少两个区块链节点建立P2P直接连接包括:向所述至少两个区块链节点查询各自的私用网络地址;至少向所述至少两个区块链节点之一发送其它区块链节点的私用IP地址,以使所述至少两个区块链节点基于私用网络地址建立P2P直接连接。
  16. 如权利要求13所述的方法,其中,还包括:
    对于与所述中继节点直接连接的至少两个区块链节点:
    获得与所述至少两个区块链节点的网络地址;
    基于所述至少两个区块链节点的网络地址确定所述至少两个区块链节点的地理位置信息;
    根据所述至少两个区块链节点的地理位置信息确定是否协助所述至少两个区块链节点建立P2P直接连接;所述协助所述至少两个区块链节点建立P2P直接连接包括:至少向所述至少两个区块链节点之一发送其它区块链节点的网络地址,以使所述至少两个区块链节点基于网络地址建立P2P直接连接。
  17. 一种区块链网络中的业务数据传输系统,其中,所述区块链网络包括具有通信连接的P2P网络和中继网络;所述业务数据传输系统在所述中继网络中的某一中继节点上实现,所述中继节点直接连接有P2P网络中的至少两个区块链节点;所述业务数据传输系统包括:
    第二业务数据获得模块,用于获得来自所述至少两个区块链节点中的某一区块链节点广播的业务数据;
    链路优化信息获得模块,用于获得所述某一区块链节点上报的链路优化信息;所述链路优化信息指示通过所述P2P网络和所述中继网络之一将业务数据从所述某一区块链节点传输至所述至少两个区块链节点中的其它区块链节点;
    第二选择模块,用于根据所述某一区块链节点上报的链路优化信息选择是否向所述至少两个区块链节点中的其它区块链节点发送所述业务数据。
  18. 一种区块链网络中的业务数据传输装置,其中,包括处理器和存储设备,所述存储设备用于存储指令,当所述处理器执行指令时,实现如权利要求13~16中任一项所述的方法。
PCT/CN2021/099424 2020-06-12 2021-06-10 区块链网络中的通信方法、业务数据传输方法 WO2021249490A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010534549.4A CN111447290B (zh) 2020-06-12 2020-06-12 区块链网络中的通信方法、业务数据传输方法
CN202010534549.4 2020-06-12

Publications (1)

Publication Number Publication Date
WO2021249490A1 true WO2021249490A1 (zh) 2021-12-16

Family

ID=71655547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/099424 WO2021249490A1 (zh) 2020-06-12 2021-06-10 区块链网络中的通信方法、业务数据传输方法

Country Status (2)

Country Link
CN (3) CN112383473B (zh)
WO (1) WO2021249490A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192692A (zh) * 2022-12-30 2023-05-30 蚂蚁区块链科技(上海)有限公司 一种区块链网络中的共识数据分发方法和区块链网络

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383473B (zh) * 2020-06-12 2023-02-07 支付宝(杭州)信息技术有限公司 辅助区块链网络中的节点建立p2p直连的方法
CN112929285B (zh) * 2020-08-28 2022-05-31 支付宝(杭州)信息技术有限公司 区块链网络的通信优化系统
CN111934997B (zh) * 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN113079082B (zh) 2020-09-25 2022-02-18 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN111934996B (zh) 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN111934999B (zh) 2020-09-25 2021-01-22 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN111934990B (zh) * 2020-09-25 2021-02-09 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN112968967B (zh) 2020-09-25 2023-05-19 支付宝(杭州)信息技术有限公司 区块同步方法及装置
CN111935314B (zh) * 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 区块链系统、消息传输方法及装置
CN111935000B (zh) 2020-09-25 2021-01-08 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN112804299B (zh) * 2020-12-30 2023-02-28 成都知道创宇信息技术有限公司 节点测绘方法、装置、测绘设备及可读存储介质
CN112887154B (zh) * 2021-02-05 2022-02-18 广西师范大学 基于区块链的二维变码重ocdma系统及数据处理方法
CN114244840B (zh) * 2021-12-20 2023-06-06 杭州溪塔科技有限公司 多集群部署场景下网络自动优化方法
CN114285755B (zh) * 2021-12-31 2024-06-28 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质
CN115396918B (zh) * 2022-08-09 2024-09-24 中国联合网络通信集团有限公司 区块链数据传输方法、装置及存储介质
CN116127148B (zh) * 2023-04-04 2023-07-21 之江实验室 一种数据可信存储方法、装置、存储介质及电子设备
CN116566973B (zh) * 2023-06-20 2023-11-07 北京中宏立达科技发展有限公司 一种基于对等网络的文件传输系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431464A (zh) * 2007-11-06 2009-05-13 阿里巴巴集团控股有限公司 一种优选客户端之间数据传输路径的方法及其装置
CN108259594A (zh) * 2018-01-11 2018-07-06 杭州秘猿科技有限公司 一种基于区块链的数据交互系统以及中继服务器
US20190141193A1 (en) * 2017-11-06 2019-05-09 Line Corporation METHOD, SYSTEM, AND NON-TRANSITORY COMPUTER READABLE MEDIUM FOR SELECTING OPTIMAL NETWORK PATH FOR MEDIA TRANSMISSION IN VoIP
CN110915188A (zh) * 2017-06-30 2020-03-24 区块链控股有限公司 用于区块链网络中的高效传播的概率中继
CN110944058A (zh) * 2019-12-04 2020-03-31 杭州复杂美科技有限公司 区块链内网节点中继连接方法
CN111447290A (zh) * 2020-06-12 2020-07-24 支付宝(杭州)信息技术有限公司 区块链网络中的通信方法、业务数据传输方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100716986B1 (ko) * 2004-11-11 2007-05-10 삼성전자주식회사 RR(Return Routability)과정을이용한 경로 선택 방법 및 장치
CN102064992B (zh) * 2009-11-13 2012-11-28 中兴通讯股份有限公司 一种中继节点、中继节点的分布式网络及其组网方法
CN102857874A (zh) * 2012-05-18 2013-01-02 北京邮电大学 一种蜂窝网络下直连通信用户的分布式管理方法
WO2014005330A1 (zh) * 2012-07-06 2014-01-09 华为技术有限公司 一种服务注册与发现的方法,设备和系统
US9210536B2 (en) * 2013-05-21 2015-12-08 Google Technology Holdings LLC Method for establishing device-to-device communication
CN107635022A (zh) * 2016-07-18 2018-01-26 华为软件技术有限公司 跨内外网服务访问方法和装置
CN106878474A (zh) * 2017-04-25 2017-06-20 浙江风向标科技有限公司 一种p2p连接建立的方法和装置
WO2019029429A1 (en) * 2017-08-05 2019-02-14 Proclus Technologies Limited METHOD AND SYSTEM FOR SECURING A BLOCK CHAIN WITH PROOF OF TRANSACTIONS
CN109996126B (zh) * 2017-12-29 2021-06-22 浙江宇视科技有限公司 一种混合网络架构下的设备连接动态调度方法及系统
US11172327B2 (en) * 2018-07-12 2021-11-09 Qualcomm Incorporated Relaying for vehicular communications
CN110505270A (zh) * 2019-07-03 2019-11-26 西安万像电子科技有限公司 数据传输方法、系统及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431464A (zh) * 2007-11-06 2009-05-13 阿里巴巴集团控股有限公司 一种优选客户端之间数据传输路径的方法及其装置
CN110915188A (zh) * 2017-06-30 2020-03-24 区块链控股有限公司 用于区块链网络中的高效传播的概率中继
US20190141193A1 (en) * 2017-11-06 2019-05-09 Line Corporation METHOD, SYSTEM, AND NON-TRANSITORY COMPUTER READABLE MEDIUM FOR SELECTING OPTIMAL NETWORK PATH FOR MEDIA TRANSMISSION IN VoIP
CN108259594A (zh) * 2018-01-11 2018-07-06 杭州秘猿科技有限公司 一种基于区块链的数据交互系统以及中继服务器
CN110944058A (zh) * 2019-12-04 2020-03-31 杭州复杂美科技有限公司 区块链内网节点中继连接方法
CN111447290A (zh) * 2020-06-12 2020-07-24 支付宝(杭州)信息技术有限公司 区块链网络中的通信方法、业务数据传输方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192692A (zh) * 2022-12-30 2023-05-30 蚂蚁区块链科技(上海)有限公司 一种区块链网络中的共识数据分发方法和区块链网络

Also Published As

Publication number Publication date
CN112437141A (zh) 2021-03-02
CN111447290B (zh) 2020-10-02
CN112383473A (zh) 2021-02-19
CN112383473B (zh) 2023-02-07
CN112437141B (zh) 2023-02-03
CN111447290A (zh) 2020-07-24

Similar Documents

Publication Publication Date Title
WO2021249490A1 (zh) 区块链网络中的通信方法、业务数据传输方法
US20240163336A1 (en) Fast propagation of recent transactions over a blockchain network
US10951395B2 (en) Data fetching in data exchange networks
KR102167613B1 (ko) 메시지 푸시 방법 및 장치
US10193951B2 (en) Binding CRUD-type protocols in distributed agreement protocols
CN110915188A (zh) 用于区块链网络中的高效传播的概率中继
JP5684110B2 (ja) ルーティングテーブルを維持する方法およびオーバレイネットワーク内で使用するためのノード
CN108347350B (zh) 一种通信方法及装置
US20160337467A1 (en) Method and system for information exchange utilizing an asynchronous persistent store protocol
WO2020056850A1 (zh) 一种基于http协议的数据请求方法和服务器
US20230031062A1 (en) Data processing method and apparatus, related device, and storage medium
US20220046028A1 (en) Method and system for determining a state of an account in a network device running a light client protocol of a distributed ledger technology network
EP3939236B1 (en) Node and cluster management on distributed self-governed ecosystem
US11336558B2 (en) Message transmission methods and apparatuses
US20120266211A1 (en) Transparent database connection reconnect
US20230336622A1 (en) Network optimization system using latency measurements
RU2008121872A (ru) Ближайший узел для соединений распределенных служб
WO2021088905A1 (zh) 定位测量方法、终端和网络节点
US7945644B2 (en) Dynamic initialization method and system of location server
WO2018227710A1 (zh) 一种物联网终端信息寻址方法及装置
CN116055565B (zh) 一种数据传输方法、系统、装置、电子设备及存储介质
CN112866106B (zh) 一种兴趣包缓存方法、装置、设备及存储介质
CN114040007B (zh) 多节点间数据传输方法和设备
CN114285791B (zh) 数据传输方法、装置、计算机设备及存储介质
US20230275962A1 (en) Data transmission method and communication apparatus

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: 21821756

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: 21821756

Country of ref document: EP

Kind code of ref document: A1