CN112055077B - Block link access method, device and storage medium - Google Patents

Block link access method, device and storage medium Download PDF

Info

Publication number
CN112055077B
CN112055077B CN202010910734.9A CN202010910734A CN112055077B CN 112055077 B CN112055077 B CN 112055077B CN 202010910734 A CN202010910734 A CN 202010910734A CN 112055077 B CN112055077 B CN 112055077B
Authority
CN
China
Prior art keywords
blockchain
block chain
access
nodes
network
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.)
Active
Application number
CN202010910734.9A
Other languages
Chinese (zh)
Other versions
CN112055077A (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202010910734.9A priority Critical patent/CN112055077B/en
Publication of CN112055077A publication Critical patent/CN112055077A/en
Application granted granted Critical
Publication of CN112055077B publication Critical patent/CN112055077B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a block chain access method, a device and a storage medium, which are suitable for the technical field of block chains and the like, and the method comprises the following steps: sending request information for requesting to access the first block chain network to a seed node of the first block chain network; when the first blockchain network is not accessed within the first time length, a first blockchain node list of the first blockchain network is obtained through a pre-configured network address; and sending request information for requesting to access the first block chain network to a plurality of block chain nodes in the first block chain node list so as to access the first block chain network. According to the method and the device, when all the seed nodes in the blockchain network are down, the nodes pre-accessed to the blockchain network can still be correctly accessed to the blockchain network.

Description

Block link-in method, device and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, a device, and a storage medium for blockchain access.
Background
The node pre-accessing the blockchain network tries to connect with the built-in seed node to access the blockchain network after the node starts the blockchain service for the first time. If all the seed nodes are down at a certain moment, the nodes pre-accessed to the blockchain network cannot be accessed to the blockchain.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a method, apparatus, and storage medium for blockchain access that can properly access a blockchain network.
In a first aspect, the present invention provides a method for pre-accessing a node of a first blockchain network, where the method includes:
sending request information for requesting to access the first block chain network to a seed node of the first block chain network;
when the first blockchain network is not accessed within the first time length, a first blockchain node list of the first blockchain network is obtained through a pre-configured network address;
and sending request information for requesting to access the first block chain network to a plurality of block chain nodes in the first block chain node list so as to access the first block chain network.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a block chaining method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the block link entry method provided according to the embodiments of the present invention.
In the method, the device and the storage medium for accessing the block chain provided by the embodiments of the present invention, request information requesting to access the first block chain network is sent to a seed node of the first block chain network; when the first blockchain network is not accessed within the first time length, a first blockchain node list of the first blockchain network is obtained through a pre-configured network address; and sending request information for requesting to access the first block chain network to a plurality of block chain nodes in the first block chain node list so as to access the first block chain network, and correctly accessing the block chain network.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a block chaining method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As disclosed in other patent applications of the applicant
Fig. 1 is a flowchart of a block chaining method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a method for pre-accessing a node of a first blockchain network, where the method includes:
s12: sending request information for requesting to access the first block chain network to a seed node of the first block chain network;
s14: when the first block chain network is not accessed within a first time length, a first block chain node list of the first block chain network is obtained through a pre-configured network address;
s16: and sending request information for requesting to access the first block chain network to a plurality of block chain nodes in the first block chain node list so as to access the first block chain network.
Specifically, taking the first duration as 2min, and taking the preconfigured network address as the cloud platform address correspondingly configured for the blockchain network as an example, the cloud platform stores node list information of the blockchain network, and the node list information on the cloud platform is updated at intervals; the node of the pre-access block chain network is assumed to be a node A, and seed nodes seed 1-seed 4 exist in the block chain network;
the node A executes the step S12, and sends request information for requesting to access the block chain network to the seed1 to the seed4;
the node A executes the step S14, and when the block chain network is not accessed within 2min, a block chain link point list peerlist of the block chain network is obtained through the cloud platform address;
the node a executes step S16, and sends request information requesting to access the blockchain network to a plurality of blockchain nodes in peerlist so as to access the blockchain network.
The foregoing embodiment exemplarily illustrates the block link entering principle of the present invention by taking the first time duration as 2min and the preconfigured network address as the cloud platform address correspondingly configured for the block link network.
In more embodiments, the first duration may also be configured according to actual requirements, for example, configured for 1min, and the same technical effect may be achieved.
In more embodiments, the preconfigured network address may also be configured according to actual requirements, and the same technical effect may be achieved.
The method for updating the node list information on the cloud platform at intervals comprises the following steps:
the scanning program of the block chain network scans the node list information of the block chain network at intervals and uploads the scanned node list information to the cloud platform for updating.
According to the embodiment, when the seed nodes in the blockchain network are all down, the nodes pre-accessed to the blockchain network can still be correctly accessed to the blockchain network.
Preferably, the sending request information requesting access to the first blockchain network to a number of blockchain nodes in the first blockchain node list to access the first blockchain network comprises:
selecting a plurality of first block chain nodes close to the current node in geographic position according to the node identifiers of the plurality of block chain nodes in the first block chain node list;
and sending request information to each first block chain node to access the first block chain network.
Specifically, the node identifier of the blockchain node may show the geographical location information of the blockchain node; assume that the block link points in peerlist in the embodiment shown in fig. 1 are Node1 to Node10;
the Node A selects a block link point (assumed to be Node1 and Node 2) close to the geographic position of the Node A according to the Node identifiers of Node1 to Node10;
node a sends a request message to Node1 and Node2 to access the block chain network.
The above embodiment enables the node of the pre-access block chain to acquire the block data faster after accessing the block chain.
Preferably, the sending of request information requesting access to the first blockchain network to the plurality of blockchain nodes in the first blockchain node list to access the first blockchain network comprises:
counting the current load information of a plurality of block chain nodes in the first block chain node list to select a plurality of second block chain nodes with smaller loads;
and sending request information to each second block chain node to access the first block chain network.
The above embodiment enables the node of the pre-access block chain to acquire the block data faster after accessing the block chain.
Preferably, the sending request information requesting access to the first blockchain network to a number of blockchain nodes in the first blockchain node list to access the first blockchain network comprises:
requesting a first block hash of a first block from a plurality of block chain nodes in a first block chain node list, and determining the block chain nodes with the same first block hash as fourth block chain nodes;
and sending request information to each fourth block chain node to access the first block chain network.
The embodiment enables the node of the pre-access block chain to obtain more correct block data after accessing the block chain, and reduces the probability of rollback.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides an apparatus 200 including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the apparatus 200 are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (6)

1. A method of blockchain access, adapted to a node pre-accessing a first blockchain network, the method comprising:
sending request information for requesting to access the first block chain network to a seed node of the first block chain network;
when the first blockchain network is not accessed within a first time length, a first blockchain node list of the first blockchain network is obtained through a pre-configured network address;
sending request information requesting access to the first blockchain network to a plurality of blockchain nodes in the first blockchain node list to access the first blockchain network.
2. The method of claim 1, wherein the sending request information requesting access to the first blockchain network to a number of blockchain nodes in the first list of blockchain nodes to access the first blockchain network comprises:
selecting a plurality of first block chain nodes close to the current node in geographic position according to the node identifiers of the plurality of block chain nodes in the first block chain node list;
transmitting the request information to each of the first blockchain nodes to access the first blockchain network.
3. The method of claim 1, wherein the sending request information requesting access to the first blockchain network to a number of blockchain nodes in the first list of blockchain nodes to access the first blockchain network comprises:
counting the current load information of a plurality of block chain nodes in the first block chain node list to select a plurality of second block chain nodes with smaller loads;
sending the request message to each of the second blockchain nodes to access the first blockchain network.
4. The method of claim 1, wherein sending request information to a number of blockchain nodes in the first list of blockchain nodes requesting access to the first blockchain network to access the first blockchain network comprises:
requesting a first block hash of a first block from a plurality of block chain nodes in the first block chain node list, and determining the block chain nodes with the same first block hash as fourth block chain nodes;
sending the request message to each of the fourth blockchain nodes to access the first blockchain network.
5. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-4.
6. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-4.
CN202010910734.9A 2020-09-02 2020-09-02 Block link access method, device and storage medium Active CN112055077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010910734.9A CN112055077B (en) 2020-09-02 2020-09-02 Block link access method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010910734.9A CN112055077B (en) 2020-09-02 2020-09-02 Block link access method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112055077A CN112055077A (en) 2020-12-08
CN112055077B true CN112055077B (en) 2023-04-18

Family

ID=73607834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010910734.9A Active CN112055077B (en) 2020-09-02 2020-09-02 Block link access method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112055077B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738246B (en) * 2020-12-30 2022-09-27 上海摩联信息技术有限公司 Method for sensing block chain nodes by block chain Internet of things equipment
CN113206893B (en) * 2021-07-05 2021-09-14 支付宝(杭州)信息技术有限公司 Method for block synchronization and node joining block chain network

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231239A (en) * 2017-06-27 2017-10-03 中国联合网络通信集团有限公司 Create generation block method for anti-counterfeit and device
CN107819829A (en) * 2017-10-17 2018-03-20 上海点融信息科技有限责任公司 Access method, system, block chain node device and the user terminal of block chain
CN108124505A (en) * 2017-12-19 2018-06-05 深圳前海达闼云端智能科技有限公司 Method and device for acquiring trusted node, storage medium and block link node
CN108647969A (en) * 2018-05-16 2018-10-12 深圳市网心科技有限公司 A kind of method, apparatus, system and the storage medium of access block chain
CN109460405A (en) * 2018-09-27 2019-03-12 上海点融信息科技有限责任公司 For the block generation method of block chain network, synchronous method, storage medium, calculate equipment
CN110349029A (en) * 2019-07-17 2019-10-18 中国银行股份有限公司 A kind of processing method, equipment and the system of the trade identity based on block chain
CN110445852A (en) * 2019-07-29 2019-11-12 杭州复杂美科技有限公司 Logical card distribution method, equipment and storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network
CN110557304A (en) * 2019-09-20 2019-12-10 腾讯科技(深圳)有限公司 Address detection method and device and computer readable storage medium
CN110868308A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain network access method and system
CN111224804A (en) * 2018-11-26 2020-06-02 中国移动通信集团辽宁有限公司 Internet of things equipment initialization method and device, Internet of things equipment and storage medium
CN111224829A (en) * 2020-01-17 2020-06-02 深圳市网心科技有限公司 Method and device for accessing external node to block chain network, and block chain network
CN111277635A (en) * 2020-01-14 2020-06-12 深圳市网心科技有限公司 Method, equipment, device and computer medium for accessing external node to block chain
CN111405019A (en) * 2020-03-10 2020-07-10 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108323232B (en) * 2017-05-16 2020-01-24 北京大学深圳研究生院 Method for maintaining index and chain topological structure between multi-level block chain systems

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231239A (en) * 2017-06-27 2017-10-03 中国联合网络通信集团有限公司 Create generation block method for anti-counterfeit and device
CN107819829A (en) * 2017-10-17 2018-03-20 上海点融信息科技有限责任公司 Access method, system, block chain node device and the user terminal of block chain
CN108124505A (en) * 2017-12-19 2018-06-05 深圳前海达闼云端智能科技有限公司 Method and device for acquiring trusted node, storage medium and block link node
CN108647969A (en) * 2018-05-16 2018-10-12 深圳市网心科技有限公司 A kind of method, apparatus, system and the storage medium of access block chain
CN110868308A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Block chain network access method and system
CN109460405A (en) * 2018-09-27 2019-03-12 上海点融信息科技有限责任公司 For the block generation method of block chain network, synchronous method, storage medium, calculate equipment
CN111224804A (en) * 2018-11-26 2020-06-02 中国移动通信集团辽宁有限公司 Internet of things equipment initialization method and device, Internet of things equipment and storage medium
CN110349029A (en) * 2019-07-17 2019-10-18 中国银行股份有限公司 A kind of processing method, equipment and the system of the trade identity based on block chain
CN110445852A (en) * 2019-07-29 2019-11-12 杭州复杂美科技有限公司 Logical card distribution method, equipment and storage medium
CN110489486A (en) * 2019-08-02 2019-11-22 腾讯科技(深圳)有限公司 Generate method, seed node and the medium of block chain network
CN110557304A (en) * 2019-09-20 2019-12-10 腾讯科技(深圳)有限公司 Address detection method and device and computer readable storage medium
CN111277635A (en) * 2020-01-14 2020-06-12 深圳市网心科技有限公司 Method, equipment, device and computer medium for accessing external node to block chain
CN111224829A (en) * 2020-01-17 2020-06-02 深圳市网心科技有限公司 Method and device for accessing external node to block chain network, and block chain network
CN111405019A (en) * 2020-03-10 2020-07-10 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链的网络安全:威胁与对策;房卫东等;《信息安全学报》(第02期);全文 *

Also Published As

Publication number Publication date
CN112055077A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN110311983B (en) Service request processing method, device and system, electronic equipment and storage medium
CN109388626B (en) Method and apparatus for assigning numbers to services
CN112055077B (en) Block link access method, device and storage medium
CN110874227A (en) Shunting method and system for realizing gray scale release of API gateway and electronic equipment
CN110601978B (en) Flow distribution control method and device
CN110944058B (en) Block chain intranet node relay connection method
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN114629911A (en) Method, device, equipment, medium and program product for processing domain name resolution request
CN107347093B (en) Configuration method and device for distributed server system
CN111338834A (en) Data storage method and device
CN114938395A (en) Service response method, device, equipment and storage medium
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN113645287B (en) Automobile message storage method and device and automobile message storage system
CN110543604A (en) information processing method and device
CN107918617B (en) Data query method and device
CN111147585B (en) Equipment upgrading method, device, storage medium and system
CN112328693A (en) Block synchronization method, device and storage medium
CN112148320A (en) Application program upgrading method, device, equipment and storage medium
CN116861397A (en) Request processing method, device, electronic equipment and computer readable medium
CN113138943B (en) Method and device for processing request
CN110581784A (en) node health check method, device and equipment
CN114358938A (en) Transaction, block broadcasting method, device and storage medium
CN109547552B (en) API request processing method and device, storage medium and electronic equipment
CN112866365A (en) Node communication method, computer device, and storage medium
CN113114670A (en) Multi-protocol connection method, equipment and storage medium of block chain network

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
GR01 Patent grant
GR01 Patent grant