Neutrality verification method and device for blockchain relay communication network

By using the neutrality verification method in the blockchain relay communication network to ensure the security and integrity of the message, the problems of high communication delay and poor stability between nodes in the blockchain network are solved, and more efficient communication is achieved. quality.

CN114095499BActive Publication Date: 2024-09-10ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111306181.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2024-09-10
Estimated Expiration
2041-11-05

AI Technical Summary

Technical Problem

The communication delay between nodes in the blockchain network is high and the stability is poor, which cannot meet the application needs. Traditional P2P technology cannot effectively solve this problem.

Method used

A neutrality verification method for blockchain relay communication network is proposed. The source blockchain node sends a neutrality verification message to the target blockchain node, using encryption and digital signatures to ensure the security and integrity of the message, and calculates Round trip delay and data volume to determine the neutrality of the blockchain relay communication network.

Benefits of technology

It effectively reduces the communication delay between nodes, improves stability, ensures the privacy, correctness and integrity of data transmission, and meets the communication quality requirements of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095499B
    Figure CN114095499B
Patent Text Reader

Abstract

The present specification provides a neutrality verification method and device for a blockchain relay communication network, which method may include: a source blockchain node sends a neutrality verification message to a target blockchain node through a blockchain relay communication network, the message including encrypted message content and a digital signature, and the message content includes a neutrality verification message type identifier; the target blockchain node verifies the digital signature, decrypts the encrypted message content with a symmetric key, and returns a reception confirmation message when the verification is successful and the neutrality verification message type identifier is obtained through decryption; the target blockchain node counts the amount of received data; the source blockchain node calculates the round-trip delay based on the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data amount with its own sent data amount; wherein, conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment, and the received data amount is consistent with the sent data amount.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of blockchain technology, and in particular, to a method and device for verifying the neutrality of a blockchain relay communication network. Background Art

[0002] The blockchain network contains several blockchain nodes, and the blockchain nodes need to implement communication operations such as consensus, transaction transmission, block synchronization, etc. In traditional blockchain technology, each blockchain node directly uses P2P (Peer to Peer) technology to communicate with each other to transmit transactions, blocks, etc., but due to various network factors, the communication delay is high and the stability is poor, which cannot meet application requirements.

[0003] Therefore, the blockchain communication technology based on the blockchain relay communication network is proposed in the related art. The blockchain nodes in the blockchain network can be connected to the blockchain relay communication network respectively, so that the blockchain nodes can communicate with each other through the blockchain relay communication network. Since the blockchain relay communication network is a backbone relay communication network for real-time transmission of blockchains, each relay node can communicate and interact with each other through high-quality bandwidth guaranteed by high QoS. Therefore, the blockchain relay communication network takes over the middle mile of communication between blockchain nodes, which can reduce communication delay and improve stability, thereby significantly improving the communication quality between blockchain nodes. Summary of the invention

[0004] In view of this, one or more embodiments of the present specification provide a method and device for verifying the neutrality of a blockchain relay communication network.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a method for verifying the neutrality of a blockchain relay communication network is proposed, including:

[0007] The source blockchain node sends a neutrality verification message to the target blockchain node through the blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0008] The target blockchain node verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume;

[0009] The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0010] According to a second aspect of one or more embodiments of this specification, a neutrality verification method for a blockchain relay communication network is proposed, which is applied to a source blockchain node, and the method includes:

[0011] Obtaining a neutrality verification message, the neutrality verification message including first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content with the identity private key of the source blockchain node, the first message content including a neutrality verification message type identifier;

[0012] Send the neutrality verification message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and, perform data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume;

[0013] The round-trip delay of the blockchain relay communication network is calculated according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and the received data volume is compared with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0014] According to a third aspect of one or more embodiments of this specification, a neutrality verification method for a blockchain relay communication network is proposed, which is applied to a target blockchain node, and the method includes:

[0015] Receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content by an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0016] Verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message;

[0017] The data volume of the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node is counted to obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0018] According to a fourth aspect of one or more embodiments of this specification, a neutrality verification system for a blockchain relay communication network is proposed, including: a source blockchain node and a target blockchain node; wherein:

[0019] The source blockchain node sends a neutrality verification message to the target blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0020] The target blockchain node verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume;

[0021] The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0022] According to a fifth aspect of one or more embodiments of this specification, a neutrality verification device for a blockchain relay communication network is proposed, which is applied to a source blockchain node, and the device includes:

[0023] an acquiring unit, configured to acquire a neutrality verification message, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content with an identity private key of the source blockchain node, wherein the first message content includes a neutrality verification message type identifier;

[0024] A sending unit, configured to send the neutrality verification message to a target blockchain node through a blockchain relay communication network, so that the target blockchain node: verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume;

[0025] A processing unit is used to calculate the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compare the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0026] According to a sixth aspect of one or more embodiments of this specification, a neutrality verification device for a blockchain relay communication network is proposed, which is applied to a target blockchain node, and the device includes:

[0027] A message receiving unit, configured to receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content with an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0028] A message processing unit, configured to verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and to decrypt the encrypted message content contained in the interactive message using the first symmetric key, and to return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message;

[0029] A data volume statistics unit is used to perform data volume statistics on interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node, to obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0030] According to a seventh aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0031] processor;

[0032] a memory for storing processor-executable instructions;

[0033] The processor implements the method described in the second aspect or the third aspect by running the executable instructions.

[0034] According to an eighth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the second or third aspect above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flowchart of a method for verifying the neutrality of a blockchain relay communication network provided by an exemplary embodiment.

[0036] Figure 2 It is a schematic diagram of a blockchain node interacting through a blockchain relay communication network provided by an exemplary embodiment.

[0037] Figure 3 It is a flowchart of a neutrality verification method of a blockchain relay communication network based on a source blockchain node side provided by an exemplary embodiment.

[0038] Figure 4 It is a flowchart of a neutrality verification method of a blockchain relay communication network based on a target blockchain node side provided by an exemplary embodiment.

[0039] Figure 5 It is an interactive flow chart of neutrality verification provided by an exemplary embodiment.

[0040] Figure 6 It is a schematic diagram of a neutrality verification system for a blockchain relay communication network provided by an exemplary embodiment.

[0041] Figure 7 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0042] Figure 8 It is a block diagram of a neutrality verification device based on a blockchain relay communication network on the source blockchain node side provided by an exemplary embodiment.

[0043] Fig. 9 It is a block diagram of a neutrality verification device based on a blockchain relay communication network on the target blockchain node side provided by an exemplary embodiment. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0045] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0046] The blockchain relay communication network can be applied to various types of blockchain networks, including public chains, private chains, and alliance chains. For example, the blockchain relay communication networks applied to public chains mainly include Falcon, Fast Bitcoin Relay Network (FBRN), Fast Internet Bitcoin Relay Engine (FIBRE), etc., while the blockchain relay communication networks applied to alliance chains mainly include BloXRoute, Blockchain Transmission Network (BTN), etc. This specification does not limit the blockchain relay communication network used.

[0047] Although the blockchain relay communication network has several advantages as mentioned above, when the blockchain node uses the blockchain relay communication network to transmit messages, it is necessary to ensure that the blockchain relay communication network is neutral and will not have a negative impact on the message transmission. Therefore, this specification proposes a neutrality verification scheme for the blockchain relay communication network, which can effectively verify the neutrality of the blockchain relay communication network.

[0048] Figure 1 This is a flowchart of a method for verifying the neutrality of a blockchain relay communication network provided by an exemplary embodiment. Figure 1 As shown, the method may include:

[0049] Step 102: The source blockchain node sends a neutrality verification message to the target blockchain node through the blockchain relay communication network. The neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node. The first message content includes a neutrality verification message type identifier.

[0050] By running the blockchain platform code (i.e., chain code) on a physical device, a corresponding node instance can be formed on the physical device. If other functions implemented by the physical device are not considered, the physical device and the node instance can be distinguished. In this case, the physical device or the node instance can be called a blockchain node. If other functions implemented by the physical device are taken into consideration, such as running other business instances in addition to the node instance, the physical device can be called a node device and the node instance can be called a blockchain node. In short, a blockchain node can be a concept at the physical device level or a concept at the logical level, which needs to be determined based on actual conditions.

[0051] It should be noted that the relay nodes in the blockchain relay communication network can be not only physical devices but also logical devices. For logical devices, for example, the blockchain relay communication network can be a backbone communication network built on a cloud processing platform, and the relay nodes can be virtual devices created for virtualizing cloud processing resources on the cloud processing platform.

[0052] In the technical solution of this specification, the functional logic related to neutrality verification may be part of the above-mentioned blockchain platform code, then the source blockchain node and the target blockchain node may be corresponding node instances, or may be physical devices where the node instances are located. Alternatively, the functional logic related to neutrality verification may also belong to a business instance, and the business instance and the node instance are on the same physical device, then the source blockchain node and the target blockchain node may be corresponding physical devices. Regardless of the understanding of blockchain nodes, the functional logic related to neutrality verification in this specification may come from the same developer as other functional logics implemented by blockchain nodes, or may come from different developers. For example, when coming from different developers, the functional logic related to neutrality verification may be implemented in the form of SDK (Software Development Kit) to facilitate collaboration between different developers.

[0053] The source blockchain node and the target blockchain node are both any blockchain nodes connected to the blockchain relay communication network. In fact, each blockchain node that has been connected to the blockchain relay communication network can be used as a source blockchain node or as a target blockchain node. For any source blockchain node, the number of corresponding target blockchain nodes can be one or more. For example, the target blockchain node at this time can be a part or all of all other blockchain nodes that have been connected to the blockchain relay communication network. In one embodiment, all blockchain nodes that have been connected to the blockchain relay communication network can participate in the neutrality verification process at the same time: each blockchain node serves as a source blockchain node and at the same time as a target blockchain node corresponding to other blockchain nodes, so that all blockchain nodes can achieve neutrality verification for the blockchain relay communication network to which they are connected.

[0054] Since in the process of generating neutrality verification messages, it is necessary to generate a digital signature through the identity private key of the source blockchain node, and the identity private key is usually maintained by the source blockchain node itself, the neutrality verification message is usually generated actively by the source blockchain node. Of course, if the identity private key of the source blockchain node can be handed over to other trusted objects for maintenance, then the neutrality verification message can also be generated by the trusted object and provided to the source blockchain node. The source blockchain node and the target blockchain node can respectively maintain a blockchain node list. The blockchain node list maintained by a blockchain node is usually used to record the information of all blockchain nodes in the blockchain network where the blockchain node is located. Of course, in some cases, such as when it involves cross-chain scenarios between multiple blockchain networks, the blockchain node list can also maintain the information of blockchain nodes in other blockchain networks. Therefore, the source blockchain node and the target blockchain node can belong to the same blockchain network, or they can belong to different blockchain networks. The information of the blockchain node maintained in the blockchain node list, for example, can include the node identification of the blockchain node, the public key of the node identity on the chain, the node IP and port information, etc. The on-chain node identity is generated based on an asymmetric encryption algorithm, and the on-chain node identity of each blockchain node includes an on-chain node identity public key and an on-chain node identity private key. Since the on-chain node identity is the trust basis for realizing on-chain interaction between blockchain nodes, the on-chain node identity of the blockchain node can be used to realize the generation and verification of digital signatures in this specification, such as the source blockchain node generates the above-mentioned digital signature through its own on-chain node identity private key, and the target blockchain node verifies the digital signature through the on-chain node identity public key of the source blockchain node. Of course, in addition to the on-chain node identity, the source blockchain node and the target blockchain node can use other public-private key pairs, such as the dynamic identity public-private key pair negotiated by the source blockchain node and the target blockchain node through the blockchain relay communication network. The dynamic identity public-private key pair can be specifically used for neutrality verification to realize the generation and verification of digital signatures, and this specification does not limit this.

[0055] In addition to the digital signature, the neutrality verification message also includes the first encrypted message content. The source blockchain node can encrypt the first message content by the first symmetric key to generate the above-mentioned first encrypted message content. Of course, if the source blockchain node hands over the first symmetric key to other trusted objects for maintenance, then the first encrypted message content can also be generated by the trusted object and provided to the source blockchain node. The first symmetric key is maintained by the source blockchain node and the target blockchain node respectively, and this specification does not limit the generation method of the first symmetric key. For example, the first symmetric key can be generated by a key management server (Key Management Server, KMS) and distributed to the source blockchain node and the target blockchain node. For another example, the first symmetric key can be obtained by negotiation between the source blockchain node and the target blockchain node through the key negotiation technology in the relevant technology, and the key negotiation technology here can include DH (Diffie-Hellman) algorithm, etc. For another example, the first symmetric key can be generated by either the source blockchain node or the target blockchain node, and then distributed to the other party of the source blockchain node and the target blockchain node. All blockchain nodes connected to the blockchain relay communication network can jointly maintain a unified first symmetric key; or, when these blockchain nodes are grouped (for example, nodes in the same blockchain network belong to the same group, or groups divided based on business needs, etc.), the blockchain nodes in the same group can maintain a unified first symmetric key, and the first symmetric keys of different groups are different; or, the first symmetric keys used by each blockchain node can be different. In fact, no matter what kind of first symmetric key is used, as long as the security of the first symmetric key is ensured, the blockchain relay communication network is prevented from obtaining the first symmetric key, and the target blockchain node can implement the decryption operation through the correct first symmetric key, the neutrality verification scheme of this specification can be successfully completed.

[0056] If it is determined that the source blockchain node distributes the first symmetric key to the target blockchain node, the source blockchain node sends a key distribution message to the target blockchain node through the blockchain relay communication network, and the key distribution message contains the key ciphertext encrypted by the identity public key of the target blockchain node, and the digital signature generated by the identity private key of the source blockchain node for the key ciphertext; accordingly, after receiving the key distribution message, the target blockchain node verifies the digital signature in the key distribution message according to the identity public key of the source blockchain node, and decrypts the key ciphertext with its own identity private key, and determines the decrypted symmetric key as the first symmetric key if the verification is successful. The key distribution message contains the above-mentioned key ciphertext and the digital signature for the key ciphertext. The key distribution message can be generated by the source blockchain node, or generated by other trusted objects and provided to the source blockchain node, and this specification does not limit this. If the key distribution message is generated by other trusted objects, the source blockchain node can host its own identity private key to the trusted object so that the trusted object can generate a corresponding digital signature for the key ciphertext accordingly. Among them, the source blockchain node obtains the identity public key of the target blockchain node, and uses the identity public key to encrypt the first symmetric key to be distributed based on the asymmetric encryption algorithm, thereby generating the corresponding key ciphertext. Then, since the key ciphertext can only be decrypted by the identity private key maintained by the target blockchain node, it can be safely transmitted through the blockchain relay communication network without worrying about the first symmetric key being exposed in the blockchain relay communication network. Further, the identity private key of the source blockchain node can be used to generate a digital signature for the above-mentioned key ciphertext, and the target blockchain node can verify the digital signature according to the identity public key of the source blockchain node, so as to determine whether the key ciphertext is missing or replaced during the transmission process, thereby preventing security issues caused by man-in-the-middle attacks, etc. As mentioned above, in the process of distributing the first symmetric key from the source blockchain node to the target blockchain node, the identity public-private key pair involved can be the on-chain node identity public-private key pair of the blockchain node, or it can be a negotiated dynamic identity public-private key pair, etc., and this specification does not limit this.

[0057] The above-mentioned first message content includes a neutrality verification message type identifier, which is used to indicate that the interactive message it contains is a neutrality verification message, rather than other interactive messages sent by the source blockchain node. Therefore, in the process of implementing neutrality verification, the source blockchain node can still send other interactive messages to the target blockchain node normally, such as consensus messages, block synchronization messages and other business messages, without interrupting the blockchain business, thereby reducing the impact of neutrality verification on blockchain business. In addition to the neutrality verification message type identifier, whether the first message content contains other information and what information it contains does not affect the implementation of the neutrality verification scheme of this specification.

[0058] When the source blockchain node sends a neutrality verification message through the blockchain relay communication network, it is no different from the process of transmitting messages through the blockchain relay communication network in the related art. Figure 2 Take the scenario shown as an example, Figure 2 As shown: Assume that the source blockchain node is Node A and the target blockchain node is Node B. Node A is connected to relay node a in the blockchain relay communication network, and Node B is connected to relay node b in the blockchain relay communication network. Node A can send a neutrality verification message to relay node a, and relay node a routes the neutrality verification message to relay node b, which then further sends the neutrality verification message to Node B.

[0059] In one embodiment, the blockchain relay communication network can broadcast the message to be transmitted so that all blockchain nodes connected to the blockchain relay communication network can receive the message. For example, after receiving the neutrality verification message, relay node a broadcasts the neutrality verification message in the blockchain relay communication network, and each relay node further forwards the received neutrality verification message to its connected blockchain node, such as relay node c will receive the neutrality verification message and forward it to blockchain node Node C. Of course, if a blockchain node does not participate in neutrality verification, the blockchain node may not do anything even if it receives the neutrality verification message, such as directly discarding it.

[0060] In another embodiment, the neutrality verification message may include the receiver node indication information, so that the blockchain relay communication network sends the neutrality verification message to the blockchain node corresponding to the receiver node indication information. At this time, the blockchain relay communication network will be targeted in forwarding the neutrality verification message, and will not send it to relay nodes unrelated to the target blockchain node. The receiver node indication information may include the node identifier of the target blockchain node. If there are multiple target blockchain nodes: in one case, the receiver node indication information in each neutrality verification message may be only the node identifier of a target blockchain node, and a neutrality verification message needs to be sent for each target blockchain node; in another case, the receiver node indication information in a neutrality verification message may include the node identifiers of multiple target blockchain nodes, and only one neutrality verification message needs to be sent. Alternatively, the receiver node indication information may include the set identifier of the blockchain node set to which the target blockchain node belongs, especially when multiple target blockchain nodes belong to the same blockchain node set, the length of the receiver node indication information can be reduced by the set identifier. The blockchain node set here can be pre-registered with the blockchain relay communication network. The blockchain nodes in the same blockchain node set can be all or part of the blockchain nodes in the same blockchain network, or can include blockchain nodes from multiple blockchain networks at the same time. Registration can be performed according to business needs, and the blockchain nodes contained in the blockchain node set can be added or deleted according to needs.

[0061] Each relay node in the blockchain relay communication network can maintain: the connection relationship between each relay node, and the connection relationship between each relay node and the blockchain node. Based on the above information maintained, the relay node can generate a corresponding routing strategy for message transmission. For example, when relay node a reads the recipient node indication information in the neutrality verification message, it is determined that the target blockchain node is Node B. The relay node a will determine the forwarding path between itself and the relay node b connected to the Node B, and forward the neutrality verification message to the relay node b through the forwarding path. If there is a directly connected link between relay node a and relay node b, the above forwarding path is "relay node a-relay node b", that is, relay node a can send the neutrality verification message directly to relay node b, and will not send it to relay node c. If there is no direct link between relay node a and relay node b, or the direct link fails, etc., the above forwarding path can be "relay node a-relay node c-relay node b", then relay node a can forward the neutrality verification message to relay node c; similar to relay node a, after relay node c determines that the target blockchain node is Node B, it will also determine the forwarding path between itself and relay node b connected to Node B, and forward the neutrality verification message to relay node b through the forwarding path. For example, the determined forwarding path is "relay node c-relay node b", that is, relay node c can send the neutrality verification message directly to relay node b.

[0062] If the above-mentioned blockchain node set exists, each relay node may also maintain information of each blockchain node set, including the set identifier, the blockchain nodes contained, etc. For example, when relay node a reads the receiver node indication information in the neutrality verification message, it is determined that the receiver node indication information is the set identifier SID1, and it is determined that the blockchain nodes contained in SID1 are Node B and Node C, then relay node a determines Node B and Node C as the target blockchain nodes, respectively, and routes the neutrality verification message to relay node b connected to Node B and relay node c connected to Node C, respectively, based on the method described above, which will not be repeated here.

[0063] In the above-mentioned embodiment, if the source blockchain node transmits the key distribution message to the target blockchain node through the blockchain relay communication network, the transmission process of the key distribution message can refer to the transmission process for the neutrality verification message in the above-mentioned embodiment, which will not be repeated here. It should be noted that if the same key distribution message needs to be sent to multiple target blockchain nodes, the key distribution message should contain data sets corresponding to each target blockchain node respectively: each data set includes a key ciphertext generated by the identity public key of the corresponding target blockchain node and a corresponding digital signature. Assuming that Node A wants to distribute the first symmetric key to Node B and Node C, the key distribution message includes a data set M1 corresponding to Node B and a data set M2 corresponding to Node C, wherein: M1 includes a key ciphertext enc_key_B generated by the identity public key of Node B and a corresponding digital signature enc_key_B_sign, and M2 includes a key ciphertext enc_key_C generated by the identity public key of Node C and a corresponding digital signature enc_key_C_sign. Accordingly, after receiving the key distribution message, each target blockchain node needs to find its corresponding data set in order to implement the decryption and verification described above. Each data set may include the node identifier of the corresponding target blockchain node, so that each target blockchain node can accurately find its corresponding data set; alternatively, the data set may not include the node identifier of the corresponding target blockchain node, and each target blockchain node needs to try each data set separately until it finds its corresponding data set.

[0064] In one embodiment, the blockchain nodes that have been connected to the blockchain relay communication network can regularly implement the neutrality verification scheme of this specification to perform neutrality verification on the blockchain relay communication network. In another embodiment, each blockchain node can initiate neutrality verification for the blockchain relay network at any time, for example, when a blockchain node has just been connected to the blockchain relay communication network, or when a blockchain node has doubts about the neutrality of the blockchain relay communication network during operation, the above neutrality verification can be initiated. When a blockchain node wishes to initiate the above neutrality verification, the blockchain node can switch from the normal mode to the neutrality verification mode, so as to operate in the role of the source blockchain node in this specification. During operation, the source blockchain node can send a neutrality verification request to the target blockchain node through the blockchain relay communication network, and realize other functions related to the source blockchain node in this specification. Correspondingly, the target blockchain node switches from the normal mode to the neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message sent by the source blockchain node. Among them, when running in neutrality verification mode, the blockchain node can not only continue to complete the message interaction and processing functions in normal mode, such as sending, receiving and processing consensus messages, block synchronization messages, etc., but also implement the neutrality verification scheme in this manual.

[0065] By setting different operation modes such as normal mode and neutrality verification mode for blockchain nodes, blockchain nodes can choose whether to participate in neutrality verification according to actual conditions. For example, they can avoid participating in neutrality verification to reduce the impact on their own business. Of course, the selection of the above operation mode may not be necessary. For example, all blockchain nodes can run in neutrality verification mode by default, so as to realize neutrality verification of the blockchain relay communication network at any time.

[0066] Step 104, the target blockchain node verifies the digital signature contained in the received interaction message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interaction message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node performs data volume statistics for the interaction messages received within a preset time period and successfully verified by the identity public key of the source blockchain node, to obtain the received data volume.

[0067] After receiving the neutrality verification message, the target blockchain node can obtain the encrypted message content and digital signature contained in the neutrality verification message respectively. As mentioned above, the target blockchain node can obtain the on-chain node identity public key of the source blockchain node, or other types of identity public keys such as the dynamic identity public key of the source blockchain node from the blockchain node list maintained by itself according to the node identifier of the source blockchain node, so as to verify the above-mentioned digital signature. Since it is defined in the neutrality verification message that the digital signature is generated for the encrypted message content, the target blockchain node will complete the verification of the digital signature according to the encrypted message content. If the verification is successful, it indicates that the neutrality verification message is indeed from the source blockchain node, and there is no data loss during the transmission process, and there is no man-in-the-middle attack. If the verification fails, it indicates that there is an abnormality in at least one of the encrypted message content and the digital signature, and the target blockchain node can discard or return an alarm message.

[0068] The neutrality verification message may include the sender node identification information, which is used to record the node identification of the blockchain node as the sender. Therefore, in the neutrality verification message sent by the source blockchain node, the sender node identification information is taken as the node identification of the source blockchain node. Correspondingly, the target blockchain node can extract the node identification of the source blockchain node from the sender node identification information, and determine the identity public key corresponding to the source blockchain node based on the extracted node identification, and then verify the digital signature in the neutrality verification message based on the determined identity public key.

[0069] Of course, the sender node identification information in the neutrality verification message is only a way to indicate the sender node identity. The target blockchain node can also obtain the sender node identity in other ways, and this specification does not limit this. For example, after obtaining the neutrality verification message, the blockchain relay communication network can encapsulate the neutrality verification message as a relay message and transmit the relay message in the blockchain relay communication network. Among them, the node identification of the source blockchain node can be encapsulated in the relay message, and the node identification of the source blockchain node can be unsealed from the relay message by the blockchain relay communication network to inform the target blockchain node. Specifically, take the above-mentioned Node A to Node B distribution of keys as an example: after receiving the neutrality verification message sent by Node A, the relay node a encapsulates the neutrality verification message as a relay message, and the node identification of Node A will be added to the relay message during the encapsulation process. Correspondingly, after receiving the relay message, the relay node b can obtain the node identification of Node A by unsealing, and send the node identification and the neutrality verification message to NodeB together, so that NodeB knows that the neutrality verification message comes from Node A.

[0070] The target blockchain node can decrypt the encrypted message content through the first symmetric key maintained by itself. As mentioned above, if all blockchain nodes connected to the blockchain relay communication network maintain a unified first symmetric key, then the target blockchain node can directly use the first symmetric key to decrypt the encrypted message content. If the first symmetric keys maintained by all blockchain nodes connected to the blockchain relay communication network are not unified, then the target blockchain node needs to determine the node identifier of the source blockchain node in the aforementioned manner, and determine the first symmetric key corresponding to the source blockchain node and decrypt the above-mentioned encrypted message content. The target blockchain node can maintain the correspondence between the node identifier and the first symmetric key in advance, so as to determine the first symmetric key required to be adopted according to the node identifier of the source blockchain node. The target blockchain node can maintain the correspondence between the set identifier and the first symmetric key in advance, so as to determine the set identifier to which the source blockchain node belongs according to the node identifier of the source blockchain node, and then determine the first symmetric key required to be adopted according to the set identifier. In short, based on the correspondence maintained by the target blockchain node, the target blockchain node can always accurately obtain the first symmetric key required to be adopted, thereby realizing the decryption operation of the above-mentioned encrypted message content.

[0071] As mentioned above, the source blockchain node will send other types of interactive messages at the same time as sending the neutrality verification message. If other types of interactive messages are also sent encrypted, then after receiving the interactive message, the target blockchain node will not be able to directly determine whether the interactive message is a neutrality verification message or other types of interactive messages. Therefore, the target blockchain node needs to decrypt the encrypted message content in the received interactive message by using the first symmetric key, and determine that the received interactive message is the above-mentioned neutrality verification message when the decrypted message content contains the neutrality verification message type identifier. If the decrypted message content does not contain the neutrality verification message type identifier, the target blockchain node confirms that the received interactive message is not a neutrality verification message. Of course, for interactive messages that are not neutrality verification messages, the target blockchain node can respond to and process the interactive message in accordance with relevant technologies, which will not be repeated here.

[0072] If the signature verification is successful and the decrypted message content contains the neutrality verification message type identifier, the target blockchain node can be considered to have received the neutrality verification message from the source blockchain node, and therefore returns a receipt confirmation message to the source blockchain node through the blockchain relay communication network. For the transmission process of the receipt confirmation message, you can refer to the transmission process of the neutrality verification message mentioned above, except that the sender and the receiver are swapped, which does not affect the transmission principle, so it will not be repeated here.

[0073] The reception confirmation message can be a plain text message. In order to improve security, the reception confirmation message can be transmitted privately. For example, the reception confirmation message may include the second encrypted message content generated by encrypting the second message content with the second symmetric key and the digital signature generated by the identity private key of the target blockchain node for the second encrypted message content, and the second message content includes the reception confirmation message type identifier. Accordingly, when the source blockchain node receives the interactive message from the target blockchain node, it verifies the digital signature contained in the received interactive message according to the identity public key of the target blockchain node. If the verification passes, it confirms that the interactive message comes from the target blockchain node. Furthermore, if the target blockchain node also sends business messages or other types of interactive messages such as those described above at the same time, and these interactive messages are also transmitted privately, then the source blockchain node needs to use the second symmetric key to decrypt the encrypted message content contained in the interactive message. If the decrypted message content contains the above-mentioned reception confirmation message type identifier, it can be confirmed that the received interactive message is the above-mentioned reception confirmation message. It can be seen that in the scenario of private transmission, the source blockchain node can determine that it has received the reception confirmation message sent by the target blockchain node when the signature verification is successful and the decrypted message content contains the reception confirmation message type identifier, so the reception time of the interactive message can be confirmed as the reception time of the reception confirmation message, which is used to calculate the round-trip time (RTT) of the blockchain relay communication network in the following text. In order to ensure the accuracy of RTT calculation, the target blockchain node can return the reception confirmation message immediately after confirming the receipt of the neutrality verification message from the source blockchain node, that is, the target blockchain node will not actively cause unnecessary waiting or delay, so as to return the reception confirmation message as soon as possible.

[0074] The second symmetric key may be the same as the first symmetric key. Of course, the second symmetric key may also be different from the first symmetric key, but the generation method of the second symmetric key may refer to the generation method of the first symmetric key described above, such as negotiation between the source blockchain node and the target blockchain node, distribution by the key management server, distribution from the target blockchain node to the source blockchain node, etc., which will not be described one by one here, and this specification does not limit this.

[0075] The target blockchain node may receive interactive messages sent by multiple blockchain nodes at the same time. By verifying the digital signature contained in the interactive message, the target blockchain node can distinguish and confirm the sender of the interactive message, and perform data volume statistics for the interactive messages received within the preset time period and the sender is the source blockchain node, and obtain the received data volume. If the neutrality verification is periodic, then the statistics of the received data volume by the target blockchain node can also be periodic, and the above-mentioned preset time period can be each statistical period. If the neutrality verification is non-periodic, for example, initiated under the trigger of the source blockchain node, then the target blockchain node can start the statistics when confirming that the neutrality verification has been initiated or receiving the first neutrality verification message from the source blockchain node, and the preset time period is the time period defined by the time when the statistics are started (i.e., the start time) and the preset duration. Among them, the above-mentioned "first" refers to the first in the current neutrality verification process, and does not only refer to the first in history.

[0076] As mentioned above, in the process of implementing neutrality verification, the interactive messages sent by the source blockchain node to the target blockchain node may include other types of messages in addition to neutrality verification messages. In the statistical process, the target blockchain node can either count the neutrality verification messages or all types of interactive messages, and this specification does not limit this. If only the neutrality verification messages are counted, the source blockchain node can appropriately increase the number of neutrality verification messages sent so that the amount of received data counted for the neutrality verification message has statistical significance. Of course, if statistics are taken for all types of interactive messages, the source blockchain node does not need to send a lot of neutrality verification messages. In this way, on the one hand, other types of interactive messages can provide enough data to make the counted received data have statistical significance. On the other hand, it can avoid excessive neutrality verification messages from having a greater impact on other types of interactive messages, that is, reduce the impact of neutrality verification on normal business.

[0077] Step 106, the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0078] The neutrality verification message sent by the source blockchain node to the target blockchain node may be one or more, and this specification does not limit this. If the source blockchain node sends multiple neutrality verification messages to the target blockchain node through the blockchain relay communication network, then when calculating the above-mentioned round-trip delay, the source blockchain node can calculate the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the above-mentioned blockchain relay communication network. Among them, the above-mentioned multiple neutrality verification messages can be sent periodically by the source blockchain node within the aforementioned preset time period, so that the transmission of multiple neutrality verification messages can be amortized at different times within the preset time period, which can not only avoid the adverse impact of concentrated sending to normal business, but also can respectively know the delay of the blockchain relay communication network at different times, which is conducive to improving the accuracy of the calculated round-trip delay.

[0079] If the source blockchain node sends multiple neutrality verification messages during the neutrality verification process, then the source blockchain node can wait for the receipt confirmation message returned by the target blockchain node after sending each neutrality verification message, and then send the next neutrality verification message, so as to avoid confusion between the correspondence between the neutrality verification message and the receipt confirmation message, such as calculating the round-trip delay together with the sending time of the previous neutrality verification message and the receiving time of the next receipt confirmation message, so as to prevent the miscalculation of the round-trip delay. Alternatively, the message content of the neutrality verification message can include a message number, and when the target blockchain node obtains the receipt confirmation message corresponding to the neutrality verification message, the message content of the receipt confirmation message can also include the same message number, so that the source blockchain node can accurately identify the correspondence between the neutrality verification message and the receipt confirmation message according to the message number, so that the source blockchain node can send the neutrality verification message at any time without waiting for the receipt confirmation message.

[0080] Based on the actual environment between the source blockchain node and the target blockchain node, the normal delay when transmitting messages between the two can be known. Therefore, when the round-trip delay determined by the source blockchain node matches the normal delay, it means that the blockchain relay communication network does not intentionally cause delays to the transmitted messages, and the delay rationality is met. At the same time, when the amount of data sent by the source blockchain node in a preset time period is consistent with the amount of data received by the target blockchain node in the preset time period, it indicates that the blockchain relay communication network does not intentionally discard data during the transmission process, ensuring data integrity. By adopting encryption and decryption technology, it can be ensured that the blockchain relay communication network cannot know the content of the message and avoid fraud, and by adopting digital signature technology, it can be ensured that the target blockchain node accurately identifies the interactive messages from the source blockchain node, and verifies whether there are missing or replacement problems during the message transmission process, thereby ensuring data privacy and data correctness.

[0081] To summarize, this specification verifies the blockchain relay communication network from multiple dimensions such as data privacy, data correctness, data integrity and delay rationality, so as to comprehensively and reasonably determine the neutrality of the blockchain relay communication network.

[0082] Figure 3 This is a flowchart of a neutrality verification method of a blockchain relay communication network based on a source blockchain node side provided by an exemplary embodiment. Figure 3 As shown, the method may include:

[0083] Step 302: Obtain a neutrality verification message, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier.

[0084] Step 304, sending the neutrality verification message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network when the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and, performs data volume statistics for the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume.

[0085] Step 306, calculating the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and comparing the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0086] As described above, the method also includes: obtaining a key distribution message, the key distribution message including a key ciphertext encrypted by the identity public key of the target blockchain node with the first symmetric key, and a digital signature generated for the key ciphertext by the identity private key of the source blockchain node; sending the key distribution message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: after receiving the key distribution message, verifies the digital signature in the key distribution message according to the identity public key of the source blockchain node, and decrypts the key ciphertext with its own identity private key, and if the verification is successful, determines the decrypted symmetric key as the first symmetric key.

[0087] As mentioned above, the public and private key pairs of the source blockchain node and the target blockchain node include any of the following:

[0088] The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node;

[0089] The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

[0090] As mentioned above, the reception confirmation message includes the second encrypted message content generated by encrypting the second message content by the second symmetric key and the digital signature generated by the identity private key of the target blockchain node for the second encrypted message content, and the second message content includes the reception confirmation message type identifier; the method also includes:

[0091] The source blockchain node verifies the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypts the encrypted message content contained in the interaction message with the second symmetric key, and if the verification is successful and the decrypted message content contains the reception confirmation message type identifier, the reception time of the interaction message is confirmed as the reception time of the reception confirmation message.

[0092] As mentioned earlier,

[0093] The sending of a neutrality verification message to a target blockchain node through a blockchain relay communication network includes: sending a plurality of neutrality verification messages to the target blockchain node through the blockchain relay communication network;

[0094] The round-trip delay of the blockchain relay communication network is calculated according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: calculating the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

[0095] As mentioned above, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

[0096] As mentioned above, the neutrality verification message contains recipient node indication information, and the recipient node indication information includes: the node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

[0097] As described above, the method also includes: sending a neutrality verification request to the target blockchain node through the blockchain relay communication network, so that the target blockchain node switches from the normal mode to the neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message.

[0098] exist Figure 1 In the illustrated embodiment, the interaction process between the source blockchain node and the target blockchain node has been described in detail. Figure 3 The illustrated embodiment describes the contents involved in the interaction process from the perspective of the source blockchain node. For relevant details and explanations, reference can be made to the aforementioned interaction process and will not be repeated here.

[0099] Figure 4 This is a flowchart of a neutrality verification method based on a blockchain relay communication network on the target blockchain node side provided by an exemplary embodiment. Figure 4 As shown, the method may include:

[0100] Step 402: receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content by an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier.

[0101] Step 404: Verify the digital signature contained in the received interaction message according to the identity public key of the source blockchain node, and use the first symmetric key to decrypt the encrypted message content contained in the interaction message, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message.

[0102] Step 406, for the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node, data volume statistics are performed to obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0103] As mentioned above, the method further comprises:

[0104] Receive a key distribution message sent by the source blockchain node through the blockchain relay communication network, wherein the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node using the first symmetric key, and a digital signature generated for the key ciphertext using the identity private key of the source blockchain node;

[0105] The digital signature in the key distribution message is verified according to the identity public key of the source blockchain node, and the key ciphertext is decrypted with its own identity private key, and if the verification is successful, the decrypted symmetric key is determined as the first symmetric key.

[0106] As mentioned above, the public and private key pairs of the source blockchain node and the target blockchain node include any of the following:

[0107] The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node;

[0108] The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

[0109] As mentioned above, the reception confirmation message includes the second encrypted message content generated by encrypting the second message content by the second symmetric key and the digital signature generated by the identity private key of the target blockchain node for the second encrypted message content, and the second message content contains the reception confirmation message type identifier; the reception confirmation message is used to enable the source blockchain node to: verify the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypt the encrypted message content contained in the interaction message with the second symmetric key, and when the verification is successful and the decrypted message content contains the reception confirmation message type identifier, confirm the reception time of the interaction message as the reception time of the reception confirmation message.

[0110] As mentioned earlier,

[0111] Receiving a neutrality verification message sent by the source blockchain node through the blockchain relay communication network, comprising: receiving a plurality of neutrality verification messages sent by the source blockchain node through the blockchain relay communication network;

[0112] The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: the source blockchain node calculates the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

[0113] As mentioned above, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

[0114] As mentioned above, the neutrality verification message contains recipient node indication information, and the recipient node indication information includes: the node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

[0115] As mentioned above, the method further comprises:

[0116] Receiving a neutrality verification request sent by the source blockchain node through the blockchain relay communication network;

[0117] The neutrality verification mode is switched from the normal mode to the neutrality verification mode according to the received neutrality verification request, so as to respond to the neutrality verification message.

[0118] exist Figure 1 In the illustrated embodiment, the interaction process between the source blockchain node and the target blockchain node has been described in detail. Figure 4 The illustrated embodiment describes the contents involved in the interaction process from the perspective of the target blockchain node. For relevant details and explanations, reference can be made to the aforementioned interaction process and will not be repeated here.

[0119] The following is Figure 2 Take the blockchain nodes Node A and Node B as examples, combined with Figure 5 The neutrality verification scheme of this manual is described. Figure 5 FIG. 1 is an interactive flow chart of neutrality verification provided by an exemplary embodiment. Figure 5As shown, assuming that Node A wants to verify the neutrality of the blockchain relay communication network it is connected to, NodeB is any other blockchain node that has been connected to the blockchain relay communication network, and the NodeB cooperates with NodeA to complete the verification process. In the following interaction process, the interaction between NodeA and NodeB is realized through the blockchain relay communication network, and the interaction process between blockchain nodes Node A and Node B can include the following steps:

[0120] Step 501, Node A distributes private_key to NodeB.

[0121] Node A can generate a symmetric key as the private_key by any key generation algorithm in the related art. Of course, the private_key can be temporarily generated when Node A wants to distribute keys, or can be selected by Node A from a previously generated key set, which is not limited in this specification.

[0122] Node A can complete the key distribution by sending a key distribution message to NodeB, and the key distribution message can be, for example, the following PrivateKeyMsg. For example, after Node A determines to distribute the above-mentioned private_key to Node B, it can obtain Node B's on-chain node identity public key Pub_key_B from the blockchain node list maintained by itself, and asymmetrically encrypt the private_key through Pub_key_B to obtain the corresponding key ciphertext enc_private_key. In order to prevent man-in-the-middle attacks, Node A can sign enc_private_key with its own on-chain node identity private key Pri_key_A to generate the corresponding digital signature enc_private_key_sign. In addition, Node A can also determine the corresponding version number private_key_ver for the private_key distributed this time to distinguish it from other keys distributed by Node A. It should be pointed out that in addition to encryption and decryption and signature verification through the on-chain node identity information of Node A and Node B, it can also be achieved through other public-private key pairs, such as dynamic public-private key pairs negotiated by Node A and Node B, and this manual does not limit this.

[0123] Based on the above information, Node A can generate a neutrality verification message PrivateKeyMsg, which can include the following fields:

[0124]

[0125] The node_id_from field is used to fill in the node ID of Node A, and the node_id_to field is used to fill in the node ID of Node B. The encrypted_symetric_private_key field is used to fill in the key ciphertext, that is, the above enc_private_key. The enc_private_key_sign field is used to fill in the digital signature for the key ciphertext. The private_key_ver field is used to fill in the version number of the key private_key.

[0126] Node A sends PrivateKeyMsg to Node B through the blockchain relay communication network. Node A first sends PrivateKeyMsg to the relay node a to which it is connected, and relay node a directly or indirectly sends PrivateKeyMsg to relay node b based on the routing strategy, and then relay node b sends PrivateKeyMsg to Node B. Since enc_private_key is always in ciphertext state and only Node B maintains the decryption key (Node B's on-chain node identity private key Pri_key_B), relay node a, relay node b and other relay nodes in the blockchain relay communication network cannot know the plaintext private_key.

[0127] Correspondingly, Node B verifies the enc_private_key_sign in PrivateKeyMsg and decrypts enc_private_key. For example, after receiving PrivateKeyMsg, Node B obtains the on-chain node identity public key corresponding to the node ID from the blockchain node list maintained by itself according to the node ID extracted from the node_id_from field, so as to verify the enc_private_key_sign. If there is no abnormality in the transmission process of PrivateKeyMsg, Node B will extract the node ID of Node A from the node_id_from field, and then obtain its on-chain node identity public key Pub_key_A, and then verify the enc_private_key_sign according to the Pub_key_A and the enc_private_key in PrivateKeyMsg.

[0128] During the signature verification process, Node B can decrypt enc_private_key according to its own on-chain node identity private key Pri_key_B. Node B can also perform decryption only when the signature verification is successful, and this manual does not limit this. Of course, even if the signature verification and decryption are implemented in parallel, Node B will only recognize the decrypted private_key when the signature verification is successful.

[0129] When the enc_private_key_sign is successfully verified, Node B determines that the private_key obtained by decryption is the symmetric key distributed by Node A, and associates the private_key with Node A. For example, Node B can associate and store the private_key, private_key_ver and the node ID of Node A. In addition, Node B returns a PrivateKeyRespMsg message to Node A through the blockchain relay communication network, indicating to Node A that it has successfully obtained the distributed key private_key. Among them, PrivateKeyRespMsg can include the following fields:

[0130]

[0131] The node_id_from field is used to fill in the node ID of Node B, and the node_id_to field is used to fill in the node ID of Node A. The node_id_from_sign is a digital signature generated by Node B using its own on-chain node identity private key Pri_key_B to sign the content of the node_id_from field (i.e., the node ID of Node B). The private_key_ver field is the version number information of the private_key recorded by Node B.

[0132] Node B first sends the PrivateKeyRespMsg to the relay node b to which it is connected, and the relay node b directly or indirectly sends the PrivateKeyRespMsg to the relay node a based on the routing policy, and then the relay node a sends the PrivateKeyRespMsg to Node A.

[0133] After receiving PrivateKeyRespMsg, Node A obtains the on-chain node identity public key corresponding to the node ID from the blockchain node list maintained by itself according to the node ID extracted from the node_id_from field, so as to verify the node_id_from_sign. If there is no abnormality in the transmission process of PrivateKeyRespMsg, Node A will extract the node ID of Node B from the node_id_from field, and then obtain its on-chain node identity public key Pub_key_B, and then verify the node_id_from_sign according to the Pub_key_B and the node_id_from in PrivateKeyRespMsg. If the verification is successful, Node A can determine that the PrivateKeyRespMsg comes from Node B, and thus determine that the private_key has been successfully distributed to Node B.

[0134] Step 502a, Node A records the amount of data sent and the time of sending.

[0135] Step 502b: Node A sends a neutrality verification message to Node B.

[0136] The order of step 502a and step 502b can be swapped without affecting the implementation of the solution.

[0137] Assuming that Node A wants to perform neutrality verification on the blockchain relay communication network, Node A and Node B can switch to neutrality verification mode so that Node A and Node B can perform operations related to neutrality verification. For example, Node A generates a neutrality verification message NeutralVerifyMsg, which may include the following fields:

[0138]

[0139] The node_id_from field is used to fill in the node ID of Node A, and the node_id_to field is used to fill in the node ID of Node B. The encrypted_raw_data field is used to fill in the encrypted message content enc_raw_data, and the encrypted_raw_data_sign is the signature for the encrypted message content enc_raw_data.

[0140] When generating the above-mentioned NeutralVerifyMsg, Node A first obtains the plaintext message content raw_data, which contains at least the neutrality verification message type identifier. Then, Node A can encrypt the message content raw_data by the aforementioned symmetric key private_key to generate the above-mentioned encrypted message content enc_raw_data. Furthermore, Node A signs the encrypted message content enc_raw_data using its own identity private key to generate the corresponding digital signature encrypted_raw_data_sign.

[0141] The sending time recorded by Node A is the time when Node A sends NeutralVerifyMsg. The amount of data sent recorded by Node A can be the sum of the data volume of all interactive messages sent by Node A to Node B within a preset time period. The interactive messages here include both the above-mentioned NeutralVerifyMsg and other types of business messages such as consensus messages and block synchronization messages, which can ensure that the statistical amount of sent data is large enough and comparable.

[0142] Node A continuously records the amount of data sent. Therefore, Node A's action of recording the amount of data sent is not only to record the amount of data sent by NeutralVerifyMsg, but also to accumulate the amount of data sent by all interactive messages within the preset time period, until the sum of the amount of data sent by all interactive messages within the preset time period is finally obtained.

[0143] Step 503: Node B verifies the signature and decrypts the received interaction message.

[0144] When Node B receives an interactive message from the blockchain relay communication network, it cannot directly determine whether the interactive message is a NeutralVerifyMsg because the message content of the interactive message is encrypted. At the same time, although the node_id_from field contains the node identifier of Node A, Node B needs to verify this.

[0145] Therefore, Node B first obtains Node A's identity public key, and uses the identity public key to verify the digital signature encrypted_raw_data_sign contained in the interactive message. If the verification is successful, Node B can confirm that the interactive message comes from Node A, and the content of the interactive message is complete and correct. Then, Node B decrypts the encrypted message content enc_raw_data according to the aforementioned symmetric key private_key: If the decryption is successful, and the decrypted message content contains the aforementioned neutrality verification message type identifier, Node B confirms that the interactive message is a neutrality verification message. Combined with the results of signature verification and decryption, Node B can confirm whether the received interactive message is the NeutralVerifyMsg sent by Node A.

[0146] Step 504a: Node B sends a reception confirmation message to Node A.

[0147] Step 504b: Node B counts the amount of received data.

[0148] The order of step 504a and step 504b can be swapped without affecting the implementation of the solution.

[0149] After confirming that the NeutralVerifyMsg from Node A has been received, Node B may immediately return a reception confirmation message NeutralVerifyRespMsg to Node A, which may include the following fields, for example:

[0150]

[0151] The node_id_from field is used to fill in the node ID of Node B, and the node_id_to field is used to fill in the node ID of Node A. The encrypted_raw_data_Resp field is used to fill in the encrypted message content enc_raw_data_Resp, and the encrypted_raw_data_Resp_sign is the signature for the encrypted message content enc_raw_data_Resp.

[0152] When generating the above-mentioned NeutralVerifyRespMsg, Node B first obtains the plaintext message content raw_data_Resp, which contains at least the reception confirmation message type identifier. Then, Node B can encrypt the message content raw_data_Resp by the aforementioned symmetric key private_key to generate the above-mentioned encrypted message content enc_raw_data_Resp. Further, Node B signs the encrypted message content enc_raw_data_Resp using its own identity private key to generate the corresponding digital signature encrypted_raw_data_Resp_sign.

[0153] When Node A receives an interactive message from the blockchain relay communication network, it cannot directly determine whether the interactive message is a NeutralVerifyRespMsg because the message content of the interactive message is in an encrypted state. At the same time, although the node_id_from field contains the node identifier of Node B, Node A needs to verify this. Therefore, Node A first obtains the identity public key of Node B, and verifies the digital signature encrypted_raw_data_Resp_sign contained in the interactive message through the identity public key. If the verification is successful, Node A can confirm that the interactive message comes from NodeB and the content of the interactive message is complete and correct. Then, Node A decrypts the encrypted message content enc_raw_data_Resp according to the aforementioned symmetric key private_key: If the decryption is successful, and the decrypted message content contains the aforementioned reception confirmation message type identifier, Node A confirms that the interactive message is a reception confirmation message. Combined with the results of signature verification and decryption, Node A can confirm whether the received interactive message is a NeutralVerifyRespMsg sent by Node B.

[0154] After confirming receipt of the NeutralVerifyRespMsg from Node B, Node A confirms the reception time of the NeutralVerifyRespMsg. In fact, Node A can record the corresponding reception time of each interactive message when it is received, and then confirm the reception time corresponding to the NeutralVerifyRespMsg when confirming that a certain interactive message is a NeutralVerifyRespMsg through signature verification and decryption operations.

[0155] The amount of data sent recorded by Node B can be the sum of the data amounts of all interactive messages received by Node B from Node A within the preset time period. The interactive messages here include the above-mentioned NeutralVerifyMsg, as well as other types of business messages such as consensus messages and block synchronization messages, which can ensure that the statistically calculated amount of data sent is large enough and comparable. Node B records the amount of data sent continuously. Therefore, the action of Node B recording the amount of data sent does not only record the amount of data of NeutralVerifyMsg, but refers to the accumulation of the data amount of all interactive messages within the above-mentioned preset time period until the sum of the data amount of all interactive messages within the preset time period is finally obtained.

[0156] Step 505: Node B sends the received data volume to Node A.

[0157] Step 506: Node A calculates the RTT and compares the data volume.

[0158] Node B may send the statistically obtained amount of received data to Node A at any time after the above-mentioned preset time period ends. Of course, Node A may also initiate an acquisition request to Node B, so that Node B returns the above-mentioned amount of received data in response to the acquisition request. Therefore, in some cases, the step of calculating the RTT by Node A in step 506 may be earlier than step 505, and can be adjusted according to actual conditions.

[0159] As mentioned above, Node A can count the amount of data sent by the interactive messages it sends within a preset time period. At the same time, Node A can obtain the amount of received data counted by Node B through step 505. Therefore, Node A can compare the amount of data sent with the amount of data received: if the two are consistent, it indicates that the blockchain relay communication network did not discard data during the message transmission process; otherwise, it indicates that the blockchain relay communication network has discarded data, and it is determined that it is not neutral. Among them, when the amount of data sent and the amount of data received are exactly the same, the two can be judged to be consistent; or, when the difference between the amount of data sent and the amount of data received is not greater than the preset value, the two can be judged to be consistent, which can be set according to actual needs.

[0160] Based on the difference between the sending time and the receiving time mentioned above, Node A can determine the RTT formed when the blockchain relay communication network transmits NeutralVerifyMsg and NeutralVerifyRespMsg. If Node A sends multiple NeutralVerifyMsgs within a preset time period, Node A can obtain multiple sets of sending times and receiving times, and can calculate the average of the RTT calculated from these time data as the final RTT of the blockchain relay communication network. When the value of RTT is not greater than the preset delay, Node A can determine that the delay of the blockchain relay communication network is reasonable; otherwise, it indicates that the blockchain relay communication network deliberately delays message transmission and is judged to be non-neutral.

[0161] In addition, the use of encryption and decryption technology can ensure that the blockchain relay communication network cannot know the message content and avoid fraud. The use of digital signature technology can ensure that Node B accurately identifies the interactive messages from Node A and verifies whether there are any missing or replacement problems during the message transmission process, thereby ensuring data privacy and data correctness.

[0162] To sum up, through the technical solution of this specification, blockchain nodes can verify the blockchain relay communication network from multiple dimensions such as data privacy, data correctness, data integrity and delay rationality, so as to comprehensively and reasonably determine the neutrality of the blockchain relay communication network.

[0163] Figure 6 Schematic diagram of a neutrality verification system for a blockchain relay communication network provided by an exemplary embodiment. Figure 6 As shown, the system may include: a source blockchain node 601 and a target blockchain node 602; wherein:

[0164] The source blockchain node 601 may send a neutrality verification message to the target blockchain node 602 through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node 601, and the first message content includes a neutrality verification message type identifier;

[0165] The target blockchain node 602 may verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node 601, and decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node 601 through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node 602 may perform data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node 601, to obtain the received data volume;

[0166] The source blockchain node 601 can calculate the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compare the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node 602 through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node 601 and the target blockchain node 602, and the received data volume is consistent with the sent data volume.

[0167] Optional,

[0168] The source blockchain node 601 may send a key distribution message to the target blockchain node 602 through the blockchain relay communication network, wherein the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node 602 with the first symmetric key, and a digital signature generated for the key ciphertext by the identity private key of the source blockchain node 601;

[0169] After receiving the key distribution message, the target blockchain node 602 can verify the digital signature in the key distribution message according to the identity public key of the source blockchain node 601, and decrypt the key ciphertext with its own identity private key, and if the verification is successful, determine the decrypted symmetric key as the first symmetric key.

[0170] Optionally, the public and private key pairs of the source blockchain node 601 and the target blockchain node 602 include any of the following:

[0171] The public and private key pairs of the on-chain node identities of the source blockchain node 601 and the target blockchain node 602;

[0172] The source blockchain node 601 and the target blockchain node 602 negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

[0173] Optionally, the reception confirmation message includes second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node 602, and the second message content includes a reception confirmation message type identifier;

[0174] The source blockchain node 601 can verify the digital signature contained in the received interaction message according to the identity public key of the target blockchain node 602, and use the second symmetric key to decrypt the encrypted message content contained in the interaction message, and when the verification is successful and the decrypted message content contains the reception confirmation message type identifier, the reception time of the interaction message is confirmed as the reception time of the reception confirmation message.

[0175] Optional,

[0176] The source blockchain node 601 may send a neutrality verification message to the target blockchain node 602 through the blockchain relay communication network, including: the source blockchain node 601 sends multiple neutrality verification messages to the target blockchain node 602 through the blockchain relay communication network;

[0177] The source blockchain node 601 can calculate the round-trip delay of the blockchain relay communication network based on the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: the source blockchain node 601 calculates the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

[0178] Optionally, the multiple neutrality verification messages are periodically sent by the source blockchain node 601 within the preset time period.

[0179] Optionally, the neutrality verification message includes recipient node indication information, and the recipient node indication information includes: the node identifier of the target blockchain node 602, or the set identifier of the blockchain node set to which the target blockchain node 602 belongs.

[0180] Optional:

[0181] The source blockchain node 601 may send a neutrality verification request to the target blockchain node 602 through the blockchain relay communication network;

[0182] The target blockchain node 602 can switch from the normal mode to the neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message.

[0183] Figure 7 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 7 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0184] Please refer to Figure 8 , the neutrality verification device of the blockchain relay communication network can be applied to Figure 7 In the device shown, for example, the device can be a source blockchain node to implement the technical solution of this specification. Among them, the neutrality verification device of the blockchain relay communication network can include:

[0185] An acquisition unit 801 is used to acquire a neutrality verification message, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content with an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0186] The sending unit 802 is used to send the neutrality verification message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network when the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and, performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume;

[0187] The processing unit 803 is used to calculate the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compare the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0188] Optional,

[0189] The acquisition unit 801 is further used to: acquire a key distribution message, wherein the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node using the first symmetric key, and a digital signature generated for the key ciphertext using the identity private key of the source blockchain node;

[0190] The sending unit 802 is also used to: send the key distribution message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: after receiving the key distribution message, verifies the digital signature in the key distribution message according to the identity public key of the source blockchain node, and decrypts the key ciphertext with its own identity private key, and determines the decrypted symmetric key as the first symmetric key if the verification is successful.

[0191] Optionally, the public and private key pairs of the source blockchain node and the target blockchain node include any of the following:

[0192] The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node;

[0193] The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

[0194] Optionally, the reception confirmation message includes second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node, and the second message content includes a reception confirmation message type identifier; the device also includes:

[0195] The processing unit 803 is also used to: verify the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and use the second symmetric key to decrypt the encrypted message content contained in the interaction message, and when the verification is successful and the decrypted message content contains the reception confirmation message type identifier, confirm the reception time of the interaction message as the reception time of the reception confirmation message.

[0196] Optional,

[0197] The sending of a neutrality verification message to a target blockchain node through a blockchain relay communication network includes: sending a plurality of neutrality verification messages to the target blockchain node through the blockchain relay communication network;

[0198] The round-trip delay of the blockchain relay communication network is calculated according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: calculating the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

[0199] Optionally, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

[0200] Optionally, the neutrality verification message includes recipient node indication information, and the recipient node indication information includes: the node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

[0201] Optional,

[0202] The sending unit 802 is also used to: send a neutrality verification request to the target blockchain node through the blockchain relay communication network, so that the target blockchain node switches from the normal mode to the neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message.

[0203] Please refer to Fig. 9 , the neutrality verification device of the blockchain relay communication network can be applied to Figure 7 In the device shown, for example, the device can be a target blockchain node to implement the technical solution of this specification. Among them, the neutrality verification device of the blockchain relay communication network can include:

[0204] A message receiving unit 901 is used to receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content by an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier;

[0205] The message processing unit 902 is used to verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and to decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message;

[0206] The data volume statistics unit 903 is used to perform data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node, and obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

[0207] Optional,

[0208] The message receiving unit 901 is also used to: receive a key distribution message sent by the source blockchain node through the blockchain relay communication network, wherein the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node with the first symmetric key, and a digital signature generated by the identity private key of the source blockchain node for the key ciphertext;

[0209] The message processing unit 902 is also used to verify the digital signature in the key distribution message according to the identity public key of the source blockchain node, and to decrypt the key ciphertext with its own identity private key, and if the verification is successful, determine the decrypted symmetric key as the first symmetric key.

[0210] Optionally, the public and private key pairs of the source blockchain node and the target blockchain node include any of the following:

[0211] The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node;

[0212] The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

[0213] Optionally, the reception confirmation message includes second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node, and the second message content contains a reception confirmation message type identifier; the reception confirmation message is used to enable the source blockchain node to: verify the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypt the encrypted message content contained in the interaction message with the second symmetric key, and when the verification is successful and the decrypted message content contains the reception confirmation message type identifier, confirm the reception time of the interaction message as the reception time of the reception confirmation message.

[0214] Optional,

[0215] The message receiving unit 901 is specifically used to: receive a plurality of neutrality verification messages sent by the source blockchain node through the blockchain relay communication network;

[0216] The message processing unit 902 is specifically used to calculate the round-trip delay of the blockchain relay communication network based on the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: the source blockchain node calculates the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

[0217] Optionally, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

[0218] Optionally, the neutrality verification message includes recipient node indication information, and the recipient node indication information includes: the node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

[0219] Optional,

[0220] The message receiving unit 901 is also used to: receive a neutrality verification request sent by the source blockchain node through the blockchain relay communication network;

[0221] The message processing unit 902 is further configured to: switch from the normal mode to the neutrality verification mode according to the received neutrality verification request, so as to respond to the neutrality verification message.

[0222] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0223] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0224] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0225] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0226] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0227] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0228] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0229] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0230] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for verifying the neutrality of a blockchain relay communication network, comprising: The source blockchain node sends a neutrality verification message to the target blockchain node through the blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier; The target blockchain node verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume; The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

2. The method according to claim 1, further comprising: The source blockchain node sends a key distribution message to the target blockchain node through the blockchain relay communication network, where the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node with the first symmetric key, and a digital signature generated for the key ciphertext by the identity private key of the source blockchain node; After receiving the key distribution message, the target blockchain node verifies the digital signature in the key distribution message according to the identity public key of the source blockchain node, and decrypts the key ciphertext with its own identity private key, and if the verification is successful, determines the decrypted symmetric key as the first symmetric key.

3. According to the method of claim 2, the identity public-private key pair of the source blockchain node and the target blockchain node includes any of the following: The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node; The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

4. According to the method of claim 1, the reception confirmation message includes a second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node, and the second message content includes a reception confirmation message type identifier; the method further includes: The source blockchain node verifies the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypts the encrypted message content contained in the interaction message with the second symmetric key, and if the verification is successful and the decrypted message content contains the reception confirmation message type identifier, the reception time of the interaction message is confirmed as the reception time of the reception confirmation message.

5. The method according to claim 1, The source blockchain node sends a neutrality verification message to the target blockchain node through the blockchain relay communication network, including: The source blockchain node sends a plurality of neutrality verification messages to the target blockchain node through the blockchain relay communication network; The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: the source blockchain node calculates the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

6. According to the method of claim 5, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

7. The method according to claim 1, wherein the neutrality verification message includes receiver node indication information, and the receiver node indication information includes: The node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

8. The method according to claim 1, further comprising: The source blockchain node sends a neutrality verification request to the target blockchain node through the blockchain relay communication network; The target blockchain node switches from normal mode to neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message.

9. A method for verifying the neutrality of a blockchain relay communication network, applied to a source blockchain node, the method comprising: Obtaining a neutrality verification message, the neutrality verification message including first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content with the identity private key of the source blockchain node, the first message content including a neutrality verification message type identifier; Send the neutrality verification message to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and, perform data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume; The round-trip delay of the blockchain relay communication network is calculated according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and the received data volume is compared with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

10. The method according to claim 9, further comprising: Obtain a key distribution message, wherein the key distribution message includes a key ciphertext obtained by encrypting the first symmetric key by the identity public key of the target blockchain node, and a digital signature generated for the key ciphertext by the identity private key of the source blockchain node; The key distribution message is sent to the target blockchain node through the blockchain relay communication network, so that the target blockchain node: after receiving the key distribution message, verifies the digital signature in the key distribution message according to the identity public key of the source blockchain node, and decrypts the key ciphertext with its own identity private key, and determines the decrypted symmetric key as the first symmetric key if the verification is successful.

11. According to the method of claim 10, the identity public-private key pair of the source blockchain node and the target blockchain node includes any of the following: The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node; The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

12. The method according to claim 9, wherein the reception confirmation message includes a second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node, and the second message content includes a reception confirmation message type identifier; the method further includes: The source blockchain node verifies the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypts the encrypted message content contained in the interaction message with the second symmetric key, and if the verification is successful and the decrypted message content contains the reception confirmation message type identifier, the reception time of the interaction message is confirmed as the reception time of the reception confirmation message.

13. The method according to claim 9, The sending of a neutrality verification message to a target blockchain node through a blockchain relay communication network includes: Sending a plurality of neutrality verification messages to the target blockchain node through the blockchain relay communication network; The round-trip delay of the blockchain relay communication network is calculated according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: calculating the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

14. According to the method of claim 13, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

15. The method according to claim 9, wherein the neutrality verification message includes receiver node indication information, and the receiver node indication information includes: The node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

16. The method according to claim 9, further comprising: A neutrality verification request is sent to the target blockchain node through the blockchain relay communication network, so that the target blockchain node switches from the normal mode to the neutrality verification mode according to the received neutrality verification request to respond to the neutrality verification message.

17. A method for verifying the neutrality of a blockchain relay communication network, applied to a target blockchain node, the method comprising: Receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content by an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier; Verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypt the encrypted message content contained in the interactive message with the first symmetric key, and return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message; The data volume of the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node is counted to obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

18. The method according to claim 17, further comprising: Receive a key distribution message sent by the source blockchain node through the blockchain relay communication network, wherein the key distribution message includes a key ciphertext encrypted by the identity public key of the target blockchain node using the first symmetric key, and a digital signature generated for the key ciphertext using the identity private key of the source blockchain node; The digital signature in the key distribution message is verified according to the identity public key of the source blockchain node, and the key ciphertext is decrypted with its own identity private key, and if the verification is successful, the decrypted symmetric key is determined as the first symmetric key.

19. According to the method of claim 18, the identity public-private key pair of the source blockchain node and the target blockchain node includes any of the following: The public and private key pairs of the on-chain node identities of the source blockchain node and the target blockchain node; The source blockchain node and the target blockchain node negotiate a dynamic identity public-private key pair through the blockchain relay communication network.

20. According to the method of claim 17, the reception confirmation message includes a second encrypted message content generated by encrypting the second message content with a second symmetric key and a digital signature generated for the second encrypted message content by the identity private key of the target blockchain node, and the second message content includes a reception confirmation message type identifier; the reception confirmation message is used to enable the source blockchain node to: verify the digital signature contained in the received interaction message according to the identity public key of the target blockchain node, and decrypt the encrypted message content contained in the interaction message with the second symmetric key, and when the verification is successful and the decrypted message content contains the reception confirmation message type identifier, confirm the reception time of the interaction message as the reception time of the reception confirmation message.

21. The method according to claim 17, Receiving a neutrality verification message sent by the source blockchain node through a blockchain relay communication network, comprising: Receiving a plurality of neutrality verification messages sent by the source blockchain node through the blockchain relay communication network; The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, including: the source blockchain node calculates the average round-trip delay of the multiple neutrality verification messages as the round-trip delay of the blockchain relay communication network.

22. According to the method of claim 21, the multiple neutrality verification messages are periodically sent by the source blockchain node within the preset time period.

23. The method according to claim 17, wherein the neutrality verification message includes receiver node indication information, and the receiver node indication information includes: The node identifier of the target blockchain node, or the set identifier of the blockchain node set to which the target blockchain node belongs.

24. The method of claim 17, further comprising: Receiving a neutrality verification request sent by the source blockchain node through the blockchain relay communication network; The neutrality verification mode is switched from the normal mode to the neutrality verification mode according to the received neutrality verification request, so as to respond to the neutrality verification message.

25. A neutrality verification system for a blockchain relay communication network, comprising: The source blockchain node and the target blockchain node; where: The source blockchain node sends a neutrality verification message to the target blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting the first message content with a first symmetric key and a digital signature generated for the first encrypted message content by the identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier; The target blockchain node verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and the target blockchain node performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume; The source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compares the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

26. A neutrality verification device for a blockchain relay communication network, applied to a source blockchain node, the device comprising: an acquiring unit, configured to acquire a neutrality verification message, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content with an identity private key of the source blockchain node, wherein the first message content includes a neutrality verification message type identifier; A sending unit, configured to send the neutrality verification message to a target blockchain node through a blockchain relay communication network, so that the target blockchain node: verifies the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and decrypts the encrypted message content contained in the interactive message with the first symmetric key, and returns a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier; and performs data volume statistics on the interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node to obtain the received data volume; A processing unit is used to calculate the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message, and compare the received data volume with the sent data volume of the interactive message sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

27. A neutrality verification device for a blockchain relay communication network, applied to a target blockchain node, the device comprising: A message receiving unit, configured to receive a neutrality verification message sent by a source blockchain node through a blockchain relay communication network, wherein the neutrality verification message includes a first encrypted message content generated by encrypting a first message content with a first symmetric key and a digital signature generated for the first encrypted message content with an identity private key of the source blockchain node, and the first message content includes a neutrality verification message type identifier; A message processing unit, configured to verify the digital signature contained in the received interactive message according to the identity public key of the source blockchain node, and to decrypt the encrypted message content contained in the interactive message using the first symmetric key, and to return a reception confirmation message to the source blockchain node through the blockchain relay communication network if the verification is successful and the decrypted message content contains the neutrality verification message type identifier, so that the source blockchain node calculates the round-trip delay of the blockchain relay communication network according to the sending time of the neutrality verification message and the receiving time of the reception confirmation message; A data volume statistics unit is used to perform data volume statistics on interactive messages received within a preset time period and successfully verified by the identity public key of the source blockchain node, to obtain the received data volume, so that the source blockchain node compares the received data volume with the sent data volume of the interactive messages sent by itself to the target blockchain node through the blockchain relay communication network within the preset time period; wherein, the conditions for determining that the blockchain relay communication network is neutral include: the round-trip delay matches the actual environment between the source blockchain node and the target blockchain node, and the received data volume is consistent with the sent data volume.

28. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 9 to 24 by running the executable instructions.

29. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 9 to 24.