CN111277635A - Method, equipment, device and computer medium for accessing external node to block chain - Google Patents

Method, equipment, device and computer medium for accessing external node to block chain Download PDF

Info

Publication number
CN111277635A
CN111277635A CN202010037835.XA CN202010037835A CN111277635A CN 111277635 A CN111277635 A CN 111277635A CN 202010037835 A CN202010037835 A CN 202010037835A CN 111277635 A CN111277635 A CN 111277635A
Authority
CN
China
Prior art keywords
node
external
blockchain system
access
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010037835.XA
Other languages
Chinese (zh)
Other versions
CN111277635B (en
Inventor
鲁塔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN202010037835.XA priority Critical patent/CN111277635B/en
Publication of CN111277635A publication Critical patent/CN111277635A/en
Application granted granted Critical
Publication of CN111277635B publication Critical patent/CN111277635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, equipment, a device and a storage medium for accessing an external node to a block chain, which are applied to a seed node server in a block chain system, and used for receiving an access request sent by a first external node, wherein the access request is used for requesting to access the block chain system, and the first external node is a node which is not accessed to the block chain system; acquiring node information of an agent node in a blockchain system and an external node accessed to the blockchain system; selecting a target node set from the agent node and the external node accessed to the block chain system based on the node information; and sending the information of the target node set to the first external node so that the first external node accesses the block chain system based on the information of the target node set through the DHT algorithm. In the present application, the first external node may access the blockchain system through the proxy node or the external node that has accessed the blockchain system, so that the performance impact on the blockchain system when the external node accesses the blockchain system can be reduced.

Description

Method, equipment, device and computer medium for accessing external node to block chain
Technical Field
The present application relates to the field of blockchain technology, and more particularly, to a method, device, apparatus, and computer medium for accessing a blockchain by an external node.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain (Blockchain) is an important concept of the bitcoin, is essentially a decentralized database, and is used as a bottom-layer technology of the bitcoin, and is a series of data blocks which are generated by correlation by using a cryptographic method, wherein each data block contains information of a batch of bitcoin network transactions, the information is used for verifying the validity (anti-counterfeiting) of the information and generating the next block, and the Blockchain has the characteristics of traceability and difficult change. The use of blockchains is becoming more widespread due to their traceable and unalterable nature.
In the application process of the block chain, when an external node accesses the block chain, the external node needs to be connected with the proxy node in the block chain to access the block chain, however, when a large number of external nodes access the block chain, the performance of the proxy node needs to be improved or the number of the proxy nodes needs to be increased, so that all the external nodes can access the block chain, and therefore the performance of the block chain is greatly influenced when the external node is accessed.
In summary, how to reduce the performance impact on the block chain when an external node accesses is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The present application is directed to provide a method for an external node to access a blockchain, which can solve the technical problem of how to reduce the performance impact on the blockchain when the external node accesses. The application also provides equipment, a device and a computer readable storage medium for accessing the external node into the block chain system.
In order to achieve the above object, the present application provides a method for an external node to access a blockchain system, which is applied to a seed node server in the blockchain system, and includes:
receiving an access request sent by a first external node, wherein the access request is used for requesting to access the blockchain system, and the first external node is a node which does not access the blockchain system;
acquiring node information of an agent node in the blockchain system and an external node accessed to the blockchain system;
selecting a target node set from the proxy node and the external node accessed to the blockchain system based on the node information;
and sending the information of the target node set to the first external node so that the first external node accesses the block chain based on the information of the target node set through a DHT algorithm.
Preferably, the selecting a target node set from the proxy node and the external node having access to the blockchain system includes:
selecting a target proxy node set from the proxy nodes;
selecting a target accessed external node set from the external nodes accessed to the block chain system;
and taking the target agent node set and the target accessed external node set as the target node set.
Preferably, the selecting a target node set from the proxy node and the external node having access to the blockchain system includes:
randomly selecting a preset number of nodes as the target node set from the proxy node and the external nodes accessed to the blockchain system.
Preferably, the selecting a target node set from the proxy node and the external node having access to the blockchain system includes:
selecting the set of target nodes among the proxy node and the external nodes that have access to the blockchain system based on performance requirements of the proxy node and/or the blockchain system.
Preferably, the acquiring node information of the proxy node in the blockchain system and the external node having access to the blockchain system includes:
acquiring node information of the agent node;
and acquiring node information of the external node which is connected with the agent node through the DHT algorithm and has accessed to the block chain system.
Preferably, after the sending the information of the target node set to the first external node, the method further includes:
and judging whether node request information sent by the first external node is received or not, if so, returning to execute the steps of selecting a target node set from the proxy node and the external node accessed to the block chain system and the subsequent steps.
Preferably, after obtaining node information of the proxy node in the blockchain system and the external node having accessed the blockchain system, before selecting a target node set from the proxy node and the external node having accessed the blockchain system, the method further includes:
and judging whether the request access information sent by the first external node is received or not, if so, executing the steps of selecting a target node set from the proxy node and the external node accessed to the block chain system and then.
Preferably, after obtaining node information of the proxy node in the blockchain system and the external node having accessed to the blockchain system, the method further includes:
and inquiring and storing the information of the proxy node and other nodes connected with the external node accessed to the blockchain system.
Preferably, the querying and storing information of the proxy node and other nodes connected to the external node having access to the blockchain system includes:
inquiring and storing the information of other nodes connected with the agent node;
and inquiring and storing the information of other nodes connected with the external node accessed to the block chain system through the temporarily bound udp port and the DHT algorithm, and closing the udp port after the inquiry is finished.
The application provides a method for accessing a blockchain system by an external node, which is applied to a first external node which does not access the blockchain system, and comprises the following steps:
sending an access request to a seed node server in a block chain system; the access request is used for requesting to access the block chain system;
receiving information of a target node set sent by a seed node server in the block chain system;
accessing the block chain system based on the information of the target node set through a DHT algorithm;
the target node set is a node set selected by the seed node server from the proxy node in the blockchain system and the external node accessed to the blockchain system.
Preferably, after accessing the blockchain system based on the information of the target node set through the DHT algorithm, the method further includes:
judging whether the target node set is accessed to the block chain system or not, if not, deleting the target node set received by the seed node set, and sending node request information to the seed node server so as to obtain new information of the target node set through the seed node server.
Preferably, the determining whether to access the blockchain system includes:
judging whether the height of the first block is unchanged;
if the first block height is not changed, acquiring the latest block height on the seed node server;
and judging whether the difference value between the first block height and the latest block height is greater than a preset value, if so, judging that the block chain system is not accessed.
In order to achieve the above object, the present application further provides an apparatus for an external node to access a blockchain system, which is applied to a seed node server in the blockchain system, and includes:
a first receiving module, configured to receive an access request sent by a first external node, where the access request is used to request to access the blockchain system, and the first external node is a node that does not access the blockchain system;
a first obtaining module, configured to obtain node information of an agent node in the blockchain system and an external node that has accessed the blockchain system;
a first selection module, configured to select a target node set from the proxy node and the external node that has accessed the blockchain system based on the node information;
a first sending module, configured to send the information of the target node set to the first external node, so that the first external node accesses the block chain through a DHT algorithm based on the information of the target node set.
To achieve the above object, the present application further provides an apparatus for an external node access blockchain system, the apparatus including a memory and a processor, the memory having stored thereon an external node access blockchain program operable on the processor, the external node access blockchain program, when executed by the processor, implementing the method as described in any one of the above.
To achieve the above object, the present application further provides a computer readable storage medium having stored thereon an external node access blockchain program, which is executable by one or more processors to implement the method of accessing a blockchain system by an external node as described in any one of the above.
The method for accessing the block chain system by the external node is applied to a seed node server in the block chain system, and is used for receiving an access request sent by a first external node, wherein the access request is used for requesting to access the block chain system, and the first external node is a node which does not access the block chain system; acquiring node information of an agent node in a blockchain system and an external node accessed to the blockchain system; selecting a target node set from the agent node and the external node accessed to the block chain system based on the node information; and sending the information of the target node set to the first external node so that the first external node accesses the block chain system based on the information of the target node set through the DHT algorithm. In the method for accessing the external node into the blockchain system, the seed node server obtains node information of the proxy node in the blockchain system and the external node accessed into the blockchain system, and based on the node information, the target node set is selected from the proxy node and the external node accessed to the blockchain system, that is, the target node set may include the proxy node or the external node accessed to the blockchain system, so that when the first external node accesses the blockchain system based on the information of the target node set through the DHT algorithm, the blockchain system can be accessed through the proxy node or the external node accessed to the blockchain system, the aim of relieving the service pressure of the proxy node through the DHT algorithm and the external node accessed to the blockchain system is achieved, and the performance influence on the blockchain system when the external node is accessed can be reduced. The device, the apparatus and the computer-readable storage medium for accessing the external node to the blockchain system provided by the application also solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a first embodiment of the present application;
FIG. 2 is a block chain system according to the present application;
FIG. 3 is a schematic flow chart of a second embodiment of the present application;
fig. 4 is a first structural diagram of an apparatus for an external node to access a blockchain system according to an embodiment of the present disclosure;
fig. 5 is a second structural diagram of an apparatus for an external node to access a blockchain system according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating an internal structure of an apparatus for accessing a block chain system by an external node according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The application provides a method for accessing a block chain system by an external node.
Referring to fig. 1 and fig. 2, fig. 1 is a flowchart illustrating a first embodiment of the present application, and fig. 2 is a structural diagram illustrating a block chain system of the present application, where proxy p represents a proxy node, bootNode represents a seed node server, and validator represents a node for block extraction and voting in a block chain.
In a first embodiment, the method is applied to a seed node server in a blockchain, and may include the following steps:
step S101: and receiving an access request sent by a first external node, wherein the access request is used for requesting access to the blockchain system, and the first external node is a node which is not accessed to the blockchain system.
In practical applications, the seed node server may receive the access request sent by the first external node, and then the seed node server may perform an access operation on the first external node based on the access request.
Step S102: node information of a proxy node in a blockchain system and an external node having access to the blockchain system is obtained.
In practical application, the method for selecting the seed node server in the blockchain system may be determined according to actual needs, for example, a node satisfying a preset performance requirement in the blockchain system is used as the seed node server. After the seed node server is selected from the block chain system, the seed node server can acquire node information of the agent node in the block chain system and the external node accessed to the block chain system, specifically, the seed node server can acquire the agent node in the block chain system first and then acquire the information of the external node accessed to the block chain system through inquiring the agent node; in addition, for convenience of management, the seed node server may further store node information of the proxy node and the external node accessed to the blockchain system in a kbucket or db, and then may manage the node information by using the kbucket or db.
Step S103: based on the node information, a set of target nodes is selected from the proxy node and the external nodes that have access to the blockchain system.
In practical application, the seed node server may select a target node set from the proxy node and the external node accessed to the blockchain system based on the node information as needed, that is, the target node set may only include the proxy node, may only include the proxy node accessed to the blockchain system, and may include both the proxy node and the proxy node accessed to the blockchain system; correspondingly, the first external node can be accessed into the blockchain system through the proxy node, and can also be accessed into the blockchain system through the external node accessed into the blockchain system, so that the first external node is not limited to be accessed into the blockchain system through the proxy node any more, the flexibility of accessing the blockchain system by the first external node is improved, and the service pressure of the proxy node is reduced; in addition, the external nodes accessed to the block chain system can increase the difficulty of attacking the agent nodes by malicious external nodes, and the safety degree of the agent nodes is improved. It should be noted that the number of nodes in the target node set may be determined according to actual needs, for example, the target node set may include only one node.
In a specific application scenario, in order to enable a first external node to access a blockchain system through a proxy node and enable not all first external nodes to access the blockchain system through the proxy node, when a seed node server selects a target node set from the proxy node and the external nodes which have accessed the blockchain system, the seed node server may first select the target proxy node set from the proxy node; selecting a target accessed external node set from external nodes accessed to the block chain system; and finally, taking the target agent node set and the target accessed external node set as a target node set.
In a specific application scenario, in order to improve the efficiency of selecting a target node set, when a seed node server selects the target node set from a proxy node and an external node accessed to a blockchain system, a preset number of nodes may be randomly selected from the proxy node and the external node accessed to the blockchain system as the target node set.
In a specific application scenario, in order to balance the performance of the blockchain system or the proxy node, when the seed node server selects the target node set from the proxy node and the external node accessed to the blockchain system, the target node set may be selected from the proxy node and the external node accessed to the blockchain system based on the performance requirement of the proxy node and/or the blockchain system. Specifically, when the service pressure of the proxy node is large, the target node set may be selected only from the external nodes that have accessed the blockchain system.
Step S104: and sending the information of the target node set to the first external node so that the first external node accesses the block chain system based on the information of the target node set through the DHT algorithm.
In practical application, after the seed node server selects the target node set, the information of the target node set can be sent to a first external node; it should be noted that, since the DHT algorithm may enable the first external node to be responsible for a small-range routing and for storing a small portion of data without a server, after the first external node is connected with the target node through the DHT algorithm, subsequent other nodes may access the block chain through the first external node.
The method for accessing the block chain system by the external node is applied to a seed node server in the block chain system, and is used for receiving an access request sent by a first external node, wherein the access request is used for requesting to access the block chain system, and the first external node is a node which does not access the block chain system; acquiring node information of an agent node in a blockchain system and an external node accessed to the blockchain system; selecting a target node set from the agent node and the external node accessed to the block chain system based on the node information; and sending the information of the target node set to the first external node so that the first external node accesses the block chain system based on the information of the target node set through the DHT algorithm. In the method for accessing the external node into the blockchain system, the seed node server obtains node information of the proxy node in the blockchain system and the external node accessed into the blockchain system, and based on the node information, the target node set is selected from the proxy node and the external node accessed to the blockchain system, that is, the target node set may include the proxy node or the external node accessed to the blockchain system, so that when the first external node accesses the blockchain system based on the information of the target node set through the DHT algorithm, the block chain can be accessed through the proxy node or the external node accessed to the block chain system, the aim of relieving the service pressure of the proxy node through the DHT algorithm and the external node accessed to the block chain system is achieved, and the performance influence on the block chain system when the external node is accessed can be reduced.
In the first embodiment, in order to improve the efficiency of the seed node server in acquiring the node information, and in order to improve the success rate of the first external node accessing the blockchain system through the external node accessed to the blockchain system, the seed node server may acquire the node information of the proxy node first when acquiring the node information of the proxy node in the blockchain system and the node information of the external node accessed to the blockchain system; and then acquiring node information of the external node which is connected to the blockchain system by the proxy node through the DHT algorithm.
In the first embodiment, after the first external node accesses the block chain based on the target node set, the block chain may not be accessed, at this time, the first external node may send corresponding node request information to the seed node server, so as to obtain a new target node set through the seed node server, and accordingly, after the seed node server sends information of the target node set to the first external node, it may also be determined whether the node request information sent by the first external node is received, and if so, the steps of selecting the target node set and the subsequent steps from the proxy node and the external node that has accessed the block chain system are performed.
In the first embodiment, the triggering condition for the seed node server to select the target node set may be determined by the first external node, for example, when the first external node needs to access the blockchain, the first external node sends corresponding information to the seed node server to trigger the seed node server to perform an action of selecting the target node set, and accordingly, after the seed node server obtains node information of the proxy node in the blockchain system and the external node that has accessed the blockchain system, before the proxy node and the external node that has accessed the blockchain system select the target node set, the seed node server may further determine whether to receive access request information sent by the first external node, and if so, perform steps of selecting and then selecting the target node set from the proxy node and the external node that has accessed the blockchain system.
In the first embodiment, when the blockchain system needs to be updated or rebuilt, after the seed node server obtains the node information of the proxy node in the blockchain system and the node information of the external node that has accessed the blockchain system, the seed node server may also query and store the information of other nodes connected to the proxy node and the external node that has accessed the blockchain system, so that the connection relationship between the nodes in the blockchain system may be determined according to the stored information, and the architecture of the blockchain system may be determined.
Specifically, in order to avoid the malicious external node from attacking the seed node server, when the seed node server queries and stores the information of the agent node and other nodes connected to the external node accessed to the block chain system, the seed node server may first query and store the information of the other nodes connected to the agent node; and then inquiring and storing the information of other nodes connected with the external node accessed into the block chain system through the temporarily bound udp port and the DHT algorithm, and closing the udp port after the inquiry is completed, so that the time interval of sending the information to the seed node server by the external node is reduced, and the difficulty of attacking the seed node server by the external node is increased.
Referring to fig. 3, fig. 3 is a schematic flow chart of a second embodiment of the present application.
In a second embodiment, the method is applied to a first external node which does not access a blockchain system, and may include:
step S201: sending an access request to a seed node server in a block chain system; the access request is used for requesting to access the block chain system;
step S202: receiving information of a target node set sent by a seed node server in a block chain system;
step S203: accessing information based on a target node set into a block chain system through a DHT algorithm; the target node set is a node set selected by the seed node server from the proxy node in the blockchain and the external node accessed to the blockchain system.
In the second embodiment, after accessing the blockchain system based on the information of the target node set through the DHT algorithm, the first external node may further determine whether the first external node itself accesses the blockchain system, and if not, delete the target node set received by the first external node itself, and send the node request information to the seed node server, so as to obtain information of a new target node set through the seed node server. Specifically, after determining that the first external node does not access the blockchain system, the first external node may actively disconnect the first external node from other nodes except the seed node server.
In the second embodiment, in order to quickly determine whether the first external node accesses the blockchain system, when determining whether the first external node accesses the blockchain system, the first external node may determine whether the first external node accesses the blockchain system by using the block height, and specifically, may determine whether the first block height of the first external node is unchanged; if the first block height is not changed, acquiring the latest block height on the seed node server; and judging whether the difference value between the first block height and the latest block height is greater than a preset value, if so, judging that the block chain system is not accessed.
In another aspect, the present application provides an apparatus for an external node to access a blockchain system.
Referring to fig. 4, fig. 4 is a first structural diagram of an apparatus for an external node to access a blockchain system according to an embodiment of the present disclosure.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and can include:
a first receiving module 101, configured to receive an access request sent by a first external node, where the access request is used to request access to a blockchain system, and the first external node is a node that does not access the blockchain system;
a first obtaining module 102, configured to obtain node information of an agent node in the blockchain system and an external node that has accessed the blockchain system;
a first selection module 103, configured to select a target node set from the proxy node and the external node that has accessed the blockchain system based on the node information;
a first sending module 104, configured to send information of the target node set to the first external node, so that the first external node accesses the blockchain system through the DHT algorithm based on the information of the target node set.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and the first selection module may include:
the first selection unit is used for selecting a target proxy node set from the proxy nodes;
a second selecting unit, configured to select a target accessed external node set from external nodes that have accessed the blockchain system;
the first acting unit is used for taking the target proxy node set and the target accessed external node set as a target node set.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and the first selection module may include:
and a third selecting unit, configured to randomly select a preset number of nodes as the target node set from the proxy node and the external node that has accessed the blockchain system.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and the first selection module may include:
and the fourth selection unit is used for selecting a target node set from the proxy node and the external node accessed to the blockchain system based on the performance requirements of the proxy node and/or the blockchain system.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and the first obtaining module may include:
the first acquisition submodule is used for acquiring node information of the proxy node;
and the second acquisition submodule is used for acquiring the node information of the external node which is connected to the block chain system and is accessed to the proxy node through the DHT algorithm.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and can further include:
and the first judging module is used for judging whether node request information sent by the first external node is received or not after the first sending module sends the information of the target node set to the first external node, and if so, returning to execute the steps of selecting the target node set from the proxy node and the external node accessed to the block chain system and the subsequent steps.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in a blockchain, and can further include:
and the second judging module is used for judging whether the access request information sent by the first external node is received or not after the first acquiring module acquires the node information of the proxy node in the block chain and the external node accessed to the block chain system, and before the first selecting module selects the target node set from the proxy node and the external node accessed to the block chain system, if so, executing the steps of selecting the target node set from the proxy node and the external node accessed to the block chain system and then.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and can further include:
the first query module is used for querying and storing the information of the agent node and other nodes connected with the external node accessed into the blockchain system after the first acquisition module acquires the node information of the agent node in the blockchain system and the node information of the external node accessed into the blockchain system.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to a seed node server in the blockchain system, and the first query module may include:
the first query unit is used for querying and storing the information of other nodes connected with the proxy node;
and the second query unit is used for querying and storing the information of other nodes connected with the external node accessed to the block chain system through the temporarily bound udp port and the DHT algorithm, and closing the udp port after the query is completed.
Referring to fig. 5, fig. 5 is a second structural diagram of an apparatus for an external node to access a blockchain system according to an embodiment of the present disclosure.
The device for accessing the external node to the blockchain system, applied to the first external node, may include:
a first sending module 201, configured to send an access request to a seed node server in a blockchain system; the access request is used for requesting to access the block chain system;
a second receiving module 202, configured to receive information of a target node set sent by a seed node server in a blockchain system;
a first access module 203, configured to access the blockchain system based on information of the target node set through a DHT algorithm;
the target node set is a node set selected by the seed node server from the proxy node in the blockchain system and the external node accessed to the blockchain system.
The device for accessing the external node to the blockchain system provided by the present application is applied to a first external node, and may further include:
and the third judging module is used for judging whether the first access module accesses the block chain system or not after the first access module accesses the block chain system based on the information of the target node set through a DHT algorithm, if not, deleting the target node set received by the first access module, and sending node request information to the seed node server so as to obtain the information of a new target node set through the seed node server.
The application provides an apparatus for accessing an external node to a blockchain system, which is applied to an external node that is not accessed, and the third determining module may include:
the first judging unit is used for judging whether the height of the first block of the first judging unit is unchanged; if the first block height is not changed, acquiring the latest block height on the seed node server;
and the second judging unit is used for judging whether the difference value between the height of the first block and the height of the latest block is greater than a preset value or not, and if so, judging that the second block is not accessed to the block chain system.
In another aspect, the present application provides an apparatus for an external node to access a blockchain system.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating an internal structure of an apparatus for accessing a block chain system by an external node according to an embodiment of the present disclosure.
In this embodiment, the external node access blockchain apparatus 1 may be a PC (Personal Computer), or may be a terminal device of a smart phone, a tablet Computer, a palm Computer, a portable Computer, an intelligent router, an ore machine, or a network storage device.
The external node access blockchain apparatus 1 may include a memory 11, a processor 12 and a bus 13.
The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the external node access blockchain apparatus 1, e.g. a hard disk of the external node access blockchain apparatus 1. The memory 11 may also be an external storage device of the external node access block chain apparatus 1 in other embodiments, for example, a plug-in hard disk provided on the external node access block chain apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also comprise both internal storage units and external storage devices of the external node access blockchain apparatus 1. The memory 11 may be used not only to store application software installed in the external node access blockchain apparatus 1 and various types of data, such as the code of the external node access blockchain program 01, but also to temporarily store data that has been output or is to be output.
Processor 12, which in some embodiments may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, executes program code or processes data stored in memory 11, such as executing external node access blockchain program 01.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Further, the external node access blockchain apparatus may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the apparatus 1 and other electronic devices.
Optionally, the external node access block chain apparatus 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the external node access blockchain apparatus 1 and for displaying a visual user interface.
Fig. 6 only shows the external node access blockchain apparatus 1 with the components 11-14 and the external node access blockchain procedure 01, it will be understood by those skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the external node access blockchain apparatus 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
A computer-readable storage medium is provided, on which an external node access blockchain program is stored, the external node access blockchain program being executable by one or more processors to implement an external node access blockchain method as described in any of the above embodiments.
Reference herein to a computer-readable storage medium includes Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (15)

1. A method for an external node to access a blockchain system, the method being applied to a seed node server in the blockchain system, and comprising:
receiving an access request sent by a first external node, wherein the access request is used for requesting to access the blockchain system, and the first external node is a node which does not access the blockchain system;
acquiring node information of an agent node in the blockchain system and an external node accessed to the blockchain system;
selecting a target node set from the proxy node and the external node accessed to the blockchain system based on the node information; and sending the information of the target node set to the first external node so that the first external node accesses the blockchain system through a DHT algorithm based on the information of the target node set.
2. The method of claim 1, wherein selecting a set of target nodes among the proxy node and the external nodes having access to the blockchain system comprises:
selecting a target proxy node set from the proxy nodes;
selecting a target accessed external node set from the external nodes accessed to the block chain system;
and taking the target agent node set and the target accessed external node set as the target node set.
3. The method of claim 1, wherein selecting a set of target nodes among the proxy node and the external nodes having access to the blockchain system comprises:
randomly selecting a preset number of nodes as the target node set from the proxy node and the external nodes accessed to the blockchain system.
4. The method of claim 1, wherein selecting a set of target nodes among the proxy node and the external nodes having access to the blockchain system comprises:
selecting the set of target nodes among the proxy node and the external nodes that have access to the blockchain system based on performance requirements of the proxy node and/or the blockchain system.
5. The method according to any one of claims 1 to 4, wherein the obtaining node information of the proxy node in the blockchain system and the external node having access to the blockchain system comprises:
acquiring node information of the agent node;
and acquiring node information of the external node which is connected with the agent node through the DHT algorithm and has accessed to the block chain system.
6. The method of claim 5, wherein after sending the information for the set of target nodes to the first external node, further comprising:
and judging whether node request information sent by the first external node is received or not, if so, returning to execute the steps of selecting a target node set from the proxy node and the external node accessed to the block chain system and the subsequent steps.
7. The method of claim 5, wherein after obtaining node information of a proxy node in the blockchain system and a foreign node having access to the blockchain system, and before selecting a target node set from the proxy node and the foreign node having access to the blockchain system, the method further comprises:
and judging whether the request access information sent by the first external node is received or not, if so, executing the steps of selecting a target node set from the proxy node and the external node accessed to the block chain system and then.
8. The method of claim 5, wherein after obtaining node information of the proxy node in the blockchain system and the external node having access to the blockchain system, the method further comprises:
and inquiring and storing the information of the proxy node and other nodes connected with the external node accessed to the blockchain system.
9. The method according to claim 8, wherein said querying and storing information of said proxy node and other nodes connected to said external node having access to said blockchain system comprises:
inquiring and storing the information of other nodes connected with the agent node;
and inquiring and storing the information of other nodes connected with the external node accessed to the block chain system through the temporarily bound udp port and the DHT algorithm, and closing the udp port after the inquiry is finished.
10. A method for an external node to access a blockchain system, the method being applied to a first external node not accessing the blockchain system, and comprising:
sending an access request to a seed node server in a block chain system; the access request is used for requesting to access the block chain system;
receiving information of a target node set sent by a seed node server in the block chain system;
accessing the block chain system based on the information of the target node set through a DHT algorithm;
the target node set is a node set selected by the seed node server from the proxy node in the blockchain system and the external node accessed to the blockchain system.
11. The method according to claim 10, wherein after accessing the blockchain system based on the information of the target node set through DHT algorithm, further comprising:
judging whether the target node set is accessed to the block chain system or not, if not, deleting the target node set received by the seed node set, and sending node request information to the seed node server so as to obtain new information of the target node set through the seed node server.
12. The method of claim 11, wherein the determining whether to access the blockchain system comprises:
judging whether the height of the first block is unchanged;
if the first block height is not changed, acquiring the latest block height on the seed node server;
and judging whether the difference value between the first block height and the latest block height is greater than a preset value, if so, judging that the block chain system is not accessed.
13. An apparatus for an external node to access a blockchain system, the apparatus being applied to a seed node server in the blockchain system, and comprising:
a first receiving module, configured to receive an access request sent by a first external node, where the access request is used to request to access the blockchain system, and the first external node is a node that does not access the blockchain system;
a first obtaining module, configured to obtain node information of an agent node in the blockchain system and an external node that has accessed the blockchain system;
a first selection module, configured to select a target node set from the proxy node and the external node that has accessed the blockchain system based on the node information;
a first sending module, configured to send the information of the target node set to the first external node, so that the first external node accesses the blockchain system through a DHT algorithm based on the information of the target node set.
14. An apparatus for an external node access blockchain system, the apparatus comprising a memory and a processor, the memory having stored thereon an external node access blockchain program executable on the processor, the external node access blockchain program when executed by the processor implementing the method of any of claims 1 to 12.
15. A computer readable storage medium having stored thereon an external node access blockchain program executable by one or more processors to implement a method of accessing a blockchain system by an external node as claimed in any one of claims 1 to 12.
CN202010037835.XA 2020-01-14 2020-01-14 Method, equipment, device and computer medium for accessing external node to block chain Active CN111277635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010037835.XA CN111277635B (en) 2020-01-14 2020-01-14 Method, equipment, device and computer medium for accessing external node to block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010037835.XA CN111277635B (en) 2020-01-14 2020-01-14 Method, equipment, device and computer medium for accessing external node to block chain

Publications (2)

Publication Number Publication Date
CN111277635A true CN111277635A (en) 2020-06-12
CN111277635B CN111277635B (en) 2022-11-08

Family

ID=71001661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010037835.XA Active CN111277635B (en) 2020-01-14 2020-01-14 Method, equipment, device and computer medium for accessing external node to block chain

Country Status (1)

Country Link
CN (1) CN111277635B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111914299A (en) * 2020-08-20 2020-11-10 深圳市腾盟技术有限公司 Method, device and equipment for optimizing predictive machine interface and storage medium
CN112055077A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Block link access method, device and storage medium
CN112565203A (en) * 2020-11-19 2021-03-26 深信服科技股份有限公司 Centralized management platform
CN113329081A (en) * 2021-05-28 2021-08-31 深圳技术大学 Block chain service access method, device and computer readable storage medium
CN115190162A (en) * 2022-06-27 2022-10-14 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130198332A1 (en) * 2010-08-20 2013-08-01 Alcatel Lucent Processing method, proxy processing agent, system and method for filling a routing table of a dht client node, router and dht client node
CN109451036A (en) * 2018-12-04 2019-03-08 北京创世智链信息技术研究院 A kind of block chain safety communicating method, service node and system
CN110191204A (en) * 2019-05-30 2019-08-30 深圳市网心科技有限公司 A kind of Intranet communication between devices method, system, device and computer storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130198332A1 (en) * 2010-08-20 2013-08-01 Alcatel Lucent Processing method, proxy processing agent, system and method for filling a routing table of a dht client node, router and dht client node
CN109451036A (en) * 2018-12-04 2019-03-08 北京创世智链信息技术研究院 A kind of block chain safety communicating method, service node and system
CN110191204A (en) * 2019-05-30 2019-08-30 深圳市网心科技有限公司 A kind of Intranet communication between devices method, system, device and computer storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111914299A (en) * 2020-08-20 2020-11-10 深圳市腾盟技术有限公司 Method, device and equipment for optimizing predictive machine interface and storage medium
CN112055077A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Block link access method, device and storage medium
CN112055077B (en) * 2020-09-02 2023-04-18 杭州复杂美科技有限公司 Block link access method, device and storage medium
CN112565203A (en) * 2020-11-19 2021-03-26 深信服科技股份有限公司 Centralized management platform
CN113329081A (en) * 2021-05-28 2021-08-31 深圳技术大学 Block chain service access method, device and computer readable storage medium
CN115190162A (en) * 2022-06-27 2022-10-14 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain
CN115190162B (en) * 2022-06-27 2023-11-28 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain

Also Published As

Publication number Publication date
CN111277635B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
CN111277635B (en) Method, equipment, device and computer medium for accessing external node to block chain
CN106933854B (en) Short link processing method and device and server
JP6626211B2 (en) Method and apparatus for processing short link and short link server
CN107491519B (en) Method and device for inquiring block chain account book
EP3816910A1 (en) Blockchain-based transaction processing method and apparatus, and electronic device
CN110473104B (en) Transaction processing method and related equipment
CN111414374B (en) Block chain transaction concurrent processing method, device and equipment
CN107239701B (en) Method and device for identifying malicious website
EP3817333B1 (en) Method and system for processing requests in a consortium blockchain
CN111224829B (en) Method and device for accessing external node to block chain network, and block chain network
CN109600254B (en) Method for generating full-link log and related system
CN110808974A (en) Data acquisition method and device, computer device and storage medium
CN110851334A (en) Flow statistical method, electronic device, system and medium
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN110874365B (en) Information query method and related equipment thereof
CN113486060A (en) Data access processing method and device, storage medium and electronic equipment
CN113282591A (en) Authority filtering method and device, computer equipment and storage medium
CN111224826B (en) Configuration updating method, device, system and medium based on distributed system
CN111193804B (en) Distributed storage method and device, network node and storage medium
CN110287049B (en) Data processing method, device and storage medium
CN109871715B (en) Access method and device of distributed storage file and storage medium
CN110855525A (en) Flow statistical method, electronic device, system and medium
JP6233846B2 (en) Variable-length nonce generation
CN116016174A (en) Rule base upgrading method and device, electronic equipment and storage medium
CN113434069A (en) Menu configuration method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210913

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant