A blockchain node discovery method and apparatus
By introducing a decentralized service discovery mechanism and privacy protection into the blockchain network, the high maintenance costs and information disclosure issues caused by centralized registration centers are resolved, enabling automatic node discovery and secure connection, and improving network robustness and security.
Patent Information
- Application Number
- CN202211242523.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-10-11
AI Technical Summary
In blockchain node networking scenarios, existing technologies rely on centralized registration center services, resulting in high maintenance costs, public node information, and a lack of privacy protection, which cannot meet the requirements of special network topologies and privacy.
By introducing a decentralized service discovery mechanism into the blockchain network, nodes automatically perform network connectivity and heartbeat detection, nodes autonomously register and control their visibility, and integrate privacy protection mechanisms to achieve automatic node discovery and secure connection.
It reduces maintenance costs, improves the robustness and security of the blockchain network, enables node privacy protection and automatic discovery, and is suitable for large-scale blockchain network management.
Smart Images

Figure CN115665143B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of computer software, and particularly relates to a blockchain node discovery method and device, electronic equipment and storage medium. BACKGROUND
[0002] In a blockchain node networking scenario, a newly joined node needs to know the blockchain nodes that participate in consensus with it. When a blockchain node starts, it will read the network information of other consensus nodes from a configuration file and connect these consensus nodes. However, this consensus node network management method has high maintenance costs. Whether in a traditional blockchain network or in a cloud-native environment, as the number of consensus nodes increases, the maintenance personnel need to modify a large number of configuration files, and the more nodes there are, the more configuration files need to be modified, and the configuration file modification also has a lot of maintenance costs. For the node discovery scenario, a service discovery technology is usually used, a centralized node registry service is run, the registry service allows nodes to connect and register their own information, and also allows nodes to obtain information of all currently registered nodes. However, the following problems exist: (1) dependent on the centralized registry service; (2) access rights are disclosed; (3) all nodes need to add additional network configurations related to the registry. Therefore, how to manage the blockchain node network and service discovery and introduce a service discovery access control mechanism with privacy characteristics is a technical problem to be solved. SUMMARY
[0003] Embodiments of the present specification aim to solve the above problems, and provide a blockchain node discovery method, device, electronic equipment and storage medium.
[0004] To solve the above technical problems, embodiments of the present specification are implemented as follows:
[0005] In a first aspect, a blockchain node discovery method is provided. A blockchain network includes a second node and a third node, and the third node is recorded in a node list saved locally by the second node. A first node as a new node to be joined establishes a connection with the second node, including:
[0006] The first node sends a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node. The network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0007] If the first node is allowed to join the blockchain network, the first node sends a network registration information request to the second node, and the second node sends the network registration information of the first node to the blockchain network and feeds back a registration result to the first node according to a checking result of the first node network registration information request and a service connectivity test result;
[0008] If the first node completes registration, the first node obtains a screened node list from the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time;
[0009] The first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on a result of the service connectivity test;
[0010] If it is confirmed that the third node remains in the node list, the first node initiates a unique service connection with the third node.
[0011] In a second aspect, a blockchain node discovery method is provided. A blockchain network includes a second node and a third node. The third node is recorded in a node list stored locally by the second node. A first node, as a new node to be joined, establishes a connection with the second node. The method applied to the first node includes:
[0012] A network access request is sent to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result. The network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential.
[0013] If allowed to join the blockchain network, a network registration information request is sent to the second node, so that the second node sends the network registration information to the blockchain network according to a checking result of the network registration information request and a service connectivity test result, and feeds back a registration result.
[0014] If registration is completed, a screened node list of the second node is obtained; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time.
[0015] A service connectivity test on the third node in the node list is initiated, and it is confirmed whether the third node remains in the node list based on a result of the service connectivity test.
[0016] If it is confirmed that the third node remains in the node list, a unique service connection with the third node is initiated.
[0017] In a third aspect, a blockchain node discovery method is provided. The blockchain network includes a second node, and a first node as a new node to be added establishes a connection with the second node. The method is applied to the second node and includes:
[0018] receiving and responding to a network access request sent by the first node, initiating validity verification of the network access request to the blockchain network, and feeding back a verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0019] if the first node is allowed to join the blockchain network, receiving a network registration information request sent by the first node, and sending the network registration information of the first node to the blockchain network and feeding back a registration result to the first node according to the inspection result of the network registration information request of the first node and the service connectivity test result, so that the network registration information of the first node is recorded in the blockchain network;
[0020] if the first node completes registration, sending a filtered node list to the first node, so that the first node obtains the node list and corresponding node information saved in the second node locally; wherein the filtered node list includes nodes set as visible and nodes network-reachable within a set time.
[0021] In a fourth aspect, a blockchain node discovery method is provided. The blockchain network includes a third node, and the third node is recorded in a node list of a first node. The method is applied to the third node and includes:
[0022] responding to a service connectivity test instruction initiated by the first node, feeding back a connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list;
[0023] responding to a service connection inspection request of the first node and feeding back an inspection result, so that the first node confirms the unique service connection between the third node and the first node.
[0024] In a fifth aspect, a blockchain node discovery device is provided. The blockchain network includes a second node and a third node, and the third node is recorded in a node list saved in the second node locally. A first node as a new node to be added establishes a connection with the second node, and the device includes:
[0025] The first module is configured to send a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result to the first node; wherein the network access request is created by a blockchain network administrator in advance and is sent to the first node, and at least includes a key and / or a credential;
[0026] The second module is configured to, if the first node is allowed to join the blockchain network, send a network registration information request to the second node, and according to a checking result of the network registration information request of the first node and a service connectivity test result, send network registration information of the first node to the blockchain network and feed back a registration result to the first node;
[0027] The third module is configured to, if the first node completes registration, obtain a screened node list from the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time.
[0028] The fourth module is configured to, the first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on a result of the service connectivity test.
[0029] The fifth module is configured to, if it is confirmed that the third node remains in the node list, the first node initiates a unique service connection to the third node.
[0030] The sixth aspect provides a blockchain node discovery device. A blockchain network includes a second node and a third node. The third node is recorded in a node list stored in the second node. A first node as a new node to be joined establishes a connection with the second node. The device is applied to the first node and includes:
[0031] The first module is configured to send a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result; wherein the network access request is created by a blockchain network administrator in advance and is sent to the first node, and at least includes a key and / or a credential.
[0032] The second module is configured to, if allowed to join the blockchain network, send a network registration information request to the second node, so that the second node sends network registration information to the blockchain network according to a checking result of the network registration information request and a service connectivity test result, and feeds back a registration result.
[0033] a third module configured to, if the registration is completed, acquire a screened node list of the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time;
[0034] a fourth module configured to initiate a service connectivity test on the third node in the node list, and confirm whether the third node is retained in the node list based on a result of the service connectivity test;
[0035] a fifth module configured to, if it is confirmed that the third node is retained in the node list, initiate a unique service connection with the third node.
[0036] In a ninth aspect, a blockchain node discovery device is provided. The blockchain network includes a second node, and a first node as a new node to be added establishes a connection with the second node. The device is applied to the second node and includes:
[0037] a first module configured to receive and respond to a network access request sent by the first node, initiate validity verification of the network access request to the blockchain network, and feed back a verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created and issued to the first node by a blockchain network administrator, and at least includes a key and / or a credential;
[0038] a second module configured to, if the first node is allowed to join the blockchain network, receive a network registration information request sent by the first node, and send the network registration information of the first node to the blockchain network and feed back a registration result to the first node according to a checking result of the network registration information request of the first node and a service connectivity test result, so that the network registration information of the first node is recorded in the blockchain network;
[0039] a third module configured to, if the first node completes the registration, send a screened node list to the first node, so that the first node acquires the node list and corresponding node information saved in the second node locally; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time.
[0040] In an eighth aspect, a blockchain node discovery device is provided. The blockchain network includes a third node, and the third node is recorded in a node list of a first node. The device is applied to the third node and includes:
[0041] a first module configured to, in response to a service connectivity test instruction initiated by the first node, feed back a connectivity test result with the first node, so that the first node confirms whether the third node is retained in the local node list.
[0042] The second module is configured to respond to the first node service connection check request and feed back a check result, so that the first node confirms the unique service connection between the first node and the third node.
[0043] The ninth aspect provides an electronic device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of the first aspect.
[0044] The tenth aspect provides a computer readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of the first aspect.
[0045] The present application can achieve at least the following technical effects:
[0046] The present application integrates the blockchain node service discovery into the node, and realizes a decentralized service discovery transmission mechanism; the network connectivity automatic detection is introduced to timely discover whether the node is alive, and the robustness of the blockchain network is improved; the privacy protection is added to the node, so that the node with privacy requirements will not be announced to the network, and the node security is improved. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0048] Figure 1 The application scenario diagram of the blockchain node discovery scheme provided by the embodiments of the present application is shown.
[0049] Figure 2 The application scenario diagram of the blockchain node discovery scheme provided by the embodiments of the present application is shown.
[0050] Figure 3 The application scenario diagram of the blockchain node discovery scheme provided by the embodiments of the present application is shown.
[0051] Figure 4 The application scenario diagram of the blockchain node discovery scheme provided by the embodiments of the present application is shown.
[0052] Figure 5 The application scenario diagram of the blockchain node discovery scheme provided by the embodiments of the present application is shown.
[0053] Figure 6 The fifth schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0054] Figure 7 The sixth schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0055] Figure 8 The seventh schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0056] Figure 9 The eighth schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0057] Figure 10 The ninth schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0058] Figure 11 The tenth schematic diagram of the blockchain node discovery method provided by an embodiment of the present specification.
[0059] Figure 12 The first schematic diagram of the blockchain node discovery device provided by an embodiment of the present specification.
[0060] Figure 13 The second schematic diagram of the blockchain node discovery device provided by an embodiment of the present specification.
[0061] Figure 14 The third schematic diagram of the blockchain node discovery device provided by an embodiment of the present specification.
[0062] Figure 15 The fourth schematic diagram of the blockchain node discovery device provided by an embodiment of the present specification.
[0063] Figure 16 The structural schematic diagram of the electronic device provided by an embodiment of the present specification. DETAILED DESCRIPTION
[0064] In order to enable persons skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be described clearly and completely in conjunction with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only some of the embodiments of the present specification, not all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present specification.
[0065] The blockchain node discovery scheme involved in the present specification will be described in detail through specific examples.
[0066] In a blockchain scenario involving cooperation of multiple parties, there can be special blockchain network topologies. For example, when two companies cooperate, it is required that the blockchain node of company A cannot directly access the blockchain node of company B, but must go through a third-party node X as a relay; or it is required that certain internal nodes cannot directly send transactions to the external network. In the above cases, it is obvious that the ordinary decentralized node discovery cannot reflect the particularity of each node, and thus cannot truly depict a limited connectivity network topology.
[0067] In a large distributed system, for the node configuration or node discovery, a service discovery technology is usually used to manage between nodes. In service discovery, a centralized node registration center service needs to be run, which allows nodes to connect and register their own information, and also allows nodes to obtain information of all currently registered nodes. Through service discovery, nodes can discover other nodes in the network. However, although the traditional type of service discovery mechanism can discover other nodes through the service discovery mechanism, the mechanism relies on a centralized registration center service, which requires additional resources to run a highly available registration center service. In addition, if other nodes have not completed registration, the current node needs to wait for other nodes to complete registration before node discovery. On the other hand, in the service discovery mechanism, the node registration service will be in an open state, that is, after node registration, it can be discovered and accessed by all other nodes. In actual application scenarios, according to requirements, part of the nodes are private nodes and can only be discovered by part of other nodes. The third problem of the traditional service discovery mechanism is that, since it is a centralized service, all nodes need to add network configurations related to the registration center to ensure that nodes can access the service registration center to complete subsequent service discovery work.
[0068] Therefore, for special blockchain application scenarios, the present application scheme aims to solve the network management and service discovery problems of large-scale blockchain nodes, and introduces a service discovery mechanism with privacy characteristics to protect node access control. On the one hand, based on decentralized service discovery, the service discovery is integrated into the node, and the centralized node discovery service is omitted. On the other hand, network connectivity and heartbeat detection will be automatically performed between nodes, and nodes can automatically judge network service reachability. Nodes automatically register and discover through protocols, and network configurations of nodes are automatically adjusted according to running environments. The third aspect is to add node privacy protection, that is, nodes control whether they can be discovered by other nodes by declaring their privacy, to achieve the purpose of hiding themselves in the network. It should be understood that the blockchain node discovery requirements related to the above application scenarios, whether in a cloud-native environment or a non-cloud-native environment, are within the protection scope of the present application scheme.
[0069] Embodiment one
[0070] The purpose of the present application is to solve the network management and service discovery problems of large-scale blockchain nodes, and introduce a service discovery mechanism with privacy characteristics to protect node access control. Specifically, through the process of new nodes requesting to join the network through credential information, the requested nodes perform authentication checks on the new nodes, the new nodes request to register their information to the network, the new nodes receive the network node list and create the network topology, the new nodes test the connectivity of other nodes and record the node intercommunication status, and the new nodes initiate network connections to other nodes. Therefore, the blockchain node discovery scheme of the embodiments of the present application refers to Figure 1 As shown in the figure, the second node and the third node have been included in the blockchain network, the first node as a new node to be joined, first establishes a connection with the second node, and the third node is recorded in the node list saved by the second node locally. As Figure 2 As shown in the figure, the method comprises:
[0071] S101: The first node sends a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node; wherein the network access request is created by a blockchain network administrator in advance and issued to the first node, and at least includes a key and / or a credential.
[0072] Specifically, since the nodes can actively register to the service center, the current network needs to authenticate the nodes to prevent malicious nodes from registering, and this problem is solved by issuing a registration key by the network. The administrator first creates a registration key and a credential. When the first node registers, the key and the credential are used for authentication.
[0073] S102: If the first node is allowed to join the blockchain network, the first node sends a network registration information request to the second node, and the second node sends the first node network registration information to the blockchain network and feeds back the registration result to the first node according to the inspection result of the first node network registration information request and the service connectivity test result.
[0074] Optionally, the network registration information at least includes a network address, a service corresponding port, a privacy declaration and / or an authentication requirement; wherein the privacy declaration is used to set and control the visibility of the first node to other nodes of the blockchain network.
[0075] Optionally, the process of the second node sending the first node network registration information to the blockchain network and feeding back the registration result to the first node according to the inspection result of the first node network registration information request and the service connectivity test result comprises Figure 3 As shown in the figure, it comprises:
[0076] S211: The second node checks the validity of the network registration information of the first node, and if the check passes, the second node saves the registration information of the first node to the local node list.
[0077] S212: The second node initiates a service connectivity test on the first node, and sends the service reachability status of the first node to the neighbor nodes, wherein the service connectivity test includes a test on the network address and the service corresponding port.
[0078] S213: If the validity check of the network registration information of the first node and the service connectivity test of the second node both pass, the network registration information of the first node is sent to the blockchain network, so that the first node completes the registration.
[0079] Specifically, when the first node requests to join the network, the second node checks the key and the credential submitted by the first node. If the authentication passes, the first node is allowed to join the current network and returns success. If the authentication fails, the first node is not allowed to join the current network and returns failure. On the basis of successful authentication, in order to enable the first node to be discovered by other nodes in the network, the first node needs to register its own network information in the network. The first node requests to register its own information to the second node connected thereto and submits the registration information. The registration information contains its own network address, service name, port number corresponding to the service name, node privacy, and node authentication requirement. If the first node contains authentication information, the registration information also contains authentication related content. The node privacy is used to control whether the node is allowed to be discovered by other nodes. If the node has privacy, the node will not be discovered by other nodes in the network. The second node checks the registration information of the first node to ensure that the registration information is valid. When the check passes, the second node saves the registration service information of the first node to the local known node list. At the same time, since network reachability is not equal to service availability, the current node also needs to initiate a service connectivity test on the node. In the connectivity test, the current node will test the network address and the port number of each service of the first node respectively. If the test fails, the node will be marked as service unreachable, and the reachability status of the service will be announced to other neighbor nodes in the subsequent node announcement.
[0080] S103: If the first node completes the registration, the first node obtains a screened node list from the second node; wherein the screened node list includes nodes set as visible and nodes network reachable within a set time.
[0081] Optionally, the process that the first node acquires the filtered node list from the second node, as shown in Figure 4 includes the following steps:
[0082] S311: The first node sends a node list request to the second node, and the node list request includes acquiring network address, service name and / or service port number of the node.
[0083] S312: In response to the first node request, the second node removes the nodes set as invisible and / or the nodes unreachable in the network within a set time from the node list saved locally.
[0084] S313: The second node feeds back the node list to the first node.
[0085] Specifically, after the first node is successfully registered in the network, the first node starts to request the second node to acquire the known node list of the current network. The first node sends a node list request message to request to acquire all the nodes in the current network. In the request message, the network address, service name and service port number of the nodes are requested to be acquired. The second node will respond to the request according to its own node list. In responding to the request, the second node will first check the node list to determine the node list that can be returned. In the checking process, the nodes with privacy settings and the nodes unreachable within a certain time will be removed. Finally, the second node returns the current filtered known node list to the first node.
[0086] S104: The first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on the result of the service connectivity test.
[0087] Optionally, the process that the first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on the result of the service connectivity test, as shown in Figure 5 includes the following steps:
[0088] S411: The first node checks the reachability of the network address and the corresponding service port of the third node.
[0089] S412: If the network address and the corresponding service port of the third node are both reachable, the first node marks the third node as service reachable and saves the third node in the node list.
[0090] S413: If the network address of the third node is unreachable or the service corresponding port is unreachable, the first node marks the third node as service unreachable; and the first node sets a timeout timer for the third node marked as service unreachable, and if the third node is still unreachable within the set time, the third node is removed from the node list of the first node.
[0091] Optionally, the first node initiates a service connectivity test for the third node in the node list, and the process of confirming whether the third node remains in the node list based on the service connectivity test result is as shown in Figure 6
[0092] S414: The first node periodically tests the service connectivity of the third node, and marks the service reachability of the third node according to the test result.
[0093] It should be noted that in an actual networking scenario, due to the existence of network policy, all nodes are not directly network-reachable, so the first node checks all known nodes to ensure that these nodes can be connected by the first new node. The first node will test the service availability of all nodes in the node list. First, check the network address reachability, if the network address is reachable, then check the reachability of each service port. If the network address and network port are both reachable, the node is saved to the reachable node list. If one of the network address or network port is unreachable, the network node is marked as service unreachable, and a timeout timer is set for the node. If the service of the node is still unreachable within the timeout time, the node is removed from the node list. The service connectivity test is periodically performed, and if the service of the node is found to be normally connected within a certain period, the node is marked as service reachable.
[0094] S105: If it is confirmed that the third node remains in the node list, the first node initiates a unique service connection for the third node.
[0095] Optionally, if it is confirmed that the third node remains in the node list, the process of the first node initiating a unique service connection for the third node is as shown in Figure 7
[0096] S611: The first node initiates a service connection request for the third node, and the service connection request at least includes a network address and a service corresponding port.
[0097] S612: The third node checks whether a service connection has been established between the first node and the third node.
[0098] S613: If the service connection is not established, a service connection is established between the first node and the third node.
[0099] Optionally, if it is confirmed that the third node remains in the node list, the first node initiates a unique service connection process to the third node as shown in Figure 8
[0100] S614: If the service connection between the first node and the third node has been established, it is checked whether the service connection between the first node and the third node has been established.
[0101] S615: If the established service connection is greater than 1, the service connection initiated by the network address larger node is retained.
[0102] Specifically, while determining the alive address list, the first node can start initiating active connection to the alive node. The first node selects the service to be accessed from the node service list as needed. After the connection is established, it is checked whether there is more than 1 connection between the two nodes. If the two nodes have established more than 1 connection, connection teardown check is needed, that is, only the active connection initiated by the network address larger end is retained. The new node will periodically check the service reachable node list. If the node changes from unreachable state to reachable state, the new node will reattempt to initiate connection.
[0103] It should be noted that the scheme of the embodiment can realize automatic discovery of nodes and reduce maintenance cost: the configuration mode of the node is simplified, the configuration file does not need to be modified when the cluster adds nodes, automatic discovery of nodes is realized, which is more conducive to expansion of the cluster size. At the same time, errors introduced by manual maintenance are reduced. The service discovery delivery mechanism is decentralized. Since the service discovery has been integrated into the node, it is no longer necessary to run an independent registration center service, and the high availability of the registration center is bound with the high availability of the blockchain node. Network connectivity automatic detection is realized: through the heartbeat detection mechanism, the node can timely discover whether the opposite end is alive, and can mark the non-alive node from the node list, and only the alive nodes are mutually notified. The node privacy protection mechanism is added, and the node network security is enhanced: through the node privacy protection, the node with privacy requirements will not be notified to the network, and the node is hidden in the network.
[0104] Embodiment Two
[0105] Referring to Figure 9 As shown, the blockchain node discovery method provided by the embodiment of the present specification, the blockchain network has included a second node and a third node, a first node as a new node to be joined, establishes a connection with the second node, and the third node is recorded in a node list saved locally by the second node. The execution subject of the method is the first node, and the method comprises:
[0106] S801: sending a network access request to the second node to enable the second node to initiate validity verification of the network access request to the blockchain network and feed back the verification result; wherein the network access request is created and issued to the first node by a blockchain network administrator, and at least includes a key and / or a certificate.
[0107] S802: if admitted to join the blockchain network, send a network registration information request to the second node to enable the second node to send the network registration information to the blockchain network according to the network registration information request inspection result and the service connectivity test result, and feed back the registration result.
[0108] S803: if the registration is completed, obtain the screened node list of the second node; wherein the screened node list includes nodes set as visible and nodes network reachable within a set time.
[0109] S804: initiate a service connectivity test on the third node in the node list, and confirm whether the third node remains in the node list based on the result of the service connectivity test.
[0110] S805: if it is confirmed that the third node remains in the node list, initiate a unique service connection with the third node.
[0111] Referring to Figure 10 As shown, the blockchain node discovery method provided by the embodiment of the present specification, the blockchain network has included a second node, a first node as a new node to be joined, establishes a connection with the second node, and the execution subject of the method is the second node, and the method comprises:
[0112] S901: receiving and responding to the network access request sent by the first node, and initiating validity verification of the network access request to the blockchain network and feeding back the verification result to the first node, to enable the first node to be admitted to join the blockchain network according to the verification feedback result; wherein the network access request is created and issued to the first node by a blockchain network administrator, and at least includes a key and / or a certificate.
[0113] S902: If the first node is allowed to join the blockchain network, receiving the first node sending network registration information request, and according to the checking result of the first node network registration information request and the service connectivity test result, sending the first node network registration information to the blockchain network and feeding back the registration result to the first node, so that the network registration information of the first node is recorded in the blockchain network.
[0114] S903: If the first node completes registration, send the filtered node list to the first node, so that the first node obtains the node list and corresponding node information saved in the second node locally; wherein the filtered node list includes nodes set as visible and nodes network reachable within a set time.
[0115] Referring to Figure 11 The blockchain node discovery method provided by an embodiment of the present specification, the blockchain network already includes a third node, a first node is a new node that has joined the blockchain network, and a service connection is established with the third node. The execution subject of the method is the third node, and the method comprises:
[0116] S1001: In response to the service connectivity test instruction initiated by the first node, feed back the connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list.
[0117] S1002: In response to the service connection checking request of the first node and feed back the checking result, so that the first node confirms the unique service connection between the third node.
[0118] Embodiment three
[0119] Figure 12 The structural schematic diagram of the blockchain node discovery device 1100 provided by an embodiment of the present specification. Please refer to Figure 12 In one embodiment of the blockchain node discovery device 1100, the blockchain network includes a second node and a third node, the third node is recorded in the node list saved in the second node locally; a first node as a new node to be joined establishes a connection with the second node, comprising:
[0120] The first module 1101 is configured to send a network access request to the second node by the first node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node; wherein the network access request is created by a blockchain network administrator in advance and issued to the first node, and at least includes a key and / or a certificate;
[0121] The second module 1102 is configured to, if the first node is allowed to join the blockchain network, send a network registration information request to the second node, and send network registration information of the first node to the blockchain network and feed back a registration result to the first node according to a checking result of the first node network registration information request and a service connectivity test result.
[0122] The third module 1103 is configured to, if the first node completes registration, obtain a screened node list from the second node, wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time.
[0123] The fourth module 1104 is configured to, if the first node initiates a service connectivity test on the third node in the node list, confirm whether the third node remains in the node list based on a result of the service connectivity test.
[0124] The fifth module 1105 is configured to, if it is confirmed that the third node remains in the node list, initiate a unique service connection on the third node.
[0125] It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be described herein again. Figures 1 to 8 The blockchain node discovery apparatus (or device) performs the method performed by the blockchain node discovery apparatus (or device) and realizes the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be described herein again. Figures 1 to 8
[0126] Embodiment Four
[0127] Figure 13 A structural schematic diagram of a blockchain node discovery apparatus 1200 provided by an embodiment of the present specification is shown in FIG. 12. Please refer to FIG. 12. Figure 13 In an embodiment of the blockchain node discovery apparatus 1200, a blockchain network includes a second node and a third node, the third node is recorded in a node list saved locally by the second node; a first node as a new node to be joined establishes a connection with the second node, and applied to the first node, includes:
[0128] The first module 1201 is configured to send a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result; wherein the network access request is created by a blockchain network administrator in advance and issued to the first node, and at least includes a key and / or a credential.
[0129] The second module 1202 is configured to, if the first node is allowed to join the blockchain network, send a network registration information request to the second node, so that the second node sends the network registration information to the blockchain network according to a network registration information request checking result and a service connectivity test result, and feeds back a registration result.
[0130] The third module 1203 is configured to, if the registration is completed, acquire a screened node list of the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time.
[0131] The fourth module 1204 is configured to initiate a service connectivity test on the third node in the node list, and confirm whether the third node is retained in the node list based on a result of the service connectivity test.
[0132] The fifth module 1205 is configured to, if it is confirmed that the third node is retained in the node list, initiate a unique service connection with the third node.
[0133] It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be described herein again. Figure 9 The blockchain node discovery apparatus (or device) performs the method performed by the blockchain node discovery apparatus (or device) and realizes the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be described herein again. Figure 9
[0134] Figure 14 A structural schematic diagram of the blockchain node discovery apparatus 1300 provided by one embodiment of the present specification is shown in FIG. 13. Please refer to FIG. 13. Figure 14 In one embodiment of the blockchain node discovery apparatus 1300, the blockchain network includes a second node, a first node as a new node to be joined establishes a connection with the second node, and the blockchain node discovery apparatus 1300 applied to the second node includes:
[0135] The first module 1301 is configured to receive and respond to a network access request sent by the first node, and initiate validity verification of the network access request to the blockchain network and feed back a verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created and issued to the first node by a blockchain network administrator, and at least includes a key and / or a credential.
[0136] The second module 1302 is configured to, if the first node is allowed to join the blockchain network, receive the network registration information request sent by the first node, and send the network registration information of the first node to the blockchain network and feed back the registration result to the first node according to the checking result of the network registration information request of the first node and the service connectivity test result, so that the network registration information of the first node is recorded in the blockchain network.
[0137] The third module 1303 is configured to, if the first node completes the registration, send the screened node list to the first node, so that the first node obtains the node list and the corresponding node information stored in the second node locally; wherein the screened node list includes the nodes set as visible and the nodes that are network-reachable within a set time.
[0138] It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here. Figure 10 It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here. Figure 10 It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here.
[0139] Figure 15 The structural schematic diagram of the blockchain node discovery apparatus 1400 provided by one embodiment of the present specification is shown in FIG. 14. Please refer to FIG. 14. Figure 15 In one embodiment of the blockchain node discovery apparatus 1400, the blockchain network includes a third node, and the third node is recorded in the node list of the first node; and the third node includes the following application:
[0140] The first module 1401 is configured to, in response to the service connectivity test instruction initiated by the first node, feed back the connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list;
[0141] The second module 1402 is configured to, in response to the service connection checking request of the first node and feed back the checking result, so that the first node confirms the unique service connection between the first node and the third node.
[0142] It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here. Figure 11 It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here. Figure 11 It should be understood that the blockchain node discovery apparatus of the embodiments of the present specification can also perform the method performed by the blockchain node discovery apparatus (or device) and realize the functions of the blockchain node discovery apparatus (or device) in the examples shown in the present specification, which will not be repeated here.
[0143] Embodiment five
[0144] Figure 16 The structural schematic diagram of the electronic device of one embodiment of the present specification is shown in FIG. 14. Please refer to FIG. 14.Figure 16 At the hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The memory can include a memory such as a random-access memory (RAM), and can further include a non-volatile memory such as at least one disk memory. Of course, the electronic device can further include other hardware required by a business.
[0145] The processor, the network interface, and the memory can be connected to each other through the internal bus, which can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, and a control bus, etc. For ease of representation, Figure 16 Only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0146] The memory is used to store a program. Specifically, the program can include program code including computer operation instructions. The memory can include a memory and a non-volatile memory, and provide instructions and data to the processor.
[0147] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, and forms a shared resource access control device at the logical level. The processor executes the program stored in the memory, and is specifically used to perform the following operations:
[0148] The blockchain network includes a second node and a third node, the third node is recorded in a node list saved locally by the second node; a first node as a new node to be joined establishes a connection with the second node, including:
[0149] The first node sends a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0150] If the first node is allowed to join the blockchain network, the first node sends a network registration information request to the second node, and the second node sends the network registration information of the first node to the blockchain network and feeds back a registration result to the first node according to a checking result of the network registration information request of the first node and a service connectivity test result;
[0151] If the first node completes registration, the first node obtains a screened node list from the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time;
[0152] The first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on a result of the service connectivity test;
[0153] If it is confirmed that the third node remains in the node list, the first node initiates a unique service connection to the third node.
[0154] Alternatively,
[0155] The blockchain network includes a second node and a third node, the third node is recorded in a node list saved locally by the second node; a first node as a new node to be joined establishes a connection with the second node, and applied to the first node, includes:
[0156] A network access request is sent to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0157] If allowed to join the blockchain network, a network registration information request is sent to the second node, so that the second node sends the network registration information to the blockchain network according to a checking result of the network registration information request and a service connectivity test result, and feeds back a registration result;
[0158] If registration is completed, a screened node list of the second node is obtained; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time;
[0159] A service connectivity test on the third node in the node list is initiated, and whether the third node remains in the node list is confirmed based on a result of the service connectivity test;
[0160] If it is confirmed that the third node remains in the node list, initiate a unique service connection with the third node.
[0161] Or,
[0162] The blockchain network includes a second node, and the first node establishes a connection with the second node as a new node to be joined. The application applied to the second node includes:
[0163] Receive and respond to the network access request sent by the first node, and initiate validity verification of the network access request to the blockchain network and feed back the verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created and issued to the first node by the blockchain network administrator, and at least includes a key and / or a certificate;
[0164] If the first node is allowed to join the blockchain network, receive the network registration information request sent by the first node, and according to the inspection result of the first node network registration information request and the service connectivity test result, send the first node network registration information to the blockchain network and feed back the registration result to the first node, so that the network registration information of the first node is recorded in the blockchain network;
[0165] If the first node completes the registration, send the screened node list to the first node, so that the first node obtains the node list and the corresponding node information saved in the second node locally; wherein the screened node list includes nodes set as visible and nodes network reachable within a set time.
[0166] Or,
[0167] The blockchain network includes a third node, and the third node is recorded in the node list of the first node; the application applied to the third node includes:
[0168] In response to the service connectivity test instruction initiated by the first node, feed back the connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list;
[0169] In response to the service connection inspection request of the first node and feed back the inspection result, so that the first node confirms the unique service connection between the third node.
[0170] The above as described in the specification Figures 1 to 11The blockchain node discovery method disclosed in the embodiments can be applied to a processor or implemented by the processor. The processor can be an integrated circuit chip having a processing capability of signals. In the implementation, each step of the above method can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The processor can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiments of the present specification can be implemented or executed. The general processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present specification can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.
[0171] Of course, in addition to the software implementation, the electronic device of the embodiments of the present specification does not exclude other implementation manners, 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.
[0172] Embodiment six
[0173] The embodiments of the present specification also propose a computer readable storage medium storing one or more programs, the one or more programs including instructions capable of causing the portable electronic device including a plurality of application programs to execute the following methods when executed by the portable electronic device: Figures 1 to 11 The method of the embodiments, and specifically for executing the following methods:
[0174] The blockchain network includes a second node and a third node, the third node is recorded in a node list saved locally by the second node; a first node as a new node to be joined establishes a connection with the second node, including:
[0175] The first node sends a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result to the first node; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0176] If the first node is allowed to join the blockchain network, the first node sends a network registration information request to the second node, and the second node sends network registration information of the first node to the blockchain network according to a checking result of the network registration information request of the first node and a service connectivity test result, and feeds back a registration result to the first node;
[0177] If the first node completes registration, the first node obtains a screened node list from the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time;
[0178] The first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on a result of the service connectivity test;
[0179] If it is confirmed that the third node remains in the node list, the first node initiates a unique service connection to the third node.
[0180] Alternatively,
[0181] The blockchain network includes a second node and a third node, the third node is recorded in a node list saved locally by the second node; a first node as a new node to be joined establishes a connection with the second node, and applied to the first node, includes:
[0182] A network access request is sent to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a credential;
[0183] If allowed to join the blockchain network, a network registration information request is sent to the second node, so that the second node sends network registration information to the blockchain network according to a checking result of the network registration information request and a service connectivity test result, and feeds back a registration result;
[0184] If the registration is completed, a screened node list of the second node is obtained; wherein the screened node list includes nodes set as visible and nodes reachable in a set time;
[0185] A service connectivity test on the third node in the node list is initiated, and whether the third node remains in the node list is confirmed based on a result of the service connectivity test;
[0186] If it is confirmed that the third node remains in the node list, a unique service connection with the third node is initiated.
[0187] Alternatively,
[0188] The blockchain network includes a second node, and a first node as a new node to be joined establishes a connection with the second node, and the application is applied to the second node, and includes:
[0189] A network access request sent by the first node is received and responded to, and validity verification of the network access request is initiated to the blockchain network and a verification result is fed back to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created in advance by a blockchain network administrator and issued to the first node, and at least includes a key and / or a certificate;
[0190] If the first node is allowed to join the blockchain network, a network registration information request sent by the first node is received, and according to a checking result of the network registration information request of the first node and a service connectivity test result, the network registration information of the first node is sent to the blockchain network and a registration result is fed back to the first node, so that the network registration information of the first node is recorded in the blockchain network;
[0191] If the first node completes the registration, a screened node list is sent to the first node, so that the first node obtains the node list and corresponding node information saved in the second node locally; wherein the screened node list includes nodes set as visible and nodes reachable in a set time.
[0192] Alternatively,
[0193] The blockchain network includes a third node, and the third node is recorded in a node list of a first node; the application is applied to the third node, and includes:
[0194] In response to a service connectivity test instruction initiated by the first node, a connectivity test result with the first node is fed back, so that the first node confirms whether the third node remains in the local node list;
[0195] In response to the first node service connection check request and feeding back a check result, so that the first node confirms the unique service connection between the first node and the third node.
[0196] In conclusion, the above only describes the preferred embodiments of the present specification, and is not used to limit the protection scope of the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.
[0197] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer. Specifically, the computer may, for example, be 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 electronic data carrier device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0198] The computer readable medium includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The 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 cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer readable medium does not include transitory media such as modulated data signals and carriers.
[0199] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0200] The various embodiments described in this specification are presented by way of example, and each embodiment is not inherently more important than any other embodiment. The same can hold true for the various implementations of the systems and methods within each embodiment.
Claims
1. A method for discovering a blockchain node, a blockchain network comprising a second node and a third node, the third node being recorded in a node list saved locally by the second node; the method comprising: A first node establishes a connection with a second node as a new node to be added, and the first node, the second node and a third node are applied, comprising: The first node sends a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node; wherein the network access request is created and issued to the first node by a blockchain network administrator in advance, and at least includes a key and / or a certificate; If the first node is allowed to join the blockchain network, the first node sends a network registration information request to the second node, and the second node sends the first node network registration information to the blockchain network and feeds back the registration result to the first node according to the first node network registration information request checking result and service connectivity test result; If the first node completes registration, the first node obtains a screened node list from the second node; Wherein, the screened node list includes nodes set as visible and nodes network reachable within a set time; The first node initiates a service connectivity test on the third node in the node list, and confirms whether the third node remains in the node list based on the result of the service connectivity test; If it is confirmed that the third node remains in the node list, the first node initiates a unique service connection to the third node; The process that the second node sends the first node network registration information to the blockchain network and feeds back the registration result to the first node according to the first node network registration information request checking result and service connectivity test result, comprising: the second node checks the validity of the network registration information of the first node, and if the check passes, the second node saves the registration information of the first node to the local node list; the second node initiates a service connectivity test on the first node, and sends the service reachability state of the first node to the neighbor node, and the service connectivity test includes a test on the network address and the service corresponding port; if the second node passes the validity check and the service connectivity test of the network registration information of the first node, the network registration information of the first node is sent to the blockchain network, so that the first node completes registration. 2.The method of claim 1, wherein, The network registration information at least includes network address, service corresponding port, privacy declaration and / or authentication requirement; wherein, the privacy declaration is used to set and control the visibility of the first node to other nodes of the blockchain network. 3.The method of claim 1, wherein, The process that the first node obtains a screened node list from the second node, comprising: The first node sends a node list request to the second node, and the node list request includes obtaining node network address, service name and / or service port number; In response to the first node request, the second node excludes the nodes set as invisible and / or the nodes network unreachable within a set time from the node list saved locally; The second node feeds back the node list to the first node. 4.The method of claim 1, wherein, The process in which the first node initiates a service connectivity test on the third node in the node list and confirms whether the third node remains in the node list based on the service connectivity test result, comprises: The first node checks the reachability of the network address and the corresponding service port of the third node; If both the network address and the corresponding service port of the third node are reachable, the first node marks the third node as service-reachable and saves the third node in the node list; If the network address or the corresponding service port of the third node is not reachable, the first node marks the third node as service-unreachable; and the first node sets a timeout timer for the third node marked as service-unreachable, and if the third node is still not reachable within the set time, removes the third node from the node list of the first node. 5.The method of claim 4, wherein, Further comprising: The first node periodically tests the service connectivity of the third node and marks the service reachability of the third node according to the test result. 6.The method of claim 1, wherein, If it is confirmed that the third node remains in the node list, the process in which the first node initiates a unique service connection with the third node, comprises: The first node initiates a service connection request to the third node, and the service connection request at least includes a network address and a corresponding service port; The third node checks whether a service connection has been established between the first node and the third node; If the service connection is not established, a service connection is established between the first node and the third node.
7. The blockchain node discovery method of claim 6, wherein, Further comprising: If the service connection between the first node and the third node has been established, it is checked whether a service connection has been established between the first node and the third node; If the established service connection is greater than 1, the service connection initiated by the node with a larger network address is retained. 8.A method for discovering a blockchain node, a blockchain network comprising a second node and a third node, the third node being recorded in a node list stored locally by the second node; the method comprising: The first node establishes a connection with the second node as a new node to be added, and applied to the first node, comprising: sending a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result; wherein the network access request is created and issued to the first node by a blockchain network administrator in advance, and at least includes a key and / or a credential; if allowed to join the blockchain network, send a network registration information request to the second node, so that the second node sends the network registration information to the blockchain network according to the network registration information request checking result and the service connectivity test result, and feeds back the registration result; if the registration is completed, the filtered node list of the second node is obtained; wherein the filtered node list includes nodes set as visible and nodes network-reachable within a set time; initiating a service connectivity test on the third node in the node list, and confirming whether the third node remains in the node list based on the service connectivity test result; if it is confirmed that the third node remains in the node list, initiating a unique service connection with the third node; The process of sending the network registration information of the first node to the blockchain network and feeding back the registration result to the first node according to the checking result of the network registration information request of the first node and the service connectivity test result comprises: the second node checks the validity of the network registration information of the first node, and saves the registration information of the first node into a local node list if the checking is passed; the second node initiates a service connectivity test of the first node, and sends the service reachability state of the first node to a neighbor node, the service connectivity test comprising a test of a network address and a service corresponding port; if the validity checking of the network registration information of the first node and the service connectivity test are both passed, the network registration information of the first node is sent to the blockchain network, so that the first node completes the registration. 9.A method for discovering a blockchain node, the blockchain network comprising a second node, the method comprising: The first node as a new node to be joined establishes a connection with the second node, and the second node comprises: receiving and responding to a network access request sent by the first node, and initiating a validity verification of the network access request to the blockchain network and feeding back a verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created by a blockchain network administrator and issued to the first node in advance, and at least includes a key and / or a credential; if the first node is allowed to join the blockchain network, receiving a network registration information request sent by the first node, and sending the network registration information of the first node to the blockchain network and feeding back a registration result to the first node according to the checking result of the network registration information request of the first node and the service connectivity test result, so that the network registration information of the first node is recorded in the blockchain network; if the first node completes the registration, sending a screened node list to the first node, so that the first node obtains the node list and the corresponding node information saved in the second node locally; wherein the screened node list includes nodes set as visible and nodes network-reachable within a set time; The process of sending the network registration information of the first node to the blockchain network and feeding back the registration result to the first node according to the checking result of the network registration information request of the first node and the service connectivity test result comprises: checking the validity of the network registration information of the first node, and saving the registration information of the first node into a local node list if the checking is passed; initiating a service connectivity test of the first node, and sending the service reachability state of the first node to a neighbor node, the service connectivity test comprising a test of a network address and a service corresponding port; if the validity checking of the network registration information of the first node and the service connectivity test are both passed, the network registration information of the first node is sent to the blockchain network, so that the first node completes the registration. 10.A method for discovering a blockchain node, a blockchain network comprising a second node and a third node, the third node being recorded in a node list of a first node, the first node being the first node of claim 8, the second node being the second node of claim 9; characterized in that, The third node comprises: In response to the service connectivity test instruction initiated by the first node, feedback the connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list; In response to the service connection check request of the first node and feedback the check result, so that the first node confirms the unique service connection between the third node. 11.A blockchain node discovery apparatus, a blockchain network comprising a second node and a third node, the third node being recorded in a node list maintained locally by the second node; characterized in that, The first node as a new node to be joined establishes a connection with the second node, and is applied to the first node, the second node and the third node, comprising: A first module for sending a network access request to the second node by the first node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back the verification result to the first node; wherein the network access request is created and issued to the first node by a blockchain network administrator, and at least includes a key and / or a certificate; A second module for sending a network registration information request to the second node by the first node if the first node is allowed to join the blockchain network, and sending the network registration information of the first node to the blockchain network and feeding back the registration result to the first node by the second node according to the check result of the network registration information request of the first node and the service connectivity test result; A third module for obtaining a screened node list from the second node by the first node if the first node completes registration; wherein the screened node list includes nodes set as visible and nodes network-reachable within a set time; A fourth module for initiating a service connectivity test by the first node on the third node in the node list, and confirming whether the third node remains in the node list based on the result of the service connectivity test; A fifth module for initiating a unique service connection by the first node on the third node if it is confirmed that the third node remains in the node list; The process of the second node sending the network registration information of the first node to the blockchain network and feeding back the registration result to the first node according to the check result of the network registration information request of the first node and the service connectivity test result, comprising: the second node checks the validity of the network registration information of the first node, and if the check passes, the second node saves the registration information of the first node to the local node list; the second node initiates a service connectivity test on the first node, and sends the service reachability state of the first node to the neighbor node, and the service connectivity test includes a test on the network address and the service corresponding port; if the validity check of the network registration information of the first node and the service connectivity test of the second node both pass, the network registration information of the first node is sent to the blockchain network, so that the first node completes registration. 12.A blockchain node discovery apparatus, a blockchain network comprising a second node and a third node, the third node being recorded in a node list maintained locally by the second node; characterized in that, The first node as a new node to be joined establishes a connection with the second node, and is applied to the first node, comprising: The first module is configured to send a network access request to the second node, so that the second node initiates validity verification of the network access request to the blockchain network and feeds back a verification result; wherein the network access request is created and issued to the first node in advance by a blockchain network administrator, and at least includes a key and / or a credential; The second module is configured to, if allowed to join the blockchain network, send a network registration information request to the second node, so that the second node sends the network registration information to the blockchain network according to a network registration information request inspection result and a service connectivity test result, and feeds back a registration result; The third module is configured to, if the registration is completed, acquire a screened node list of the second node; wherein the screened node list includes nodes set as visible and nodes that are network-reachable within a set time; The fourth module is configured to initiate a service connectivity test on the third node in the node list, and confirm whether the third node is retained in the node list based on a result of the service connectivity test; The fifth module is configured to, if it is confirmed that the third node is retained in the node list, initiate a unique service connection with the third node. The process in which the second node sends the network registration information of the first node to the blockchain network and feeds back a registration result to the first node according to a network registration information request inspection result and a service connectivity test result of the first node includes: the second node inspects the validity of the network registration information of the first node, and if the inspection is passed, the second node saves the registration information of the first node to a local node list; the second node initiates a service connectivity test on the first node, and sends a service reachability state of the first node to a neighbor node, the service connectivity test including a test on a network address and a service corresponding port; if the validity inspection and the service connectivity test of the second node on the network registration information of the first node are both passed, the network registration information of the first node is sent to the blockchain network, so that the first node completes the registration. 13.A blockchain node discovery apparatus, a blockchain network comprising a second node, characterized in that, The first node as a new node to be joined establishes a connection with the second node, and the application is applied to the second node, and includes: The first module is configured to receive and respond to a network access request sent by the first node, and initiate validity verification of the network access request to the blockchain network and feed back a verification result to the first node, so that the first node is allowed to join the blockchain network according to the verification feedback result; wherein the network access request is created and issued to the first node in advance by a blockchain network administrator, and at least includes a key and / or a credential; The second module is configured to, if the first node is allowed to join the blockchain network, receive the network registration information request sent by the first node, and send the network registration information of the first node to the blockchain network and feed back the registration result to the first node according to the checking result of the network registration information request of the first node and the service connectivity test result, so that the network registration information of the first node is recorded in the blockchain network. The third module is configured to, if the first node completes the registration, send the screened node list to the first node, so that the first node obtains the node list and the corresponding node information saved in the second node locally; wherein the screened node list includes the nodes set as visible and the nodes that are network-reachable within a set time. The second module is further configured to check the validity of the network registration information of the first node, and save the registration information of the first node in the local node list if the checking passes; initiate the service connectivity test of the first node, and send the service reachability state of the first node to the neighbor node; the service connectivity test includes the test on the network address and the service corresponding port; if the validity checking of the network registration information of the first node and the service connectivity test both pass, the network registration information of the first node is sent to the blockchain network, so that the first node completes the registration. 14.A blockchain node discovery apparatus, a blockchain network comprising a second node and a third node, the third node being recorded in a node list of a first node, the first node being the first node of claim 12, the second node being the second node of claim 13; characterized in that, The third node comprises: The first module is configured to, in response to the service connectivity test instruction initiated by the first node, feed back the connectivity test result with the first node, so that the first node confirms whether the third node remains in the local node list; The second module is configured to, in response to the service connection checking request of the first node and feed back the checking result, so that the first node confirms the unique service connection between the first node and the third node.
15. An electronic device, comprising: The third node comprises: A processor; And A memory arranged to store computer-executable instructions that, when executed, cause the processor to perform the method of any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which, when executed by an electronic device comprising a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Network acceleration service processing method and device
CN110557290A
Blockchaining for media distribution
US20170134161A1