WO2021143061A1 - Blockchain node access method, apparatus and system, and storage medium - Google Patents

Blockchain node access method, apparatus and system, and storage medium Download PDF

Info

Publication number
WO2021143061A1
WO2021143061A1 PCT/CN2020/099202 CN2020099202W WO2021143061A1 WO 2021143061 A1 WO2021143061 A1 WO 2021143061A1 CN 2020099202 W CN2020099202 W CN 2020099202W WO 2021143061 A1 WO2021143061 A1 WO 2021143061A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
domain name
nodes
alliance chain
level domain
Prior art date
Application number
PCT/CN2020/099202
Other languages
French (fr)
Chinese (zh)
Inventor
薄辰龙
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021143061A1 publication Critical patent/WO2021143061A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present application relates to the technical field of blockchains. Provided are a blockchain node access method, apparatus and system, and a computer-readable storage medium. The method comprises: according to an acquired user access request, a domain name resolution service library analyzing the stability of target alliance chain nodes, and according to an analysis result, screening out preselected nodes from the target alliance chain nodes; compiling statistics on loads of the preselected nodes, and screening out the optimal node from the preselected nodes; according to the actual IP address of the optimal node, acquiring a secondary domain name of the optimal node and a specified IP address thereof; and outputting the secondary domain name of the optimal node and the specified IP address thereof from the domain name resolution service library. In the present application, a preset domain name resolution service library is taken as a public basic domain name resolution service of a blockchain, and can be reused by any blockchain, thereby effectively improving the access efficiency of a blockchain node.

Description

区块链节点访问方法、装置、系统及存储介质Block chain node access method, device, system and storage medium
本申请要求申请号为202010032340.8,申请日为2020年01月13日,发明创造名称为“区块链节点访问方法、装置及存储介质”的专利申请的优先权。This application requires the priority of the patent application whose application number is 202010032340.8, the application date is January 13, 2020, and the invention and creation title is "Blockchain Node Access Method, Device, and Storage Medium".
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种区块链节点访问方法、装置、系统及计算机可读存储介质。This application relates to the field of blockchain technology, and in particular to a method, device, system and computer-readable storage medium for accessing blockchain nodes.
背景技术Background technique
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
区块链节点访问过程中,发明人意识到目前的区块链服务是由联盟链向中央网络安全和信息化委员办公室备案审核,服务的各自拥有者根据申请了各自的服务域名来提供服务,因此用户需要根据各自发布的服务域名,甚至是IP来与区块链进行交互,比如以太坊中,我们指定域名或者ip、合约地址、合约参数,即可发起交易调用区块链服务,例如有一个区块链为银行联盟链,备案后可以向联盟各方或者个人提供服务,但实际上服务的主体不是这个联盟,而是联盟内的各个独立的组织所拥有的节点。During the process of accessing blockchain nodes, the inventor realized that the current blockchain service was filed and reviewed by the Central Network Security and Information Committee Office by the consortium chain, and the respective owners of the services provided services based on applying for their respective service domain names. Therefore, users need to interact with the blockchain according to their respective service domain names, or even IPs. For example, in Ethereum, we specify the domain name or IP, contract address, and contract parameters to initiate transactions and call blockchain services. For example, A blockchain is a bank alliance chain, which can provide services to all parties or individuals in the alliance after filing, but in fact the main body of the service is not the alliance, but the nodes owned by each independent organization in the alliance.
联盟链作为一个整体备案,但是用户却需要按照不同的服务方的标准访问联盟链的区块链服务,这种使用方式,很不合理,目前的区块链服务缺少基础性的公共服务。The consortium chain is filed as a whole, but users need to access the blockchain services of the consortium chain according to the standards of different service providers. This usage method is very unreasonable. The current blockchain services lack basic public services.
发明内容Summary of the invention
基于上述现有技术中存在的问题,本申请提供一种区块链节点访问方法、装置及计算机可读存储介质,其主要目的在于,通过域名解析服务库对用户访问请求信息中的目标联盟链的一级域名下的节点的稳定性和负载情况进行分析,筛选出最佳节点,根据筛选出的最佳节点的实际IP地址,从域名解析服务库中获取最佳节点的二级域名及对应的IP地址,其中,域名解析库中预先储存有用来表述联盟链的一级域名、用来表述联盟链节点的二级域名以及与二级域名对应的指定IP地址。将域名解析服务库作为区块链的公共基础域名解析服务,任何区块链可以复用,有效提高区块链节点访问效率。Based on the above-mentioned problems in the prior art, this application provides a method, device, and computer-readable storage medium for accessing blockchain nodes, the main purpose of which is to access the target consortium chain in the user request information through the domain name resolution service database. Analyze the stability and load situation of the nodes under the first-level domain name, select the best node, and obtain the second-level domain name of the best node and its corresponding from the domain name resolution service database according to the actual IP address of the best node. The domain name resolution database has pre-stored the first-level domain name used to express the alliance chain, the second-level domain name used to express the nodes of the alliance chain, and the designated IP address corresponding to the second-level domain name. Regarding the domain name resolution service library as the public basic domain name resolution service of the blockchain, any blockchain can be reused, effectively improving the access efficiency of blockchain nodes.
第一方面,本申请提供一种区块链节点访问方法,该方法包括:In the first aspect, this application provides a method for accessing blockchain nodes, which includes:
根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点,其中,According to the obtained user access requests, the domain name resolution service library analyzes the stability of the target alliance chain nodes, and according to the analysis results, filters out preselected nodes from the target alliance chain nodes, among which,
所述用户访问请求包括目标联盟链的一级域名,所述一级域名用于表述联盟链,所述 域名解析服务库包括:一级域名、二级域名以及与所述二级域名对应的指定IP地址,所述二级域名用于表述联盟链节点;The user access request includes the first-level domain name of the target alliance chain, the first-level domain name is used to express the alliance chain, and the domain name resolution service database includes: the first-level domain name, the second-level domain name, and the designation corresponding to the second-level domain name IP address, where the second-level domain name is used to describe the alliance chain node;
对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;Performing statistics on the load of the pre-selected nodes, and selecting the best node from the pre-selected nodes;
根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;Obtaining the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The second-level domain name of the best node and its designated IP address are output from the domain name resolution service database.
第二方面,本申请还提供一种电子装置,该电子装置包括:存储器、处理器,所述存储器中存储有区块链节点访问程序,所述区块链节点访问程序被所述处理器执行时实现如下步骤:In a second aspect, the present application also provides an electronic device, the electronic device includes: a memory, a processor, the memory stores a blockchain node access program, the blockchain node access program is executed by the processor When implementing the following steps:
根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点,其中,According to the obtained user access requests, the domain name resolution service library analyzes the stability of the target alliance chain nodes, and according to the analysis results, filters out preselected nodes from the target alliance chain nodes, among which,
所述用户访问请求包括目标联盟链的一级域名,所述一级域名用于表述联盟链,所述域名解析服务库包括:一级域名、二级域名以及与所述二级域名对应的指定IP地址,所述二级域名用于表述联盟链节点;The user access request includes the first-level domain name of the target alliance chain, the first-level domain name is used to express the alliance chain, and the domain name resolution service database includes: the first-level domain name, the second-level domain name, and the designation corresponding to the second-level domain name IP address, where the second-level domain name is used to describe the alliance chain node;
对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;Performing statistics on the load of the pre-selected nodes, and selecting the best node from the pre-selected nodes;
根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;Obtaining the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The second-level domain name of the best node and its designated IP address are output from the domain name resolution service database.
第三方面,本申请还提供一种区块链节点访问系统,包括:In the third aspect, this application also provides a blockchain node access system, including:
预选节点筛选单元,用于根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点;The pre-selected node screening unit is used to analyze the stability of the target alliance chain node according to the obtained user access request and the domain name resolution service library, and filter out the pre-selected node from the target alliance chain node according to the analysis result;
最佳节点筛选单元,用于对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;An optimal node screening unit, configured to perform statistics on the load of the preselected nodes, and select the optimal node from the preselected nodes;
二级域名获取单元,用于根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;A second-level domain name obtaining unit, configured to obtain the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
输出单元,用于将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The output unit is used to output the second-level domain name of the best node and its designated IP address from the domain name resolution service database.
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有区块链节点访问程序,所述区块链节点访问程序被处理器执行时,实现如上所述的区块链节点访问方法中的任意步骤。In a fourth aspect, this application also provides a computer-readable storage medium in which a blockchain node access program is stored. When the blockchain node access program is executed by a processor, the above Any step in the block chain node access method described above.
本申请提出的区块链节点访问方法、装置及计算机可读存储介质,通过预设域名解析服务库,通过域名解析服务库对用户访问请求信息中的目标联盟链的一级域名下的节点的稳定性和负载情况进行分析,筛选出最佳节点,根据筛选出的最佳节点的实际IP地址,从域名解析服务库中获取最佳节点的二级域名及对应的IP地址,其中,域名解析库中预先储存有用来表述联盟链的一级域名、用来表述联盟链节点的二级域名以及与二级域名对应的指定IP地址。将域名解析服务库作为区块链的公共基础域名解析服务,任何区块链可以复 用,有效提高区块链节点访问效率。The blockchain node access method, device, and computer-readable storage medium proposed in this application use the preset domain name resolution service library to access the nodes under the first-level domain name of the target alliance chain in the user request information through the domain name resolution service library. The stability and load situation are analyzed, the best node is selected, and the second-level domain name and corresponding IP address of the best node are obtained from the domain name resolution service database according to the actual IP address of the best node. Among them, domain name resolution The first-level domain name used to express the alliance chain, the second-level domain name used to express the nodes of the alliance chain, and the designated IP address corresponding to the second-level domain name are pre-stored in the database. Regarding the domain name resolution service library as the public basic domain name resolution service of the blockchain, any blockchain can be reused, effectively improving the access efficiency of blockchain nodes.
附图说明Description of the drawings
图1为本申请区块链节点访问方法较佳实施例的流程图Figure 1 is a flowchart of a preferred embodiment of a method for accessing blockchain nodes in this application
图2为本申请区块链节点访问方法较佳实施例的应用环境示意图;2 is a schematic diagram of the application environment of the preferred embodiment of the method for accessing blockchain nodes of this application;
图3为图2中区块链节点访问程序较佳实施例的模块示意图;3 is a schematic diagram of modules of a preferred embodiment of the block chain node access program in FIG. 2;
图4为本申请实施例的区块链节点访问系统逻辑结构框图。Fig. 4 is a block diagram of the logical structure of a blockchain node access system according to an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
在下面的描述中,出于说明的目的,为了提供对一个或多个实施例的全面理解,阐述了许多具体细节。然而,很明显,也可以在没有这些具体细节的情况下实现这些实施例。In the following description, for illustrative purposes, in order to provide a comprehensive understanding of one or more embodiments, many specific details are set forth. However, it is obvious that these embodiments can also be implemented without these specific details.
以下将结合附图对本申请的具体实施例进行详细描述。The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
实施例1Example 1
为了说明本申请提供的区块链节点访问方法,图1示出了根据本申请实施例的区块链节点访问方法较佳实施例的流程。In order to illustrate the blockchain node access method provided by this application, FIG. 1 shows the flow of a preferred embodiment of the blockchain node access method according to an embodiment of the present application.
如图1所示,本申请提供的区块链节点访问方法包括:步骤S10-步骤S40。As shown in Figure 1, the blockchain node access method provided by the present application includes: step S10-step S40.
步骤S10,根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点;Step S10: According to the obtained user access request, the domain name resolution service library analyzes the stability of the target alliance chain node, and according to the analysis result, selects the preselected node from the target alliance chain node;
其中,用户访问请求包括目标联盟链的一级域名,一级域名用于表述联盟链,域名解析服务库包括:一级域名、二级域名以及与所述二级域名对应的指定IP地址,所述二级域名用于表述联盟链节点。The user access request includes the first-level domain name of the target alliance chain, the first-level domain name is used to express the alliance chain, and the domain name resolution service database includes: the first-level domain name, the second-level domain name, and the designated IP address corresponding to the second-level domain name. The second-level domain name is used to describe the nodes of the alliance chain.
具体地,在联盟链向中央网络安全和信息化委员办公室备案审核后,联盟链的链路信息全部同步到预设的储存库中,即得到域名解析服务库,其中,联盟链的链路信息至少包括:用于表述联盟链的一级域名、用于表述联盟链各节点的二级域名以及与二级域名对应的指定IP地址,其中,指定IP地址指的是在备案时,储存到域名解析服务库的节点的即时IP地址。Specifically, after the consortium chain is filed and reviewed with the Central Network Security and Information Committee Office, all the link information of the consortium chain is synchronized to the preset repository to obtain the domain name resolution service database. Among them, the link information of the consortium chain At least include: the first-level domain name used to express the alliance chain, the second-level domain name used to express the nodes of the alliance chain, and the designated IP address corresponding to the second-level domain name. The designated IP address refers to the domain name stored in the filing Resolve the real-time IP address of the node of the service library.
用户由用户端,例如浏览器,向区块链发出用户访问请求,其中,用户访问请求中至少包括目标联盟链的一级域名,即用户想要访问的联盟链的一级域名,域名解析服务库根据目标联盟链的一级域名,对该联盟链下各个节点的稳定性进行分析,从目标联盟链节点中筛选出预选节点。The user sends a user access request to the blockchain from the user end, such as a browser, where the user access request includes at least the first-level domain name of the target consortium chain, that is, the first-level domain name of the consortium chain that the user wants to access. Domain name resolution service According to the first-level domain name of the target alliance chain, the library analyzes the stability of each node in the alliance chain, and filters out preselected nodes from the target alliance chain nodes.
其中,根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点的步骤包括:Among them, according to the obtained user access request, the domain name resolution service library analyzes the stability of the target alliance chain node, and according to the analysis result, the steps of screening the preselected node from the target alliance chain node include:
域名解析服务库实时收集联盟链节点的心跳信息,并记录心跳信息对应的节点的实际 IP地址;The domain name resolution service library collects the heartbeat information of the alliance chain nodes in real time, and records the actual IP address of the node corresponding to the heartbeat information;
根据联盟链节点的心跳信息,计算出目标联盟链的一级域名下的节点的稳定值的平均值;According to the heartbeat information of the alliance chain nodes, calculate the average value of the stable values of the nodes under the first-level domain name of the target alliance chain;
根据节点的稳定值的平均值,从目标联盟链节点中筛选出符合预设稳定性阈值的预选节点。According to the average value of the stable value of the node, the pre-selected node that meets the preset stability threshold is selected from the target alliance chain nodes.
具体地,域名解析服务库实时收集联盟链节点的心跳信息,并记录下每个节点心跳信息对应的节点的实际IP地址,以便于,根据节点的实际IP地址从域名解析服务库中查找出相应的节点的二级域名,再根据节点的二级域名获取与节点的二级域名对应的指定IP地址。其中,实际IP地址为获取节点心跳信息时,该节点对应的IP地址。Specifically, the domain name resolution service library collects the heartbeat information of the alliance chain nodes in real time, and records the actual IP address of the node corresponding to the heartbeat information of each node, so that the corresponding node can be found from the domain name resolution service library according to the actual IP address of the node. According to the second-level domain name of the node, the designated IP address corresponding to the second-level domain name of the node is obtained. Wherein, the actual IP address is the IP address corresponding to the node when the node's heartbeat information is obtained.
其中,优选地,域名解析服务库通过HTTP请求实时收集联盟链节点的心跳信息,通过协议头获取到节点的实际IP地址。Wherein, preferably, the domain name resolution service library collects the heartbeat information of the alliance chain node in real time through HTTP request, and obtains the actual IP address of the node through the protocol header.
其中,根据联盟链节点的心跳信息,计算出目标联盟链的一级域名下的节点的稳定值的平均值的步骤包括:Among them, according to the heartbeat information of the alliance chain nodes, the steps of calculating the average value of the stable values of the nodes under the first-level domain name of the target alliance chain include:
按照预设时间间隔获取一段时间内的联盟链节点的心跳值;Obtain the heartbeat value of the alliance chain node in a period of time according to the preset time interval;
通过节点稳定性计算公式,计算目标联盟链的一级域名下的每个节点的每两个相邻心跳值间的稳定值,每个节点得到N个稳定值;Through the node stability calculation formula, calculate the stable value between every two adjacent heartbeat values of each node under the first-level domain name of the target alliance chain, and each node obtains N stable values;
根据每个节点得到的N个稳定值,计算出目标联盟链的一级域名下的每个节点的稳定值的平均值。According to the N stable values obtained by each node, the average value of the stable values of each node under the first-level domain name of the target alliance chain is calculated.
具体地,预设时间间隔可根据实际情况设定,例如,每隔5秒获取一次联盟链节点的心跳值,连续获取1分钟的心跳值,然后通过节点稳定性计算公式,计算出目标联盟链的一级域名下的每个节点的每两个相邻心跳值间的稳定值,此时每个节点得到N个稳定值,以上述为例,每个节点1分钟得到11个稳定值,再将11个稳定值相加后求得稳定值的平均值。Specifically, the preset time interval can be set according to the actual situation. For example, the heartbeat value of the alliance chain node is obtained every 5 seconds, the heartbeat value of 1 minute is continuously obtained, and then the target alliance chain is calculated by the node stability calculation formula The stable value between every two adjacent heartbeat values of each node under the first-level domain name. At this time, each node gets N stable values. Taking the above as an example, each node gets 11 stable values in 1 minute. After adding up the 11 stable values, find the average value of the stable values.
其中,节点稳定性计算公式为:Among them, the node stability calculation formula is:
S=S0+V,S=S0+V,
V=(T2-T1)/P;V=(T2-T1)/P;
其中,S0为前两个相邻心跳值间的稳定值,其初始值为0,V为稳定值变化值,其中,T2为当前心跳到达时间,T1为上一个心跳到达时间,P为预设时间间隔;其中,V的取值规则为:Among them, S0 is the stable value between the previous two adjacent heartbeat values, its initial value is 0, V is the stable value change value, where T2 is the current heartbeat arrival time, T1 is the last heartbeat arrival time, and P is the preset Time interval; among them, the value rule of V is:
当V≤0时,V取值为0;When V≤0, the value of V is 0;
当0<V≤1时,V取值为1;When 0<V≤1, the value of V is 1;
当1<V<2时,V的取值为-1When 1<V<2, the value of V is -1
当V≥2时,V的取值为-(V-1)。When V≥2, the value of V is -(V-1).
具体地,为了更好的理解节点稳定性计算公式,举例如下:Specifically, in order to better understand the node stability calculation formula, an example is as follows:
获取一段时间内的节点的心跳值为:Get the heartbeat value of the node within a period of time:
心跳值1-hbmsg-20190819.16.41.0;Heartbeat value 1-hbmsg-20190819.16.41.0;
心跳值2-hbmsg-20190819.16.41.5;Heartbeat value 2-hbmsg-20190819.16.41.5;
心跳值3-hbmsg-20190819.16.41.10;Heartbeat value 3-hbmsg-20190819.16.41.10;
心跳值4-hbmsg-20190819.16.41.15;Heartbeat value 4-hbmsg-20190819.16.41.15;
心跳值5-hbmsg-20190819.16.41.25;Heartbeat value 5-hbmsg-20190819.16.41.25;
预设时间间隔为5秒。The preset time interval is 5 seconds.
则,心跳值1与心跳值2之间的稳定值为:S12=0+V1,V1=(5-0)/5=1,根据V的取值规则,V1取值为1,则,S12=0+1=1;Then, the stable value between the heartbeat value 1 and the heartbeat value 2 is: S12=0+V1, V1=(5-0)/5=1, according to the value rule of V, the value of V1 is 1, then, S12 =0+1=1;
心跳值2与心跳值3之间的稳定值为:S23=S12+V2,V2=(10-5)/5=1,根据V的取值规则,V2取值为1,则,S23=1+1=2;The stable value between heartbeat value 2 and heartbeat value 3 is: S23=S12+V2, V2=(10-5)/5=1, according to the value rule of V, the value of V2 is 1, then, S23=1 +1=2;
心跳值3与心跳值4之间的稳定值为:S34=S23+V3,V3=(15-10)/5=1,根据V的取值规则,V3取值为1,则,S12=2+1=3;The stable value between heartbeat value 3 and heartbeat value 4 is: S34=S23+V3, V3=(15-10)/5=1, according to the value rule of V, the value of V3 is 1, then, S12=2 +1=3;
心跳值4与心跳值5之间的稳定值为:S45=S34+V4,V4=(25-15)/5=2,根据V的取值规则,V4取值为-1,则,S45=3-1=2。The stable value between heartbeat value 4 and heartbeat value 5 is: S45=S34+V4, V4=(25-15)/5=2, according to the value rule of V, the value of V4 is -1, then S45= 3-1=2.
其中,为了从域名解析服务库中解析出的节点的二级域名及其指定IP地址唯一,一级域名、二级域名以及与二级域名对应的指定IP地址均唯一。Among them, in order that the second-level domain name and its designated IP address of the node parsed from the domain name resolution service database are unique, the first-level domain name, the second-level domain name, and the designated IP address corresponding to the second-level domain name are all unique.
其中,根据节点的稳定值的平均值,从目标联盟链节点中筛选出符合预设稳定性阈值的预选节点,包括:Among them, according to the average value of the stable value of the node, the pre-selected node that meets the preset stability threshold is selected from the target alliance chain node, including:
将每个节点的稳定值的平均值与预设稳定性阈值进行比较,筛选出稳定值的平均值大于等于预设稳定性阈值的目标联盟链的一级域名下的节点。The average value of the stability value of each node is compared with the preset stability threshold value, and the nodes under the first-level domain name of the target alliance chain whose average value of the stability value is greater than or equal to the preset stability threshold value are selected.
步骤S20,对预选节点的负载进行统计,从预选节点中筛选出最佳节点。In step S20, the load of the preselected nodes is counted, and the best node is selected from the preselected nodes.
具体地,节点的负载如果过多会对该节点提供服务时的速度以及稳定性产生影响,为了能够给用户提供更加优质的服务,所以需要对预选的节点进行筛选,联盟链的各个节点每被解析一次,便在域名解析服务库中记录,根据预选节点被记录的解析次数进行筛选,筛选出被解析次数最少的预选节点作为最佳节点。Specifically, if the load of a node is too much, it will affect the speed and stability of the node when it provides services. In order to provide users with better services, it is necessary to screen the pre-selected nodes. Each node of the alliance chain is Once the resolution is performed, it is recorded in the domain name resolution service database, and the preselected node is screened according to the recorded resolution times of the preselected node, and the preselected node with the least number of resolutions is selected as the best node.
其中,对预选节点的负载进行统计,从预选节点中筛选出最佳节点的步骤包括:Among them, the load of the pre-selected nodes is counted, and the steps of selecting the best node from the pre-selected nodes include:
获取预选节点的解析频次;Obtain the analysis frequency of the pre-selected node;
从预选节点中筛选出解析频次最少的预选节点,作为最佳节点。From the pre-selected nodes, the pre-selected node with the least frequency of analysis is selected as the best node.
步骤S30,根据最佳节点的实际IP地址,获取最佳节点的二级域名及其指定IP地址。In step S30, the second-level domain name of the best node and its designated IP address are obtained according to the actual IP address of the best node.
具体地,从目标联盟链的一级域名下的节点中筛选出节点稳定性符合预设稳定性阈值的预选节点以及从预选节点中筛选出负载最少的最佳节点后,根据域名解析服务库收集节点心跳信息时获取的节点的实际IP地址,从域名解析服务库中获取最佳节点的二级域名,再根据最佳节点的二级域名获取最佳节点的指定IP地址。例如:域名解析服务库收到节点Pingan1的心跳信息,获取到的该节点的实际IP地址为172.18.40.70,通过稳定性分析和负载分析后,确定其为最佳节点,则根据该最佳节点的实际IP地址,即172.18.40.70从域名 解析服务库中获取该最佳节点的二级域名及其对应的指定IP地址:如:Pingan1.bankalliance.chain–172.18.40.70,其中,Pingan1.bankalliance.chain为预先储存在域名解析服务库内的二级域名,172.18.40.70为对应的指定IP地址。Specifically, after screening the pre-selected nodes whose node stability meets the preset stability threshold from the nodes under the first-level domain name of the target alliance chain and the best node with the least load from the pre-selected nodes, the collection is based on the domain name resolution service library. The actual IP address of the node obtained during the heartbeat information of the node, the second-level domain name of the best node is obtained from the domain name resolution service database, and then the designated IP address of the best node is obtained according to the second-level domain name of the best node. For example: the domain name resolution service library receives the heartbeat information of the node Pingan1, and the actual IP address of the node is 172.18.40.40. After stability analysis and load analysis, it is determined to be the best node, and then the best node The actual IP address of 172.18.40.70 obtains the second-level domain name of the best node and its corresponding designated IP address from the domain name resolution service database: for example: Pingan1.bankalliance.chain–172.18.40.70, among which, Pingan1.bankalliance. chain is the second-level domain name pre-stored in the domain name resolution service database, and 172.18.40.40 is the corresponding designated IP address.
步骤S40,将最佳节点的二级域名及其指定IP地址从域名解析服务库中输出。Step S40, output the second-level domain name of the best node and its designated IP address from the domain name resolution service database.
具体地,将从域名解析服务库内获取的最佳节点的二级域名及其指定IP地址从域名解析服务库中输出,返回给客户端,客户端接收到域名解析服务库返回的最佳节点的二级域名及其指定IP地址后,通过输入最佳节点的二级域名及对应的IP地址与链路的节点服务进行交涉。Specifically, the second-level domain name of the best node obtained from the domain name resolution service library and its designated IP address are output from the domain name resolution service library and returned to the client, and the client receives the best node returned by the domain name resolution service library After entering the second-level domain name of the best node and its designated IP address, negotiate with the node service of the link by entering the second-level domain name of the best node and the corresponding IP address.
其中,在将最佳节点的二级域名及其指定IP地址从域名解析服务库中输出后,还包括:Among them, after outputting the second-level domain name of the best node and its designated IP address from the domain name resolution service database, it also includes:
根据用户对最佳节点的二级域名及其指定IP地址的访问请求信息,对最佳节点的二级域名及其指定IP地址进行解析记录。According to the user's request information for the second-level domain name of the best node and its designated IP address, the second-level domain name of the best node and its designated IP address are analyzed and recorded.
通过记录最佳节点的解析情况,便于对下个用户访问时预选节点的负载进行统计。By recording the analysis situation of the best node, it is convenient to perform statistics on the load of the preselected node when the next user visits.
实施例2Example 2
本申请提供一种区块链节点访问方法,应用于一种电子装置1。参照图2所示,为本申请区块链节点访问方法较佳实施例的应用环境示意图。This application provides a method for accessing blockchain nodes, which is applied to an electronic device 1. Referring to FIG. 2, it is a schematic diagram of an application environment of a preferred embodiment of a method for accessing a blockchain node of this application.
在本实施例中,电子装置1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有运算功能的终端设备。In this embodiment, the electronic device 1 may be a terminal device with a computing function such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, and the like.
该电子装置1包括:处理器12、存储器11、网络接口13及通信总线14。The electronic device 1 includes a processor 12, a memory 11, a network interface 13, and a communication bus 14.
存储器11包括至少一种类型的可读存储介质。该至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器11等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子装置1的内部存储单元,例如该电子装置1的硬盘。在另一些实施例中,可读存储介质也可以是电子装置1的外部存储器11,例如电子装置1上配备的插接式硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory 11, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, for example, the hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be the external memory 11 of the electronic device 1, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc.
在本实施例中,存储器11的可读存储介质通常用于存储安装于电子装置1的区块链节点访问程序10、预设域名解析服务库等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。In this embodiment, the readable storage medium of the memory 11 is generally used to store the blockchain node access program 10 installed in the electronic device 1, a preset domain name resolution service library, and the like. The memory 11 can also be used to temporarily store data that has been output or will be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行区块链节点访问程序10等。In some embodiments, the processor 12 may be a central processing unit (CPU), a microprocessor, or other data processing chips, and is used to run program codes or process data stored in the memory 11, such as executing a blockchain. Node access program 10 and so on.
网络接口13可选地可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该电子装置1与其他电子设备之间建立通信连接。The network interface 13 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
通信总线14用于实现上述这些组件之间的连接通信。The communication bus 14 is used to realize the connection and communication between the above-mentioned components.
图2仅示出了具有组件11-14的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。FIG. 2 only shows the electronic device 1 with the components 11-14, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
在图2所示的装置实施例中,作为一种计算机存储介质的存储器11中可以包括操作系统以及区块链节点访问程序10;处理器12执行存储器11中存储的区块链节点访问程序10时实现实施例1中区块链节点访问方法的各个步骤,例如图1所示。或者,处理器12执行区块链节点访问方法时实现上述各装置实施例中各模块/单元的功能,例如图3所示的区块链节点访问程序10可以被分割为:预选节点筛选模块110、最佳节点筛选模块120、二级域名获取模块130、输出模块140。In the device embodiment shown in FIG. 2, the memory 11 as a computer storage medium may include an operating system and a blockchain node access program 10; the processor 12 executes the blockchain node access program 10 stored in the memory 11. When realizing each step of the blockchain node access method in Embodiment 1, for example, as shown in Figure 1. Alternatively, the processor 12 implements the functions of the modules/units in the foregoing device embodiments when executing the blockchain node access method. For example, the blockchain node access program 10 shown in FIG. 3 can be divided into: a preselected node screening module 110 , The best node screening module 120, the second-level domain name acquisition module 130, and the output module 140.
所述模块110-140所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:The functions or operation steps implemented by the modules 110-140 are all similar to the above, and will not be described in detail here. Illustratively, for example, where:
预选节点筛选模块110:用于根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点,其中,用户访问请求包括目标联盟链的一级域名,一级域名用于联盟链,域名解析服务库包括:一级域名、二级域名以及与二级域名对应的指定IP地址,二级域名用于表述联盟链节点。Pre-selected node screening module 110: According to the obtained user access request, the domain name resolution service library analyzes the stability of the target alliance chain node, and according to the analysis result, selects the pre-selected node from the target alliance chain node. Among them, the user access request Including the first-level domain name of the target alliance chain. The first-level domain name is used for the alliance chain. The domain name resolution service library includes: the first-level domain name, the second-level domain name and the designated IP address corresponding to the second-level domain name. .
最佳节点筛选模块120:用于对预选节点的负载进行统计,从预选节点中筛选出最佳节点。The optimal node screening module 120 is used to perform statistics on the load of the preselected nodes, and filter the optimal node from the preselected nodes.
二级域名获取模块130:用于根据最佳节点的实际IP地址,获取最佳节点的二级域名及其指定IP地址。The second-level domain name obtaining module 130: used to obtain the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node.
输出模块140:用于将最佳节点的二级域名及其指定IP地址从域名解析服务库中输出。Output module 140: used to output the second-level domain name of the best node and its designated IP address from the domain name resolution service database.
实施例3Example 3
与上述方法相对应,本申请还提供一种区块链节点访问系统,图4示出了根据本申请最佳实施例的区块链节点访问系统逻辑结构.Corresponding to the above method, the present application also provides a blockchain node access system, Figure 4 shows the logical structure of the blockchain node access system according to the best embodiment of the application.
如图4所示,本申请提供一种区块链节点访问系统300,包括:预选节点筛选单元310、最佳节点筛选单元320、二级域名获取单元330和输出单元340。其中,预选节点筛选单元310、最佳节点筛选单元320、二级域名获取单元330和输出单元340的实现功能与实施例中区块链节点访问方法的步骤一一对应,为避免赘述,本实施例不一一详述。As shown in FIG. 4, the present application provides a blockchain node access system 300, which includes: a pre-selected node screening unit 310, an optimal node screening unit 320, a second-level domain name obtaining unit 330, and an output unit 340. Among them, the implementation functions of the pre-selected node screening unit 310, the optimal node screening unit 320, the second-level domain name obtaining unit 330, and the output unit 340 correspond to the steps of the blockchain node access method in the embodiment one-to-one. To avoid repetition, this embodiment The examples are not detailed one by one.
预选节点筛选单元310,用于根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点;The pre-selected node screening unit 310 is configured to analyze the stability of the target alliance chain node according to the obtained user access request and the domain name resolution service library, and filter out the pre-selected node from the target alliance chain node according to the analysis result;
最佳节点筛选单元320,用于对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;The best node screening unit 320 is configured to perform statistics on the load of the preselected nodes, and filter the best nodes from the preselected nodes;
二级域名获取单元330,用于根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;The second-level domain name obtaining unit 330 is configured to obtain the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
输出单元340,用于将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The output unit 340 is configured to output the second-level domain name of the optimal node and its designated IP address from the domain name resolution service database.
实施例4Example 4
本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性;所述计算机可读存储介质中包括区块链节点访问程序,所述区块 链节点访问程序被处理器执行时实现实施例1中区块链节点访问方法,为避免重复,这里不再赘述。或者,该计算机程序被处理器执行时实现实施例4中区块链节点访问系统中各模块/单元的功能,为避免重复,这里不再赘述。The embodiment of the present application also proposes a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile; the computer-readable storage medium includes a blockchain node access program, When the block chain node access program is executed by the processor, the block chain node access method in Embodiment 1 is implemented. In order to avoid repetition, details are not repeated here. Or, when the computer program is executed by the processor, it realizes the function of the blockchain node accessing each module/unit in the system in Embodiment 4. In order to avoid repetition, it will not be repeated here.
本申请之计算机可读存储介质的具体实施方式与上述区块链节点访问方法、电子装置、系统的具体实施方式大致相同,在此不再赘述。The specific implementation of the computer-readable storage medium of the present application is substantially the same as the specific implementation of the above-mentioned blockchain node access method, electronic device, and system, and will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, It also includes other elements not explicitly listed, or elements inherent to the process, device, article, or method. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, device, article, or method that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority of the embodiments. Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a terminal device (can be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种区块链节点访问方法,应用于电子装置,其中,所述方法包括:A method for accessing blockchain nodes is applied to an electronic device, wherein the method includes:
    根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点,其中,According to the obtained user access requests, the domain name resolution service library analyzes the stability of the target alliance chain nodes, and according to the analysis results, filters out preselected nodes from the target alliance chain nodes, among which,
    所述用户访问请求包括目标联盟链的一级域名,所述一级域名用于表述联盟链,所述域名解析服务库包括:一级域名、二级域名以及与所述二级域名对应的指定IP地址,所述二级域名用于表述联盟链节点;The user access request includes the first-level domain name of the target alliance chain, the first-level domain name is used to express the alliance chain, and the domain name resolution service database includes: the first-level domain name, the second-level domain name, and the designation corresponding to the second-level domain name IP address, where the second-level domain name is used to describe the alliance chain node;
    对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;Performing statistics on the load of the pre-selected nodes, and selecting the best node from the pre-selected nodes;
    根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;Obtaining the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
    将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The second-level domain name of the best node and its designated IP address are output from the domain name resolution service database.
  2. 根据权利要求1所述的区块链节点访问方法,其中,所述根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点的步骤包括:The block chain node access method according to claim 1, wherein the domain name resolution service library analyzes the stability of the target alliance chain node according to the obtained user access request, and according to the analysis result, from the target alliance chain node The steps to filter out pre-selected nodes include:
    所述域名解析服务库实时收集联盟链节点的心跳信息,并记录所述心跳信息对应的节点的实际IP地址;The domain name resolution service library collects heartbeat information of alliance chain nodes in real time, and records the actual IP address of the node corresponding to the heartbeat information;
    根据所述联盟链节点的心跳信息,计算出所述目标联盟链的一级域名下的节点的稳定值的平均值;Calculating the average value of the stable values of the nodes under the first-level domain name of the target alliance chain according to the heartbeat information of the nodes of the alliance chain;
    根据所述节点的稳定值的平均值,从目标联盟链节点中筛选出符合预设稳定性阈值的预选节点。According to the average value of the stability value of the node, a preselected node that meets the preset stability threshold is selected from the target alliance chain nodes.
  3. 根据权利要求2所述的区块链节点访问方法,其中,所述根据所述联盟链节点的心跳信息,计算出所述目标联盟链的一级域名下的节点的稳定值的平均值的步骤包括:The method for accessing a blockchain node according to claim 2, wherein the step of calculating the average value of the stable value of the node under the first-level domain name of the target alliance chain based on the heartbeat information of the alliance chain node include:
    按照预设时间间隔获取一段时间内的联盟链节点的心跳值;Obtain the heartbeat value of the alliance chain node in a period of time according to the preset time interval;
    通过节点稳定性计算公式,计算所述目标联盟链的一级域名下的每个节点的每两个相邻心跳值间的稳定值,每个节点得到N个稳定值;Calculate the stable value between every two adjacent heartbeat values of each node under the first-level domain name of the target alliance chain through the node stability calculation formula, and each node obtains N stable values;
    根据每个节点得到的N个稳定值,计算出所述目标联盟链的一级域名下的每个节点的稳定值的平均值。According to the N stable values obtained by each node, the average value of the stable values of each node under the first-level domain name of the target alliance chain is calculated.
  4. 根据权利要求2所述的区块链节点访问方法,其中,所述节点稳定性计算公式为:The method for accessing blockchain nodes according to claim 2, wherein the node stability calculation formula is:
    S=S0+V,S=S0+V,
    V=(T2-T1)/P;V=(T2-T1)/P;
    其中,S0为前两个相邻心跳值间的稳定值,其初始值为0,V为稳定值变化值,其中,T2为当前心跳到达时间,T1为上一个心跳到达时间,P为预设时间间隔;其中,V的取值规则为:Among them, S0 is the stable value between the previous two adjacent heartbeat values, its initial value is 0, V is the stable value change value, where T2 is the current heartbeat arrival time, T1 is the last heartbeat arrival time, and P is the preset Time interval; among them, the value rule of V is:
    当V≤0时,V取值为0;When V≤0, the value of V is 0;
    当0<V≤1时,V取值为1;When 0<V≤1, the value of V is 1;
    当1<V<2时,V的取值为-1When 1<V<2, the value of V is -1
    当V≥2时,V的取值为-(V-1)。When V≥2, the value of V is -(V-1).
  5. 根据权利要求2所述的区块链节点访问方法,其中,所述域名解析服务库通过HTTP请求实时收集联盟链节点的心跳信息。The method for accessing blockchain nodes according to claim 2, wherein the domain name resolution service library collects heartbeat information of alliance chain nodes in real time through HTTP requests.
  6. 根据权利要求5所述的区块链节点访问方法,其中,所述域名解析服务库通过HTTP请求的协议头获取所述心跳信息对应的节点的实际IP地址,并记录所述心跳信息对应的节点的实际IP地址。The method for accessing blockchain nodes according to claim 5, wherein the domain name resolution service library obtains the actual IP address of the node corresponding to the heartbeat information through the protocol header of the HTTP request, and records the node corresponding to the heartbeat information The actual IP address.
  7. 根据权利要求2所述的区块链节点访问方法,其中,根据所述节点的稳定值的平均值,从目标联盟链节点中筛选出符合预设稳定性阈值的预选节点,包括:The method for accessing blockchain nodes according to claim 2, wherein, according to the average value of the stable values of the nodes, selecting the pre-selected nodes that meet the preset stability threshold from the target alliance chain nodes includes:
    将每个所述节点的稳定值的平均值与所述预设稳定性阈值进行比较,筛选出稳定值的平均值大于等于所述预设稳定性阈值的所述目标联盟链的一级域名下的节点。The average value of the stability value of each node is compared with the preset stability threshold value, and the average value of the stability value is selected to be greater than or equal to the preset stability threshold value of the first-level domain name of the target alliance chain Node.
  8. 根据权利要求1所述的区块链节点访问方法,其中,在根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点之前,还包括:The method for accessing blockchain nodes according to claim 1, wherein, according to the obtained user access request, the domain name resolution service library analyzes the stability of the target alliance chain node, and according to the analysis result, selects the target alliance chain node Before leaving the pre-selected node, it also includes:
    联盟链向中央网络安全和信息化委员办公室备案审核后,将所述联盟链的链路信息全部同步至预设的储存库中,得到域名解析服务库。After the consortium chain is filed and reviewed with the Central Network Security and Information Committee Office, all the link information of the consortium chain is synchronized to the preset repository to obtain a domain name resolution service database.
  9. 根据权利要求8所述的区块链节点访问方法,其中,所述与所述二级域名对应的指定IP地址为在所述联盟链向中央网络安全和信息化委员办公室备案审核后,储存至所述域名解析服务库的联盟链节点的即时IP地址。The method for accessing blockchain nodes according to claim 8, wherein the designated IP address corresponding to the second-level domain name is stored to the Central Network Security and Information Commission after the consortium chain has filed and reviewed it with the Office of the Central Network Security and Information Commission The real-time IP address of the alliance chain node of the domain name resolution service library.
  10. 根据权利要求1所述的区块链节点访问方法,其中,所述一级域名、所述二级域名以及与所述二级域名对应的指定IP地址均唯一。The method for accessing blockchain nodes according to claim 1, wherein the first-level domain name, the second-level domain name, and the designated IP address corresponding to the second-level domain name are all unique.
  11. 根据权利要求1所述的区块链节点访问方法,其中,所述对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点的步骤包括:The method for accessing blockchain nodes according to claim 1, wherein the step of performing statistics on the load of the preselected nodes and selecting the best node from the preselected nodes comprises:
    获取所述预选节点的解析频次;Obtaining the analysis frequency of the preselected node;
    从所述预选节点中筛选出解析频次最少的预选节点,作为最佳节点。The preselected node with the least frequency of analysis is selected from the preselected nodes as the best node.
  12. 根据权利要求1所述的区块链节点访问方法,其中,在将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出后,还包括:The method for accessing a blockchain node according to claim 1, wherein after outputting the second-level domain name of the optimal node and its designated IP address from the domain name resolution service database, the method further comprises:
    根据用户对所述最佳节点的二级域名及其指定IP地址的访问请求信息,对所述最佳节点的二级域名及其指定IP地址进行解析记录。According to the user's access request information for the second-level domain name of the best node and its designated IP address, the second-level domain name of the best node and its designated IP address are analyzed and recorded.
  13. 一种电子装置,其中,该电子装置包括:存储器、处理器,所述存储器中存储有区块链节点访问程序,所述区块链节点访问程序被所述处理器执行时实现如下步骤:An electronic device, wherein the electronic device comprises: a memory and a processor, and a blockchain node access program is stored in the memory. When the blockchain node access program is executed by the processor, the following steps are implemented:
    根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点,其中,According to the obtained user access requests, the domain name resolution service library analyzes the stability of the target alliance chain nodes, and according to the analysis results, filters out preselected nodes from the target alliance chain nodes, among which,
    所述用户访问请求包括目标联盟链的一级域名,所述一级域名用于表述联盟链,所述域名解析服务库包括:一级域名、二级域名以及与所述二级域名对应的指定IP地址,所述 二级域名用于表述联盟链节点;The user access request includes the first-level domain name of the target alliance chain, the first-level domain name is used to express the alliance chain, and the domain name resolution service database includes: the first-level domain name, the second-level domain name, and the designation corresponding to the second-level domain name IP address, where the second-level domain name is used to describe the alliance chain node;
    对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;Performing statistics on the load of the pre-selected nodes, and selecting the best node from the pre-selected nodes;
    根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;Obtaining the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
    将所述最佳节点的二级域名及指定IP地址从所述域名解析服务库中输出。The second-level domain name and the designated IP address of the best node are output from the domain name resolution service database.
  14. 根据权利要求13所述的电子装置,其中,所述根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点的步骤包括:The electronic device according to claim 13, wherein the domain name resolution service library analyzes the stability of the target alliance chain node according to the obtained user access request, and selects the pre-selected node from the target alliance chain node according to the analysis result The steps include:
    所述域名解析服务库实时收集联盟链节点的心跳信息,并记录所述心跳信息对应的节点的实际IP地址;The domain name resolution service library collects heartbeat information of alliance chain nodes in real time, and records the actual IP address of the node corresponding to the heartbeat information;
    根据所述联盟链节点的心跳信息,计算出所述目标联盟链的一级域名下的节点的稳定值的平均值;Calculating the average value of the stable values of the nodes under the first-level domain name of the target alliance chain according to the heartbeat information of the nodes of the alliance chain;
    根据所述节点的稳定值的平均值,从目标联盟链节点中筛选出符合预设稳定性阈值的预选节点。According to the average value of the stability value of the node, a preselected node that meets the preset stability threshold is selected from the target alliance chain nodes.
  15. 根据权利要求14所述的电子装置,其中,所述根据所述联盟链节点的心跳信息,计算出所述目标联盟链的一级域名下的节点的稳定值的平均值的步骤包括:The electronic device according to claim 14, wherein the step of calculating the average value of the stable values of the nodes under the first-level domain name of the target alliance chain based on the heartbeat information of the alliance chain nodes comprises:
    按照预设时间间隔获取一段时间内的联盟链节点的心跳值;Obtain the heartbeat value of the alliance chain node in a period of time according to the preset time interval;
    通过节点稳定性计算公式,计算所述目标联盟链的一级域名下的每个节点的每两个相邻心跳值间的稳定值,每个节点得到N个稳定值;Calculate the stable value between every two adjacent heartbeat values of each node under the first-level domain name of the target alliance chain through the node stability calculation formula, and each node obtains N stable values;
    根据每个节点得到的N个稳定值,计算出所述目标联盟链的一级域名下的每个节点的稳定值的平均值。According to the N stable values obtained by each node, the average value of the stable values of each node under the first-level domain name of the target alliance chain is calculated.
  16. 根据权利要求15所述的电子装置,其中,所述节点稳定性计算公式为:15. The electronic device according to claim 15, wherein the node stability calculation formula is:
    S=S0+V,S=S0+V,
    V=(T2-T1)/P;V=(T2-T1)/P;
    其中,S0为前两个相邻心跳值间的稳定值,其初始值为0,V为稳定值变化值,其中,T2为当前心跳到达时间,T1为上一个心跳到达时间,P为预设时间间隔;其中,V的取值规则为:Among them, S0 is the stable value between the previous two adjacent heartbeat values, its initial value is 0, V is the stable value change value, where T2 is the current heartbeat arrival time, T1 is the last heartbeat arrival time, and P is the preset Time interval; among them, the value rule of V is:
    当V≤0时,V取值为0;When V≤0, the value of V is 0;
    当0<V≤1时,V取值为1;When 0<V≤1, the value of V is 1;
    当1<V<2时,V的取值为-1When 1<V<2, the value of V is -1
    当V≥2时,V的取值为-(V-1)。When V≥2, the value of V is -(V-1).
  17. 根据权利要求14所述的电子装置,其中,所述域名解析服务库通过HTTP请求实时收集联盟链节点的心跳信息。The electronic device according to claim 14, wherein the domain name resolution service library collects heartbeat information of alliance chain nodes in real time through HTTP requests.
  18. 根据权利要求17所述的电子装置,其中,所述域名解析服务库通过HTTP请求的协议头获取所述心跳信息对应的节点的实际IP地址,并记录所述心跳信息对应的节点的实际IP地址。The electronic device according to claim 17, wherein the domain name resolution service library obtains the actual IP address of the node corresponding to the heartbeat information through the protocol header of the HTTP request, and records the actual IP address of the node corresponding to the heartbeat information .
  19. 一种区块链节点访问系统,其中,包括:A blockchain node access system, which includes:
    预选节点筛选单元,用于根据获取的用户访问请求,域名解析服务库对目标联盟链节点的稳定性进行分析,根据分析结果,从目标联盟链节点中筛选出预选节点;The pre-selected node screening unit is used to analyze the stability of the target alliance chain node according to the obtained user access request and the domain name resolution service library, and filter out the pre-selected node from the target alliance chain node according to the analysis result;
    最佳节点筛选单元,用于对所述预选节点的负载进行统计,从所述预选节点中筛选出最佳节点;An optimal node screening unit, configured to perform statistics on the load of the preselected nodes, and select the optimal node from the preselected nodes;
    二级域名获取单元,用于根据所述最佳节点的实际IP地址,获取所述最佳节点的二级域名及其指定IP地址;A second-level domain name obtaining unit, configured to obtain the second-level domain name of the best node and its designated IP address according to the actual IP address of the best node;
    输出单元,用于将所述最佳节点的二级域名及其指定IP地址从所述域名解析服务库中输出。The output unit is used to output the second-level domain name of the best node and its designated IP address from the domain name resolution service database.
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有区块链节点访问程序,所述区块链节点访问程序被处理器执行时,实现如权利要求1至12中任一项所述的区块链节点访问方法的步骤。A computer-readable storage medium, wherein a block chain node access program is stored in the computer-readable storage medium, and when the block chain node access program is executed by a processor, it realizes any of claims 1 to 12 One of the steps of the block chain node access method.
PCT/CN2020/099202 2020-01-13 2020-06-30 Blockchain node access method, apparatus and system, and storage medium WO2021143061A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010032340.8A CN111262959B (en) 2020-01-13 2020-01-13 Block link point access method, device and storage medium
CN202010032340.8 2020-01-13

Publications (1)

Publication Number Publication Date
WO2021143061A1 true WO2021143061A1 (en) 2021-07-22

Family

ID=70950481

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099202 WO2021143061A1 (en) 2020-01-13 2020-06-30 Blockchain node access method, apparatus and system, and storage medium

Country Status (2)

Country Link
CN (1) CN111262959B (en)
WO (1) WO2021143061A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221965A (en) * 2021-12-07 2022-03-22 杭州趣链科技有限公司 Method and device for accessing block chain and electronic equipment
CN115426333A (en) * 2022-08-26 2022-12-02 济南浪潮数据技术有限公司 Multi-cluster access system and method for object storage

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111262959B (en) * 2020-01-13 2021-05-25 平安科技(深圳)有限公司 Block link point access method, device and storage medium
CN112787890B (en) * 2021-01-19 2022-09-27 北京笔新互联网科技有限公司 Block chain monitoring system
CN114401244A (en) * 2022-01-14 2022-04-26 平安普惠企业管理有限公司 Operation link intelligent switching method, device, equipment and storage medium
CN115914240B (en) * 2023-01-06 2023-05-26 江苏荣泽信息科技股份有限公司 Cross-chain transaction template management system based on DNS analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613041A (en) * 2017-09-22 2018-01-19 中国互联网络信息中心 DNS management system, domain name management method and domain name analytic method based on block chain
CN108616613A (en) * 2018-04-13 2018-10-02 北京信息科技大学 A kind of decentralization root domain name service method and system based on block chain
WO2018213880A1 (en) * 2017-05-22 2018-11-29 Haventec Pty Ltd System for blockchain based domain name and ip number register
CN110163756A (en) * 2019-05-28 2019-08-23 深圳市网心科技有限公司 A kind of method of commerce based on alliance's chain, system, server and block catenary system
CN111262959A (en) * 2020-01-13 2020-06-09 平安科技(深圳)有限公司 Block link point access method, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9569771B2 (en) * 2011-04-29 2017-02-14 Stephen Lesavich Method and system for storage and retrieval of blockchain blocks using galois fields
US20190058709A1 (en) * 2017-08-16 2019-02-21 Telefonaktiebolaget Lm Ericsson (Publ) Tenant management method and system in a cloud computing environment
CN108696522A (en) * 2018-05-11 2018-10-23 北京奇虎科技有限公司 Task processing method, calculate node, block catenary system in a kind of block chain
CN109889382B (en) * 2019-02-20 2020-07-21 中国互联网络信息中心 Domain name information maintenance system based on block chain hybrid consensus
CN110011930B (en) * 2019-03-12 2022-06-24 深圳前海微众银行股份有限公司 Load balancing method and device for multi-union chain in block chain
CN110012126B (en) * 2019-04-02 2022-01-21 哈尔滨工业大学(深圳) DNS system based on block chain technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018213880A1 (en) * 2017-05-22 2018-11-29 Haventec Pty Ltd System for blockchain based domain name and ip number register
CN107613041A (en) * 2017-09-22 2018-01-19 中国互联网络信息中心 DNS management system, domain name management method and domain name analytic method based on block chain
CN108616613A (en) * 2018-04-13 2018-10-02 北京信息科技大学 A kind of decentralization root domain name service method and system based on block chain
CN110163756A (en) * 2019-05-28 2019-08-23 深圳市网心科技有限公司 A kind of method of commerce based on alliance's chain, system, server and block catenary system
CN111262959A (en) * 2020-01-13 2020-06-09 平安科技(深圳)有限公司 Block link point access method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221965A (en) * 2021-12-07 2022-03-22 杭州趣链科技有限公司 Method and device for accessing block chain and electronic equipment
CN115426333A (en) * 2022-08-26 2022-12-02 济南浪潮数据技术有限公司 Multi-cluster access system and method for object storage

Also Published As

Publication number Publication date
CN111262959B (en) 2021-05-25
CN111262959A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
WO2021143061A1 (en) Blockchain node access method, apparatus and system, and storage medium
CN109271411B (en) Report generation method, report generation device, computer equipment and storage medium
US20230177008A1 (en) Session-Based Processing Method and System
EP2871574A1 (en) Analytics for application programming interfaces
US9686152B2 (en) Techniques for tracking resource usage statistics per transaction across multiple layers of protocols
CN110609937A (en) Crawler identification method and device
WO2020015199A1 (en) Dark web security evaluation method, server and computer readable storage medium
CN107870989A (en) webpage generating method and terminal device
CN108667770A (en) A kind of loophole test method, server and the system of website
US11368477B2 (en) Webpage integrity monitoring
CN105765905B (en) Network server system, the method implemented by computer and computer readable storage medium
CN109359263A (en) A kind of user behavior characteristics extracting method and system
CN105701198B (en) Page verification method and device
CN109862074B (en) Data acquisition method and device, readable medium and electronic equipment
Liu et al. Request dependency graph: A model for web usage mining in large-scale web of things
KR20210056744A (en) External information recognizing and information providing method using blockchain
CN110737645A (en) data migration method between different systems, data migration system and related equipment
CN105184559A (en) System and method for payment
CN112286815A (en) Interface test script generation method and related equipment thereof
CN113055420B (en) HTTPS service identification method and device and computing equipment
US9723017B1 (en) Method, apparatus and computer program product for detecting risky communications
CN111479140B (en) Data acquisition method, data acquisition device, computer device and storage medium
Tidy et al. Simulation of zero-day worm epidemiology in the dynamic, heterogeneous Internet
Book et al. Cost and response time simulation for web-based applications on mobile channels
KR20140043556A (en) Apparatus and method for analyzing system usage

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20913832

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20913832

Country of ref document: EP

Kind code of ref document: A1