[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115361390B - Method for joining a blockchain network, computer storage medium and electronic device - Google Patents

Method for joining a blockchain network, computer storage medium and electronic device Download PDF

Info

Publication number
CN115361390B
CN115361390B CN202211289952.0A CN202211289952A CN115361390B CN 115361390 B CN115361390 B CN 115361390B CN 202211289952 A CN202211289952 A CN 202211289952A CN 115361390 B CN115361390 B CN 115361390B
Authority
CN
China
Prior art keywords
node
information
target node
application
chain
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
CN202211289952.0A
Other languages
Chinese (zh)
Other versions
CN115361390A (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.)
China Academy of Information and Communications Technology CAICT
Original Assignee
China Academy of Information and Communications Technology CAICT
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 China Academy of Information and Communications Technology CAICT filed Critical China Academy of Information and Communications Technology CAICT
Priority to CN202211289952.0A priority Critical patent/CN115361390B/en
Publication of CN115361390A publication Critical patent/CN115361390A/en
Application granted granted Critical
Publication of CN115361390B publication Critical patent/CN115361390B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method, computer storage medium and electronic device for joining a block chain network relate to the technical field of block chains, the method is applied to access authorization service equipment and comprises the following steps: receiving an access request sent by a target node; acquiring node basic information, first to-be-accessed link information and a node application type of a target node from an access request; splicing the first information of the link to be accessed and the node application type to obtain a splicing result; determining node constraint information corresponding to the splicing result; determining the matching degree of the node basic information and the node constraint information; and under the condition that the access request is determined to pass the examination based on the matching degree, adding the target node into a first block chain network corresponding to the first information to be accessed, and enabling the role of the target node in the first block chain network to be matched with the node application type. The method and the device can efficiently and reliably add the new node in the block chain network.

Description

用于加入区块链网络的方法、计算机存储介质及电子设备Method, computer storage medium and electronic device for joining blockchain network

技术领域technical field

本申请涉及区块链技术领域,具体地,涉及一种用于加入区块链网络的方法、计算机存储介质及电子设备。The present application relates to the technical field of blockchain, and in particular, relates to a method for joining a blockchain network, a computer storage medium and electronic equipment.

背景技术Background technique

区块链(Blockchain)是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式,其本质是一个去中心化的数据库,是一串使用密码学方法相关联的数据块。一些情况下,需要在区块链网络中添加新节点,如何实现新节点的添加对于本领域人员而言是一个需要解决的问题。Blockchain (Blockchain) is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Its essence is a decentralized database, which is a series of data blocks associated with cryptographic methods . In some cases, new nodes need to be added to the blockchain network, and how to realize the addition of new nodes is a problem that needs to be solved for those skilled in the art.

发明内容Contents of the invention

本申请实施例中提供了一种用于加入区块链网络的方法、计算机存储介质及电子设备,以解决上述技术问题。Embodiments of the present application provide a method for joining a blockchain network, a computer storage medium, and an electronic device to solve the above technical problems.

根据本申请实施例的第一个方面,提供了一种用于加入区块链网络的方法,According to the first aspect of the embodiment of the present application, a method for joining a blockchain network is provided,

应用于接入授权服务设备,所述方法包括:Applied to an access authorization service device, the method includes:

接收目标节点发送的接入请求;Receive the access request sent by the target node;

从所述接入请求中,获取所述目标节点的节点基础信息、第一待接入链信息和节点申请类型;From the access request, obtain the basic node information of the target node, the first link information to be connected, and the node application type;

将所述第一待接入链信息与所述节点申请类型进行拼接,得到拼接结果;splicing the first to-be-connected link information with the node application type to obtain a splicing result;

确定所述拼接结果对应的节点约束信息;determining node constraint information corresponding to the splicing result;

确定所述节点基础信息与所述节点约束信息的匹配度;determining the degree of matching between the node basic information and the node constraint information;

在基于所述匹配度,确定对所述接入请求的审核通过的情况下,将所述目标节点加入所述第一待接入链信息对应的第一区块链网络,且令所述目标节点在所述第一区块链网络中的角色与所述节点申请类型相匹配。When it is determined that the access request is approved based on the matching degree, add the target node to the first block chain network corresponding to the first link information to be connected, and make the target node The role of the node in the first blockchain network matches the node application type.

在一个可选示例中,所述接收目标节点发送的接入请求之后,所述方法还包括:In an optional example, after receiving the access request sent by the target node, the method further includes:

为所述接入请求分配申请标识;assigning an application identifier to the access request;

将所述申请标识发送至所述目标节点。Send the application identifier to the target node.

在一个可选示例中,所述方法还包括:In an optional example, the method also includes:

在对所述接入请求的审核通过的情况下,在第一区域记录所述申请标识与所述第一待接入链信息之间的关联关系;If the review of the access request is passed, record the association relationship between the application identifier and the first link information to be accessed in the first area;

接收所述目标节点发送的第一接入链更新请求,所述第一接入链更新请求中携带第二待接入链信息和所述申请标识;receiving a first access link update request sent by the target node, where the first access link update request carries information about a second to-be-access link and the application identifier;

响应于所述第一接入链更新请求,将所述第一区域中所述申请标识关联的接入链信息由所述第一待接入链信息更新为所述第二待接入链信息,并将所述目标节点由加入所述第一区块链网络切换为加入所述第二待接入链对应的第二区块链网络。In response to the first access link update request, updating the access link information associated with the application identifier in the first area from the first to-be-access link information to the second to-be-access link information , and switch the target node from joining the first blockchain network to joining the second blockchain network corresponding to the second chain to be connected.

在一个可选示例中,所述将所述申请标识发送至所述目标节点之后,所述方法还包括:In an optional example, after sending the application identifier to the target node, the method further includes:

接收所述目标节点发送的携带所述申请标识的申请详情请求;receiving an application details request carrying the application identifier sent by the target node;

响应于所述申请详情请求,确定所述接入请求对应的申请详情信息,所述申请详情信息包括:许可颁发信息、审核状态、申请状态中的至少一者,以及所述节点基础信息、所述第一待接入链信息、所述节点申请类型;In response to the application details request, determine application details information corresponding to the access request, where the application details information includes: at least one of license issuance information, review status, and application status, as well as the node basic information, all The first to-be-connected chain information, the node application type;

将所述申请详情信息发送至所述目标节点。Send the application detail information to the target node.

在一个可选示例中,所述将所述申请标识发送至所述目标节点之后,所述方法还包括:In an optional example, after sending the application identifier to the target node, the method further includes:

在对所述接入请求的审核通过的情况下,确定所述接入请求对应的颁发信息,所述颁发信息包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及所述申请标识;When the review of the access request is passed, determine the issuance information corresponding to the access request, where the issuance information includes: at least one of the issuance object information, installation package information, and basic issuance information, and the the above application identification;

将所述颁发信息发送至所述目标节点。Send the issuance information to the target node.

在一个可选示例中,所述方法还包括:In an optional example, the method also includes:

基于所述节点基础信息,确定所述目标节点的节点地址;determining the node address of the target node based on the node basic information;

在对所述接入请求的审核通过的情况下,在第二区域记录所述节点地址与所述第一待接入链信息之间的关联关系;If the review of the access request is passed, record the association relationship between the node address and the first to-be-accessed link information in the second area;

接收所述目标节点发送的第二接入链更新请求,所述第二接入链更新请求中携带第二待接入链信息和所述节点地址;receiving a second access link update request sent by the target node, where the second access link update request carries information on a second to-be-access link and the node address;

响应于所述第二接入链更新请求,确定所述第二区域中最新记录的待接入链信息,并将所述目标节点由加入所述第二区域中最新记录的待接入链信息对应的区块链网络切换为加入所述第二待接入链信息对应的第二区块链网络。In response to the second access link update request, determine the latest recorded information about the link to be accessed in the second area, and add the target node to the latest recorded information about the link to be accessed in the second area The corresponding blockchain network is switched to join the second blockchain network corresponding to the second to-be-connected chain information.

在一个可选示例中,所述将所述目标节点加入所述第一待接入链信息对应的第一区块链网络,且令所述目标节点在所述第一区块链网络中的角色与所述节点申请类型相匹配之后,所述方法还包括:In an optional example, adding the target node to the first block chain network corresponding to the first to-be-accessed chain information, and making the target node in the first block chain network After the role is matched with the node application type, the method further includes:

在满足第一预设条件的情况下,按照所述节点申请类型,取消所述目标节点在所述第一区块链网络中的相应权限;When the first preset condition is met, according to the node application type, cancel the corresponding authority of the target node in the first blockchain network;

在满足第二预设条件的情况下,按照所述节点申请类型,恢复所述目标节点在所述第一区块链网络中的相应权限。If the second preset condition is met, according to the node application type, the corresponding authority of the target node in the first blockchain network is restored.

在一个可选示例中,In an optional example,

所述接收目标节点发送的接入请求之前,所述方法还包括:Before receiving the access request sent by the target node, the method further includes:

接收所述目标节点发送的链信息获取请求;receiving the chain information acquisition request sent by the target node;

响应于所述链信息获取请求,确定多个链信息,每个链信息中均包括链名称和链编号中的至少一者;In response to the chain information acquisition request, determine a plurality of chain information, each of which includes at least one of a chain name and a chain number;

将所述多个链信息发送至所述目标节点;sending the plurality of chain information to the target node;

其中,所述第一待接入链信息选自所述多个链信息;Wherein, the first to-be-accessed chain information is selected from the plurality of chain information;

和/或,and / or,

所述接收目标节点发送的接入请求之前,所述方法还包括:Before receiving the access request sent by the target node, the method further includes:

接收所述目标节点发送的申请类型获取请求;receiving the application type acquisition request sent by the target node;

响应于所述申请类型获取请求,确定多个申请类型;determining a plurality of application types in response to the application type acquisition request;

将所述多个申请类型发送至所述目标节点;sending the plurality of application types to the target node;

其中,所述节点申请类型选自所述多个申请类型。Wherein, the node application type is selected from the multiple application types.

根据本申请实施例的第二个方面,提供了一种计算机存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述方法的步骤。According to a second aspect of the embodiments of the present application, there is provided a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the above first aspect are implemented.

根据本申请实施例的第三个方面,提供了一种电子设备,包括存储器、以及一个或多个处理器,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如上述第一方面所述的方法。According to a third aspect of the embodiments of the present application, an electronic device is provided, including a memory and one or more processors, the memory is used to store one or more programs; the one or more programs are stored by the When the above one or more processors are executed, the method as described in the first aspect above is implemented.

本申请实施例提供的方案中,可以在从目标节点发送的接入请求中,获取目标节点的节点基础信息、第一待接入链信息和节点申请类型之后,将第一待接入链信息与节点申请类型进行拼接,确定得到的拼接结果对应的节点约束信息,并确定节点基础信息与节点约束信息的匹配度,以便利用匹配度确定对接入请求的审核是否通过。对于接入请求的审核通过的情况,可以将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配,这样就按照用户的需求,高效地将目标节点添加至了第一区块链网络中,且在添加之前对目标节点进行了可靠的接入认证,因此,本申请实施例能够高效可靠地在区块链网络中添加新节点。In the solution provided by the embodiment of this application, after obtaining the basic information of the target node, the information of the first link to be connected and the type of node application of the target node in the access request sent from the target node, the information of the first link to be connected can be Splicing with the node application type, determining the node constraint information corresponding to the resulting splicing result, and determining the matching degree between the node basic information and the node constraint information, so as to use the matching degree to determine whether the review of the access request is passed. For the case where the access request is approved, the target node can be added to the first blockchain network corresponding to the first chain information to be connected, and the role of the target node in the first blockchain network is consistent with the node application type. In this way, the target node is efficiently added to the first blockchain network according to the needs of the user, and reliable access authentication is performed on the target node before the addition. Therefore, the embodiment of the present application can efficiently and reliably Add new nodes to the blockchain network.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1示出了本申请实施例中提供的用于加入区块链网络的方法的流程示意图之一;Figure 1 shows one of the schematic flow diagrams of the method for joining a blockchain network provided in the embodiment of the present application;

图2示出了本申请实施例中接入授权服务设备的构架图;Fig. 2 shows the frame diagram of the access authorization service device in the embodiment of the present application;

图3示出了本申请实施例中提供的用于加入区块链网络的方法的流程示意图之二;Figure 3 shows the second schematic flow diagram of the method for joining the blockchain network provided in the embodiment of the present application;

图4示出了本申请实施例中提供的用于加入区块链网络的方法的流程示意图之三;Figure 4 shows the third schematic flow diagram of the method for joining the blockchain network provided in the embodiment of the present application;

图5示出了本申请实施例中提供的用于加入区块链网络的方法的流程示意图之四;Figure 5 shows the fourth schematic flow diagram of the method for joining a blockchain network provided in the embodiment of the present application;

图6示出了本申请实施例中提供的用于加入区块链网络的方法的流程示意图之五;Fig. 6 shows the fifth schematic flow diagram of the method for joining the blockchain network provided in the embodiment of the present application;

图7示出了本申请实施例中提供的一种电子设备的结构示意图。FIG. 7 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.

具体实施方式Detailed ways

本申请实施例提供了一种用于加入区块链网络的方法,该方法可以应用于接入授权服务设备,接入授权服务设备也可以称为接入授权服务平台或者接入授权服务系统。The embodiment of the present application provides a method for joining a blockchain network, which can be applied to an access authorization service device, and the access authorization service device can also be called an access authorization service platform or an access authorization service system.

需要说明的是,为了支持本申请实施例提供的用于加入区块链网络的方法,接入授权服务设备需要具有合适的运行环境。It should be noted that, in order to support the method for joining the blockchain network provided by the embodiment of the present application, the access authorization service device needs to have a suitable operating environment.

可选地,接入授权服务设备的硬件环境可以满足以下至少一项:(1)中央处理器(Central Processing Unit,CPU)不低于2核;(2)内存不低于4核;(3)硬盘的容量在512G以上;(4)显卡是显存为256M以上的独立显卡。Optionally, the hardware environment for accessing authorized service devices can meet at least one of the following: (1) Central Processing Unit (CPU) not less than 2 cores; (2) memory not less than 4 cores; (3 ) The capacity of the hard disk is above 512G; (4) The graphics card is an independent graphics card with a video memory of 256M or above.

可选地,接入授权服务设备的软件环境可以满足以下至少一项:(1)操作系统为Windows 7及以上版本,或者操作系统为CentOS7.5(其属于一种开源和企业级计算机操作系统);(2)浏览器为Google Chrome 63.0以上,或者浏览器为Microsoft IE 8.0以上;(3)MySQL(其是一种关系型数据库管理系统)版本为MySQL5.7.25。Optionally, the software environment for accessing authorized service equipment can meet at least one of the following: (1) The operating system is Windows 7 and above, or the operating system is CentOS7.5 (which belongs to an open source and enterprise-level computer operating system ); (2) The browser is Google Chrome 63.0 or above, or the browser is Microsoft IE 8.0 or above; (3) MySQL (which is a relational database management system) version is MySQL5.7.25.

参见图1,图中示出了本申请实施例提供的用于加入区块链网络的方法的流程图。如图1所示,该方法包括步骤110、步骤120、步骤130、步骤140、步骤150和步骤160,下面分别对各步骤进行说明。Referring to FIG. 1 , it shows a flowchart of a method for joining a blockchain network provided by an embodiment of the present application. As shown in FIG. 1 , the method includes step 110 , step 120 , step 130 , step 140 , step 150 and step 160 , and each step will be described below.

步骤110,接收目标节点发送的接入请求。Step 110, receiving the access request sent by the target node.

需要说明的是,目标节点可以为请求加入某一区块链网络中的任一节点,目标节点中的“目标”并不构成对目标节点的任何限定。It should be noted that the target node can be any node that requests to join a blockchain network, and the "target" in the target node does not constitute any limitation on the target node.

在步骤110中,可以由用户(例如图2中的平台用户)在目标节点上进行操作,以使目标节点向接入授权服务设备发起接入请求。In step 110, a user (for example, a platform user in FIG. 2 ) may perform an operation on the target node, so that the target node initiates an access request to the access authorization service device.

可选地,接入请求可以为超文本传输协议(Hyper Text Transfer Protocol,HTTP)请求,接入请求的请求方式可以为POST,接入请求也可以称为License(许可)申请,接入请求可以呈如下形式:Optionally, the access request may be a Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP) request, the request method of the access request may be POST, and the access request may also be called a License (permission) application, and the access request may be in the following form:

https://{url}/license/applyhttps://{url}/license/apply

[[

{{

"applicantBid":"","applicantBid": "",

"chainCode":"","chainCode": "",

"chainName":"","chainName": "",

"nodeName":"","nodeName": "",

"nodeBid":"","nodeBid": "",

"nodeOrg":"","nodeOrg": "",

"linkName":"","linkName": "",

"linkPhone":"","linkPhone": "",

"linkEmail":"","linkEmail": "",

"equipmentInfo":["",""],"equipmentInfo":["",""],

"remark":"","remark": "",

"link":"","link": "",

"type":"""type": ""

}}

]]

上面的接入请求中包括多个参数,各个参数的说明可以参见下面的表1: The above access request includes multiple parameters, and the description of each parameter can be found in Table 1 below:

Figure 713297DEST_PATH_IMAGE001
Figure 713297DEST_PATH_IMAGE001

表1Table 1

步骤120,从接入请求中,获取目标节点的节点基础信息、第一待接入链信息和节点申请类型。Step 120, from the access request, obtain the target node's basic node information, first link information to be connected, and node application type.

在步骤120中,可以直接从接入请求中提取目标节点的节点基础信息、第一待接入链信息和节点申请类型。可选地,节点基础信息可以包括表1中的节点地址、节点名称、节点运营单位名称、联系人名称、联系人电话、联系人email等;第一待接入链信息可以包括表1中的链id、链名称等;节点申请类型可以对应表1中的申请类型。In step 120, the basic node information of the target node, the information of the first link to be connected, and the node application type of the target node may be directly extracted from the access request. Optionally, the node basic information may include the node address, node name, node operating unit name, contact name, contact phone number, contact email, etc. in Table 1; the first link information to be connected may include the Chain id, chain name, etc.; the node application type can correspond to the application type in Table 1.

步骤130,将第一待接入链信息与节点申请类型进行拼接,得到拼接结果。Step 130, splicing the information of the first link to be connected and the node application type to obtain a splicing result.

可选地,第一待接入链信息和节点申请类型均可以呈字符或者字符串形式,通过利用预设字符(例如“+”、“&”等)将第一待接入链信息和节点申请类型进行连接,可以得到一个新的字符串,该新的字符串可以作为第一待接入链信息与节点申请类型的拼接结果。Optionally, both the first to-be-connected chain information and the node application type can be in the form of characters or character strings, and the first to-be-connected chain information and the node The application type can be connected to obtain a new character string, and the new character string can be used as the concatenation result of the first pending link information and the node application type.

步骤140,确定第一待接入链信息与节点申请类型的拼接结果对应的节点约束信息。Step 140, determine the node constraint information corresponding to the concatenation result of the first to-be-connected link information and the node application type.

需要说明的是,可以预先统计需要由接入授权服务设备进行接入审核的所有区块链网络,以及所有申请类型,这些区块链网络包括但不限于政务链、商务链等。基于经统计确定的所有区块链网络和所有申请类型,可以形成多种组合方式,每种组合方式中包括一个区块链网络对应的链信息和一个申请类型,不同组合方式中的链信息和/或申请类型是不同的。针对每种组合方式,可以将该组合方式中的链信息和申请类型进行拼接,得到拼接结果,由此可以得到与多种组合方式一一对应的多个拼接结果。It should be noted that all blockchain networks that need to be reviewed by access authorization service equipment and all application types can be counted in advance. These blockchain networks include but are not limited to government affairs chains, business chains, etc. Based on all blockchain networks and all application types determined through statistics, multiple combinations can be formed, each combination includes chain information corresponding to a blockchain network and an application type, chain information and application types in different combinations /or the application type is different. For each combination mode, the chain information and the application type in the combination mode can be spliced to obtain a splicing result, and thus multiple splicing results corresponding to the multiple combination modes can be obtained one-to-one.

假设某一组合方式中的链信息为A,申请类型B,则可以确定任一节点若要成为A对应的区块链网络中,B类型的节点时,该节点需要满足哪些约束条件,这些约束条件的组合可以作为该组合方式对应的约束信息。按照类似的方式,可以得到与多种组合方式一一对应的多个约束信息,再结合上文中与多种组合方式一一对应的多个拼接结果,可以得到多个拼接结果与多个约束信息之间的一一对应关系。在步骤140中,基于该一一对应关系,可以高效快捷地确定第一待接入链信息与节点申请类型的拼接结果对应的约束信息,该约束信息即可作为节点约束信息。Assuming that the chain information in a certain combination is A and the application type is B, it can be determined which constraints the node needs to satisfy when it wants to become a node of type B in the blockchain network corresponding to A. These constraints A combination of conditions may be used as constraint information corresponding to the combination. In a similar manner, multiple constraint information corresponding to various combination methods can be obtained, and combined with the above multiple splicing results that correspond to multiple combination methods one-to-one, multiple splicing results and multiple constraint information can be obtained One-to-one correspondence between them. In step 140, based on the one-to-one correspondence, constraint information corresponding to the splicing result of the first to-be-connected link information and the node application type can be determined efficiently and quickly, and the constraint information can be used as node constraint information.

步骤150,确定节点基础信息与节点约束信息的匹配度。Step 150, determine the matching degree between the node basic information and the node constraint information.

可选地,节点基础信息中可以包括目标节点在多个维度中的每个维度的基础信息,节点约束信息中可以包括多个维度中的每个维度的约束条件。在步骤150中,可以针对多个维度中的每个维度,通过确定该维度对应的基础信息是否符合该维度对应的约束条件,得到该维度对应的匹配度,按照类似的方式,可以得到与多个维度一一对应的多个匹配度,通过对得到的多个匹配度求平均值或者求加权平均值或者求和值等,可以得到节点基础信息与节点约束信息的匹配度。Optionally, the node basic information may include basic information of the target node in each of the multiple dimensions, and the node constraint information may include constraints of each of the multiple dimensions. In step 150, for each dimension in the multiple dimensions, the matching degree corresponding to the dimension can be obtained by determining whether the basic information corresponding to the dimension meets the constraint conditions corresponding to the dimension. One-to-one correspondence of multiple matching degrees of each dimension, the matching degree of node basic information and node constraint information can be obtained by calculating the average or weighted average value or summation value of the obtained multiple matching degrees.

步骤160,在基于节点基础信息与节点约束信息的匹配度,确定对接入请求的审核通过的情况下,将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配。Step 160, based on the matching degree of node basic information and node constraint information, if it is determined that the access request is approved, add the target node to the first block chain network corresponding to the first chain information to be connected, and make The role of the target node in the first blockchain network matches the node application type.

在步骤160中,可以基于节点基础信息与节点约束信息的匹配度,确定对接入请求的审核是否通过。可选地,在该匹配度大于预设匹配度的情况下,可以确定对接入请求的审核通过,在该匹配度小于或等于预设匹配度的情况下,可以确定对接入请求的审核不通过。当然,确定接入请求的审核是否通过的依据并不局限于节点基础信息与节点约束信息的匹配度,例如还可以包括接入请求中的信息的完整度、准确度等,由此可以对接入请求进行全方位、突出重点的审核。In step 160, it may be determined whether the review of the access request passes based on the matching degree between the basic node information and the node constraint information. Optionally, when the matching degree is greater than a preset matching degree, it can be determined that the access request is approved; when the matching degree is less than or equal to the preset matching degree, it can be determined that the access request is approved Fail. Of course, the basis for determining whether the review of the access request is passed is not limited to the matching degree between the basic information of the node and the constraint information of the node, for example, it may also include the completeness and accuracy of the information in the access request. A comprehensive and focused review of incoming requests.

在对接入请求的审核通过的情况下,可以同意接入请求,并将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配,例如,在节点申请类型为0服务节点时,目标节点会成为第一区块链网络中的服务节点,在节点申请类型为2骨干节点时,目标节点会成为第一区块链网络中的骨干节点。If the access request is approved, the access request can be agreed, and the target node can be added to the first blockchain network corresponding to the first chain information to be connected, and the target node can The role in the node matches the type of node application. For example, when the node application type is 0 service node, the target node will become the service node in the first blockchain network. When the node application type is 2 backbone nodes, the target node will be Become the backbone node in the first blockchain network.

在对接入请求的审核不通过的情况下,可以拒绝接入请求,这时,目标节点无法加入第一区块链网络。If the review of the access request fails, the access request can be rejected, and at this time, the target node cannot join the first blockchain network.

本申请实施例中,可以在从目标节点发送的接入请求中,获取目标节点的节点基础信息、第一待接入链信息和节点申请类型之后,将第一待接入链信息与节点申请类型进行拼接,确定得到的拼接结果对应的节点约束信息,并确定节点基础信息与节点约束信息的匹配度,以便利用匹配度确定对接入请求的审核是否通过。对于接入请求的审核通过的情况,可以将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配,这样就按照用户的需求,高效地将目标节点添加至了第一区块链网络中,且在添加之前对目标节点进行了可靠的接入认证,因此,本申请实施例能够高效可靠地在区块链网络中添加新节点。In this embodiment of the application, after obtaining the basic node information of the target node, the first link information to be connected and the node application type in the access request sent from the target node, the information of the first link to be connected and the node application type can be combined. Types are spliced, the node constraint information corresponding to the splicing result is determined, and the matching degree between the node basic information and the node constraint information is determined, so as to use the matching degree to determine whether the review of the access request is passed. For the case where the access request is approved, the target node can be added to the first blockchain network corresponding to the first chain information to be connected, and the role of the target node in the first blockchain network is consistent with the node application type. In this way, the target node is efficiently added to the first blockchain network according to the needs of the user, and reliable access authentication is performed on the target node before the addition. Therefore, the embodiment of the present application can efficiently and reliably Add new nodes to the blockchain network.

在一个可选示例中,如图3所示,在步骤110之前,该方法还包括:In an optional example, as shown in FIG. 3, before step 110, the method further includes:

步骤101,接收目标节点发送的链信息获取请求;Step 101, receiving the chain information acquisition request sent by the target node;

步骤102,响应于链信息获取请求,确定多个链信息,每个链信息中均包括链名称和链编号中的至少一者;Step 102, in response to the chain information acquisition request, determine a plurality of chain information, each chain information includes at least one of a chain name and a chain number;

步骤103,将多个链信息发送至目标节点;Step 103, sending multiple chain information to the target node;

其中,第一待接入链信息选自多个链信息。Wherein, the first to-be-accessed chain information is selected from a plurality of chain information.

这里,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发起链信息获取请求。Here, the user may operate on the target node, so that the target node initiates a link information acquisition request to the access authorization service device.

可选地,链信息获取请求可以为HTTP请求,链信息获取请求的请求方式可以为GET,链信息获取请求可以呈如下形式:https://{url}/license/chainList。Optionally, the chain information acquisition request may be an HTTP request, the request method of the chain information acquisition request may be GET, and the chain information acquisition request may be in the following form: https://{url}/license/chainList.

响应于接收的链信息获取请求,接入授权服务设备可以确定需要由自身进行接入审核的所有区块链网络,并进一步确定这些区块链网络各自的链信息,从而得到多个链信息,每个链信息中可以包括链名称和链编号中的至少一者,链编号也可以称为AC码。之后,接入授权服务设备可以向目标节点返回链信息获取请求的响应结果(后续将其称为第一响应结果),第一响应结果可以为JSON(JavaScript Object Notation,JS对象简谱)格式,第一响应结果中包括的信息的说明可以参见下面的表2:In response to the received chain information acquisition request, the access authorization service device can determine all blockchain networks that need to be audited by itself, and further determine the respective chain information of these blockchain networks, thereby obtaining multiple chain information, Each chain information may include at least one of a chain name and a chain number, and the chain number may also be called an AC code. Afterwards, the access authorization service device can return the response result of the chain information acquisition request (hereinafter referred to as the first response result) to the target node. The first response result can be in JSON (JavaScript Object Notation, JS Object Notation) format. A description of the information included in the response results can be found in Table 2 below:

Figure 939879DEST_PATH_IMAGE002
Figure 939879DEST_PATH_IMAGE002

这样,根据来自接入授权服务设备的第一响应结果,目标节点可以显示多个链信息,用户可以根据实际需求,从多个链信息中选择所需的链信息,以便目标节点发起携带该链信息的接入请求(即该链信息作为上文中的第一待接入链信息),由此可以根据用户的实际需求,使目标节点接入相应的区块链网络。In this way, according to the first response result from the access authorization service device, the target node can display multiple chain information, and the user can select the required chain information from the multiple chain information according to actual needs, so that the target node initiates carrying the chain information. Information access request (that is, the chain information as the first chain information to be connected above), so that the target node can be connected to the corresponding blockchain network according to the actual needs of the user.

在一个可选示例中,如图4所示,在步骤110之前,该方法还包括:In an optional example, as shown in FIG. 4, before step 110, the method further includes:

步骤104,接收目标节点发送的申请类型获取请求;Step 104, receiving the application type acquisition request sent by the target node;

步骤105,响应于申请类型获取请求,确定多个申请类型;Step 105, in response to the application type acquisition request, determine multiple application types;

步骤106,将多个申请类型发送至目标节点;Step 106, sending multiple application types to the target node;

其中,节点申请类型选自多个申请类型。Wherein, the node application type is selected from multiple application types.

这里,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发起申请类型获取请求。Here, the user may operate on the target node, so that the target node initiates an application type acquisition request to the access authorization service device.

可选地,申请类型获取请求可以为HTTP请求,申请类型获取请求的请求方式可以为GET,申请类型获取请求可以呈如下形式:https://{url}/license/applyTypeList。Optionally, the application type acquisition request may be an HTTP request, the request method of the application type acquisition request may be GET, and the application type acquisition request may be in the following form: https://{url}/license/applyTypeList.

响应于接收的申请类型获取请求,接入授权服务设备可以确定所有申请类型,并向目标节点返回申请类型获取请求的响应结果(后续将其称为第二响应结果),第二响应结果可以为JSON格式,第二响应结果中可以包括接入授权服务设备确定的各个申请类型,第二响应结果可以呈如下形式:In response to the received application type acquisition request, the access authorization service device may determine all application types, and return the response result of the application type acquisition request (hereinafter referred to as the second response result) to the target node, and the second response result may be JSON format, the second response result may include each application type determined by the access authorization service device, and the second response result may be in the following form:

{{

"data": {"data": {

"typeList": ["typeList": [

{{

"msg": "服务节点","msg": "Service Node",

"type": "0""type": "0"

},},

{{

"msg": "主链超级节点","msg": "Main Chain Super Node",

"type": "1""type": "1"

},},

{{

"msg": "骨干节点","msg": "Backbone Node",

"type": "2""type": "2"

},},

{{

"msg": "出块超级节点","msg": "Block Producing Super Node",

"type": "3""type": "3"

},},

{{

"msg": "监管节点","msg": "Supervisor node",

"type": "4""type": "4"

},},

{{

"msg": "子链共识节点","msg": "Sub-chain consensus node",

"type": "5" "type": "5"

},},

{{

"msg": "子链出块共识节点","msg": "Sub-chain consensus node",

"type": "6""type": "6"

}}

]]

},},

"errorCode": 0,"errorCode": 0,

"message": "操作成功""message": "Operation succeeded"

}}

这样,根据来自接入授权服务设备的第二响应结果,目标节点可以显示多个申请类型,用户可以根据实际需求,从多个申请类型中选择所需的申请类型,以便目标节点发起携带该申请类型的接入请求(即该申请类型作为上文中的节点申请类型),由此可以根据用户的实际需求,使目标节点以相应角色加入相应的区块链网络。In this way, according to the second response result from the access authorization service device, the target node can display multiple application types, and the user can select the required application type from the multiple application types according to actual needs, so that the target node initiates carrying the application type of access request (that is, the application type is the node application type above), so that the target node can join the corresponding blockchain network with the corresponding role according to the actual needs of the user.

在图1所示实施例的基础上,如图5所示,在步骤110之后,该方法还包括:On the basis of the embodiment shown in FIG. 1, as shown in FIG. 5, after step 110, the method further includes:

步骤165,为接入请求分配申请标识;Step 165, assigning an application identifier to the access request;

步骤170,将申请标识发送至目标节点。Step 170, sending the application ID to the target node.

可选地,申请标识可以为申请编号,申请编号也可以称为applyNo;申请标识可以为JSON格式。Optionally, the application identifier may be an application number, and the application number may also be called applyNo; the application identifier may be in JSON format.

需要说明的是,申请标识的用途多样,下面进行举例介绍。It should be noted that the application mark can be used in various ways, and examples are given below.

在一种具体实施方式中,该方法还包括:In a specific embodiment, the method also includes:

在对接入请求的审核通过的情况下,在第一区域记录申请标识与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the application identifier and the first link information to be accessed in the first area;

接收目标节点发送的第一接入链更新请求,第一接入链更新请求中携带第二待接入链信息和申请标识;receiving the first access link update request sent by the target node, where the first access link update request carries the information of the second to-be-access link and the application identifier;

响应于第一接入链更新请求,将第一区域中申请标识关联的接入链信息由第一待接入链信息更新为第二待接入链信息,并将目标节点由加入第一区块链网络切换为加入第二待接入链对应的第二区块链网络。In response to the first access link update request, update the access link information associated with the application identifier in the first area from the first to-be-access link information to the second to-be-access link information, and add the target node from the first area The block chain network is switched to join the second block chain network corresponding to the second chain to be connected.

可选地,第一区域可以为位于接入授权服务设备本地的一存储区,第一区域可以属于掉电非遗失存储区。Optionally, the first area may be a local storage area located in the access authorization service device, and the first area may belong to a power-off non-lost storage area.

这种实施方式中,在对接入请求的审核通过的情况下,可以在第一区域存储申请标识与第一待接入链信息之间的关联关系,以表征申请标识与第一待接入链信息之间的关联性。In this embodiment, when the access request is approved, the association relationship between the application identifier and the first link information to be accessed can be stored in the first area, so as to represent the relationship between the application identifier and the first link to be accessed. Links between chain information.

可选地,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发起携带第二待接入链信息和申请标识的第一接入链更新请求。Optionally, the user may perform an operation on the target node, so that the target node initiates a first access link update request carrying information about the second link to be accessed and an application identifier to the access authorization service device.

这种实施方式中,接入授权服务设备可以具有license更新链功能,基于license更新链功能,可以响应于第一接入链更新请求,将第一区域中申请标识关联的接入链信息由第一待接入链信息更新为第二待接入链信息,并将目标节点由加入第一区块链网络切换为加入第二待接入链对应的第二区块链网络,这样,根据申请标识,可以快速实现目标节点接入的区块链网络的变更。In this implementation manner, the access authorization service device may have a license update chain function, and based on the license update chain function, may respond to the first access link update request and transfer the access link information associated with the application identifier in the first area to the second The information of the chain to be connected is updated to the information of the second chain to be connected, and the target node is switched from joining the first blockchain network to joining the second blockchain network corresponding to the second chain to be connected. In this way, according to the application Identification, which can quickly realize the change of the blockchain network connected to the target node.

在另一种具体实施方式中,将申请标识发送至目标节点之后,该方法还包括:In another specific implementation manner, after sending the application identifier to the target node, the method further includes:

接收目标节点发送的携带申请标识的申请详情请求;Receive the application details request carrying the application identifier sent by the target node;

响应于申请详情请求,确定接入请求对应的申请详情信息,申请详情信息包括:许可颁发信息、审核状态、申请状态中的至少一者,以及节点基础信息、第一待接入链信息、节点申请类型;In response to the application details request, determine the application details information corresponding to the access request. The application details information includes: at least one of license issuance information, review status, and application status, as well as node basic information, first to-be-accessed chain information, node application type;

将申请详情信息发送至目标节点。Send the application details to the target node.

可选地,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发起申请详情请求。Optionally, the user may operate on the target node, so that the target node initiates a request for application details to the access authorization service device.

可选地,申请详情请求可以通过对串行外设接口(Serial PeripheralInterface,SPI)的调用而发起,申请详情请求也可以称为license详情请求,申请详情请求可以为HTTP请求,申请详情请求的请求方式可以为POST,申请详情请求可以呈如下形式:Optionally, the request for application details can be initiated by invoking a Serial Peripheral Interface (SPI). The request for application details can also be called a request for license details. The request for application details can be an HTTP request, and the request for application details request The method can be POST, and the request for application details can be in the following form:

https://{url}/license/detailhttps://{url}/license/detail

{{

"applyNo":"""applyNo": ""

}}

响应于接收到的申请详情请求,接入授权服务设备可以确定接入请求对应的申请详情信息,并向目标节点返回申请详情请求的响应结果(后续将其称为第三响应结果),第三响应结果中可以包括申请详情信息,第三响应结果可以呈如下形式:In response to the received application details request, the access authorization service device may determine the application details information corresponding to the access request, and return the response result of the application details request to the target node (hereinafter referred to as the third response result), the third The response result may include application details, and the third response result may be in the following form:

{{

"data": { "data": {

"applyTime": "1597729776000", "applyTime": "1597729776000",

"contact": { "contact": {

"email": "linkemail", "email": "linkemail",

"name": "linkname", "name": "linkname",

"phone": "linkphone" "phone": "linkphone"

}, },

"device": [ "device": [

"string1", "string1",

"string2" "string2"

], ],

"issue": {"issue": {

"issuer": "abc", "issuer": "abc",

"licenseDir": "licensedir", "licenseDir": "licensedir",

"licenseId": [ "licenseId": [

{ {

"id": "1", "id": "1",

"validFrom": "2", "validFrom": "2",

"validTo": "3" "validTo": "3"

} }

], ],

"pkgDir": "pkgdir", "pkgDir": "pkgdir",

"remark": "test remark" "remark": "test remark"

}, },

"node": {"node": {

"bid": "bid", "bid": "bid",

"chainCode": "code", "chainCode": "code",

"chainName": "name", "chainName": "name",

"name": "nodename", "name": "nodename",

"org": "org","org": "org",

"status": "2" "status": "2"

}, },

"type": "2", "type": "2",

"link": "1", "link": "1",

"status": "1" "status": "1"

}, },

"errCode": 0, "errCode": 0,

"msg": "成功" "msg": "Success"

}}

上面的第三响应结果中包括多个参数,各个参数的说明可以参见下面的表3:The above third response result includes multiple parameters, and the description of each parameter can be found in Table 3 below:

Figure 728974DEST_PATH_IMAGE003
Figure 728974DEST_PATH_IMAGE003

表3table 3

需要说明的是,申请详情信息可以包括:许可颁发信息、审核状态、申请状态中的至少一者,以及节点基础信息、第一待接入链信息、节点申请类型,许可颁发信息可以包括表3中的颁发人、文件下载地址,颁发id信息、颁发备注等,审核状态可以对应表3中的节点审核状态,申请状态可以有待颁发、已颁发、初始化三种可能。It should be noted that the application details may include: at least one of license issuance information, review status, and application status, as well as node basic information, first to-be-connected chain information, and node application type. The license issuance information may include Table 3 The issuer, file download address, issuance id information, issuance remarks, etc., the audit status can correspond to the node audit status in Table 3, and the application status can have three possibilities: pending issuance, issued, and initialization.

这种实施方式中,接入授权服务设备可以具有license详情功能,基于license详情功能,可以响应于申请详情请求,实现对接入请求的当前处理状态、处理进度等的查询。In this embodiment, the access authorization service device may have a license detail function, and based on the license detail function, it may respond to the request for application details to query the current processing status and progress of the access request.

在再一种具体实施方式中,将申请标识发送至目标节点之后,该方法还包括:In yet another specific implementation manner, after sending the application identifier to the target node, the method further includes:

在对接入请求的审核通过的情况下,确定接入请求对应的颁发信息,颁发信息包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及申请标识;If the access request is approved, determine the issuance information corresponding to the access request. The issuance information includes: at least one of the issuance object information, installation package information, basic issuance information, and the application identifier;

将颁发信息发送至目标节点。Send the issuance information to the target node.

可选地,颁发信息可以呈如下形式:Optionally, the issuance information can be in the following form:

{{

"applyNo":"", "applyNo": "",

"issuer":"","issuer": "",

"licenseDir":"","licenseDir": "",

"licenseDirName":"","licenseDirName": "",

"licenseId":["licenseId":[

{"id":"","validFrom":"","validTo":""}{"id":"","validFrom":"","validTo":""}

],],

"pkgDir":"","pkgDir": "",

"remark":"" "remark": ""

}}

上面的颁发信息中包括多个参数,各个参数的说明可以参见下面的表4:The above issuance information includes multiple parameters, and the description of each parameter can be found in Table 4 below:

Figure 800836DEST_PATH_IMAGE004
Figure 800836DEST_PATH_IMAGE004

颁发信息可以包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及申请标识,签发对象信息可以包括表4中的签发人,安装包信息可以包括表4中的安装包目录,颁发基础信息可以包括表4中的license id、有效期(开始)、有效期(结束)等。The issuing information may include: at least one of issuing object information, installation package information, issuing basic information, and application identification, the issuing object information may include the issuer in Table 4, and the installation package information may include the installation package directory in Table 4 , the basic issuance information may include the license id in Table 4, validity period (start), validity period (end), etc.

这种实施方式中,接入授权服务设备可以具有license颁发功能,根据申请标识,接入授权服务设备可以在对接入请求的审核通过的情况下,基于license颁发功能,进行颁发信息的发送,从而能够便于了解接入授权服务设备对目标节点的许可情况。In this embodiment, the access authorization service device may have a license issuance function. According to the application identifier, the access authorization service device may send issuance information based on the license issuance function when the access request is approved. Therefore, it is easy to understand the permission situation of the access authorization service device to the target node.

可见,本申请实施例可以将申请标识有机地运用于接入授权服务设备的license更新链功能、license详情功能、license颁发功能的使用过程中。It can be seen that in the embodiment of the present application, the application identification can be organically used in the use process of the license update chain function, license detail function, and license issuance function of the access authorization service device.

在一个可选示例中,该方法还包括:In an optional example, the method also includes:

基于节点基础信息,确定目标节点的节点地址;Determine the node address of the target node based on the basic information of the node;

在对接入请求的审核通过的情况下,在第二区域记录节点地址与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the node address and the first link information to be accessed in the second area;

接收目标节点发送的第二接入链更新请求,第二接入链更新请求中携带第二待接入链信息和节点地址;receiving a second access link update request sent by the target node, where the second access link update request carries information on the second link to be accessed and a node address;

响应于第二接入链更新请求,确定第二区域中最新记录的待接入链信息,并将目标节点由加入第二区域中最新记录的待接入链信息切换为加入第二待接入链对应的第二区块链网络。In response to the second access link update request, determine the latest recorded information on the link to be accessed in the second area, and switch the target node from adding the latest recorded information on the link to be accessed in the second area to joining the second link to be accessed The second blockchain network corresponding to the chain.

这里,节点基础信息中可以包括目标节点的节点地址,这样,可以直接从节点基础信息中提取目标节点的节点地址。Here, the node basic information may include the node address of the target node, so that the node address of the target node may be directly extracted from the node basic information.

可选地,第二区域可以为位于接入授权服务设备本地的一存储区,第二区域可以属于掉电非遗失存储区,第二区域可以不同于第一区域。Optionally, the second area may be a local storage area located in the access authorization service device, the second area may belong to a power-off non-lost storage area, and the second area may be different from the first area.

在对接入请求的审核通过的情况下,可以在第二区域存储节点地址与第一待接入链信息之间的关联关系,以表征节点地址与第一待接入链信息之间的关联性。In the case that the access request is approved, the association relationship between the node address and the first link information to be connected may be stored in the second area to represent the association between the node address and the first link information to be connected sex.

可选地,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发起携带第二待接入链信息和节点地址的第二接入链更新请求。Optionally, the user may perform an operation on the target node, so that the target node initiates a second access link update request carrying the information of the second link to be accessed and the node address to the access authorization service device.

接入授权服务设备可以具有license更新链功能,基于license更新链功能,可以响应于第二接入链更新请求,确定第二区域中最新记录的待接入链信息,并将目标节点由加入第二区域中最新记录的待接入链信息切换为加入第二待接入链对应的第二区块链网络,这样,根据节点地址,可以快速实现目标节点接入的区块链网络的变更。The access authorization service device may have a license update chain function. Based on the license update chain function, it may respond to the second access link update request, determine the latest recorded information about the link to be accessed in the second area, and add the target node by adding the second access link update request. The latest recorded chain information to be connected in the second area is switched to join the second blockchain network corresponding to the second chain to be connected. In this way, according to the node address, the blockchain network connected to the target node can be quickly changed.

在一个可选示例中,接入授权服务设备可以接收目标节点发送的第三接入链更新请求,第三接入链更新请求可以呈如下形式:In an optional example, the access authorization service device may receive the third access link update request sent by the target node, and the third access link update request may be in the following form:

https://{url}/license/updateChainCodehttps://{url}/license/updateChainCode

{{

"applyNo":"","applyNo": "",

"nodeBid":"", "nodeBid": "",

"oldChainCode":"", "oldChainCode": "",

"chainCode":"", "chainCode": "",

"chainName":"","chainName": "",

"status":"" "status": ""

}}

上面的第三接入链更新请求中包括多个参数,各个参数的说明参见下面的表5:The above third access link update request includes multiple parameters, and the description of each parameter is shown in Table 5 below:

Figure 991777DEST_PATH_IMAGE005
Figure 991777DEST_PATH_IMAGE005

可选地,如果第三接入链更新请求中申请编号不为空,则可以优先根据申请编号(对应上文中的申请标识),变更目标节点接入的区块链网络,如果第三接入链更新请求中申请编号为空,则可以根据节点地址,变更目标节点接入的区块链网络。Optionally, if the application number in the third access chain update request is not empty, the blockchain network that the target node accesses can be changed based on the application number (corresponding to the above application identification), if the third access If the application number in the chain update request is empty, the blockchain network connected to the target node can be changed according to the node address.

在一个可选示例中,在目标节点加入第一区块链网络之后,目标节点可以上传license文件,上传license文件的请求可以为HTTP请求,上传license文件的请求的请求方式可以为POST,上传license文件的请求可以呈如下形式:In an optional example, after the target node joins the first blockchain network, the target node can upload the license file, the request for uploading the license file can be an HTTP request, the request method for uploading the license file can be POST, uploading the license file A file request can take the following form:

{{

"applyNo":"", "applyNo": "",

"nodeBid":"", "nodeBid": "",

"chainCode":"", "chainCode": "",

"chainName":"" "chainName": ""

}}

上传license文件的请求中的信息的说明可以参见下面的表6:The description of the information in the request to upload the license file can be found in Table 6 below:

Figure 858101DEST_PATH_IMAGE006
Figure 858101DEST_PATH_IMAGE006

在license文件成功上传之后,目标节点可以接收如下响应结果(后续将其称为第四响应结果):After the license file is successfully uploaded, the target node can receive the following response result (hereinafter referred to as the fourth response result):

{{

"errorCode": 0,"errorCode": 0,

"message": "操作成功","message": "Operation succeeded",

"data": {"data": {

"hash":"hash":

"QmYKPNL4NJgRTwSjzntt2RidaGaJkyRpUZgn8tZnGibez2""QmYKPNL4NJgRTwSjzntt2RidaGaJkyRpUZgn8tZnGibez2"

} }

}}

其中,第四响应结果可以为JSON格式,第四响应结果中的信息的说明可以参见下面的表7:Wherein, the fourth response result may be in JSON format, and the description of the information in the fourth response result may refer to Table 7 below:

Figure 649340DEST_PATH_IMAGE007
Figure 649340DEST_PATH_IMAGE007

在一个可选示例中,如图6所示,在步骤160之后,该方法还包括:In an optional example, as shown in FIG. 6, after step 160, the method further includes:

步骤182,在满足第一预设条件的情况下,按照节点申请类型,取消目标节点在第一区块链网络中的相应权限;Step 182, if the first preset condition is met, according to the node application type, cancel the corresponding authority of the target node in the first blockchain network;

步骤184,在满足第二预设条件的情况下,按照节点申请类型,恢复目标节点在第一区块链网络中的相应权限。Step 184, if the second preset condition is satisfied, according to the node application type, restore the corresponding authority of the target node in the first blockchain network.

可选地,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发送许可停用请求。Optionally, the user may operate on the target node, so that the target node sends a license deactivation request to the access authorization service device.

可选地,许可停用请求可以为HTTP请求,许可停用请求的请求方式可以为POST,许可停用请求可以呈如下形式:Optionally, the license deactivation request may be an HTTP request, the request method of the license deactivation request may be POST, and the license deactivation request may be in the following form:

https://{url}/license/banhttps://{url}/license/ban

{{

"applyNo":"","applyNo": "",

"nodeBid":"","nodeBid": "",

"ban":"""ban": ""

}}

上面的许可停用请求中包括多个参数,各个参数的说明可以参见下面的表8:The above license deactivation request includes multiple parameters, and the description of each parameter can be found in Table 8 below:

Figure 10045DEST_PATH_IMAGE008
Figure 10045DEST_PATH_IMAGE008

需要说明的是,许可停用请求中ban的取值具体可以为1。It should be noted that the value of ban in the permission deactivation request may specifically be 1.

在接收来自目标节点的许可停用请求的情况下,可以认为第一预设条件满足,此时,接入认证服务设备可以按照节点申请类型,取消目标节点在第一区块链网络中的节点权限,例如,在节点申请类型为任一种共识节点的情况下,可以取消目标节点在第一区块链网络中参与共识投票、交易执行、区块验证和交易的权限。另外,接入认证服务设备还可以向目标节点返回许可停用请求的响应结果(后续将其称为第五响应结果),第五响应结果可以为JSON格式,第五响应结果可以呈如下形式:In the case of receiving the license deactivation request from the target node, it can be considered that the first preset condition is satisfied, and at this time, the access authentication service device can cancel the node of the target node in the first blockchain network according to the node application type Permissions, for example, if the node application type is any consensus node, the permission of the target node to participate in consensus voting, transaction execution, block verification and transactions in the first blockchain network can be cancelled. In addition, the access authentication service device may also return the response result of the license deactivation request (hereinafter referred to as the fifth response result) to the target node, the fifth response result may be in JSON format, and the fifth response result may be in the following form:

{{

"errorCode": 0,"errorCode": 0,

"message": "操作成功","message": "Operation succeeded",

"data": {"data": {

"applyNoList": ["e73c50ae16fcd27a6debbedcd23ccfd1"]"applyNoList": ["e73c50ae16fcd27a6debbedcd23ccfd1"]

}}

}}

其中,第五响应结果中的applyNoList的说明可以参见下面的表9:Wherein, the description of applyNoList in the fifth response result can be referred to the following Table 9:

Figure 304760DEST_PATH_IMAGE009
Figure 304760DEST_PATH_IMAGE009

之后,可以由用户在目标节点上进行操作,以使目标节点向接入授权服务设备发送许可恢复请求。Afterwards, the user may operate on the target node, so that the target node sends a license recovery request to the access authorization service device.

可选地,许可恢复请求可以为GTTP请求,许可恢复请求的请求方式可以为POST,许可恢复请求的形式可以与许可停用请求类似,区别仅在于,许可恢复请求中ban的值可以为2。Optionally, the license recovery request may be a GTTP request, the request mode of the license recovery request may be POST, and the format of the license recovery request may be similar to that of the license deactivation request, the only difference being that the value of ban in the license recovery request may be 2.

在接收来自目标节点的许可恢复请求的情况下,可以认为第二预设条件满足,此时,接入认证服务设备可以按照节点申请类型,恢复目标节点在第一区块链网络中的节点权限,例如,在节点申请类型为任一种共识节点的情况下,可以恢复目标节点在第一区块链网络中参与共识投票、交易执行、区块验证和交易的权限。另外,接入认证服务设备还可以向目标节点返回许可恢复请求的响应结果(后续将其称为第六响应结果),第六响应结果可以为JSON格式,第六响应结果的形式可以参照第五响应结果。In the case of receiving the permission restoration request from the target node, it can be considered that the second preset condition is satisfied, at this time, the access authentication service device can restore the node authority of the target node in the first blockchain network according to the node application type , for example, if the node application type is any consensus node, the authority of the target node to participate in consensus voting, transaction execution, block verification and transaction in the first blockchain network can be recovered. In addition, the access authentication service device can also return the response result of the permission restoration request to the target node (hereinafter referred to as the sixth response result), the sixth response result can be in JSON format, and the format of the sixth response result can refer to the fifth Response results.

可见,本申请实施例中,接入授权服务设备可以提供license启停功能,基于license启停功能,可以根据实际需求,取消或者恢复目标节点在第一区块链网络中的相应权限。It can be seen that in the embodiment of this application, the access authorization service device can provide the license start-stop function. Based on the license start-stop function, the corresponding authority of the target node in the first blockchain network can be canceled or restored according to actual needs.

在一个可选示例中,接入授权服务设备可以接收来自目标节点的license申请列表请求,license申请列表请求可以为HTTP请求,license申请列表请求的请求方式可以为POST,license申请列表请求可以呈如下形式:In an optional example, the access authorization service device may receive a license application list request from the target node, the license application list request may be an HTTP request, the request method of the license application list request may be POST, and the license application list request may be as follows form:

https://{url}/license/listhttps://{url}/license/list

{{

"applyNo":"","applyNo": "",

"chainCode":"","chainCode": "",

"type":[""],"type":[""],

"status":"","status": "",

"nodeName":"","nodeName": "",

"nodeBid":"","nodeBid": "",

"applicantBid":"", "applicantBid": "",

"pageStart":"","pageStart": "",

"pageSize":"""pageSize": ""

}}

上面的license申请列表请求中包括多个参数,各个参数的说明可以参见下面的表10:The above license application list request includes multiple parameters, and the description of each parameter can be found in Table 10 below:

Figure 873145DEST_PATH_IMAGE010
Figure 873145DEST_PATH_IMAGE010

接入授权服务设备可以向目标节点返回license申请列表请求的响应结果(后续将其称为第七响应结果),第七响应结果可以为JSON格式,第七响应结果可以为如下形式:The access authorization service device can return the response result of the license application list request (hereinafter referred to as the seventh response result) to the target node. The seventh response result can be in JSON format, and the seventh response result can be in the following form:

{{

"data": {"data": {

"licenseList": ["licenseList": [

{{

"applyNo": "","applyNo": "",

"nodeName": "","nodeName": "",

"nodeBid": "","nodeBid": "",

"chainName": "","chainName": "",

"applyTime": "","applyTime": "",

"org": "","org": "",

"type": "","type": "",

"status": "","status": "",

"signReady": """signReady": ""

}}

],],

"page": {"page": {

"pageStart": 1,"pageStart": 1,

"pageSize": 10,"pageSize": 10,

"pageTotal": 10"pageTotal": 10

}}

},},

"errCode": 0,"errCode": 0,

"msg": "成功" "msg": "Success"

}}

第七响应结果中的信息的说明可以参见下面的表11:A description of the information in the seventh response result can be found in Table 11 below:

Figure 403877DEST_PATH_IMAGE011
Figure 403877DEST_PATH_IMAGE011

在一个可选示例中,接入授权服务设备可以接收来自目标节点的license更新请求,license更新请求可以为HTTP请求,license更新请求的请求方式可以为POST,license更新请求可以呈如下形式:In an optional example, the access authorization service device may receive a license update request from the target node, the license update request may be an HTTP request, the request method of the license update request may be POST, and the license update request may be in the following form:

https://{url}/license/updatehttps://{url}/license/update

{{

"applyNo":"","applyNo": "",

"link":"","link": "",

"linkName":"","linkName": "",

"linkPhone":"","linkPhone": "",

"linkEmail":"","linkEmail": "",

"equipmentInfo":["",""],"equipmentInfo":["",""],

"remark":"""remark": ""

}}

上面的license更新请求中包括多个参数,各个参数的说明可以参见下面的表12:The above license update request includes multiple parameters, and the description of each parameter can be found in Table 12 below:

Figure 83120DEST_PATH_IMAGE012
Figure 83120DEST_PATH_IMAGE012

在一个可选示例中,接入授权服务设备的架构图可以参照图2。如图2所示,接入授权服务设备可以包括License申请模块、更新模块、License颁发模块、License维护模块;其中,In an optional example, refer to FIG. 2 for the architecture diagram of the access authorization service device. As shown in Figure 2, the access authorization service device may include a License application module, an update module, a License issuance module, and a License maintenance module; wherein,

License申请模块用于处理用户的申请(相当于上文中的接入请求),License更新模块用于更新用户审核通过的license内容的逻辑(相当于上文中对license更新请求的响应);The license application module is used to process the user's application (equivalent to the access request above), and the license update module is used to update the logic of the license content approved by the user (equivalent to the response to the license update request above);

License颁发模块用于在对License申请(相当于上文中的接入请求)进行全方面、突出重点的审核之后,对请求者颁发License,同时保存了不同子链信息,以及不同的License类型的信息;The license issuance module is used to issue a license to the requester after a comprehensive and focused review of the license application (equivalent to the access request above), and at the same time save the information of different sub-chains and different types of licenses ;

License维护模块用于负责License的启动和停用(对应于上文中的license启停功能),以及对上传的License文件进行维护。The license maintenance module is responsible for starting and stopping the license (corresponding to the function of starting and stopping the license above), and maintaining the uploaded license file.

基于同一发明构思,本申请实施例提供了一种计算机存储介质,该计算机存储介质上存储有计算机程序,该计算机程序被处理器执行时实现如下步骤:Based on the same inventive concept, an embodiment of the present application provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

接收目标节点发送的接入请求;Receive the access request sent by the target node;

从接入请求中,获取目标节点的节点基础信息、第一待接入链信息和节点申请类型;From the access request, obtain the node basic information of the target node, the first link information to be connected, and the node application type;

将第一待接入链信息与节点申请类型进行拼接,得到拼接结果;Splicing the information of the first link to be connected with the node application type to obtain the splicing result;

确定拼接结果对应的节点约束信息;Determine the node constraint information corresponding to the splicing result;

确定节点基础信息与节点约束信息的匹配度;Determine the matching degree of node basic information and node constraint information;

在基于匹配度,确定对接入请求的审核通过的情况下,将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配。Based on the degree of matching, if it is determined that the access request is approved, the target node is added to the first blockchain network corresponding to the first chain information to be connected, and the target node in the first blockchain network The role matches the node application type.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在接收目标节点发送的接入请求之后,为接入请求分配申请标识;After receiving the access request sent by the target node, assigning an application identifier to the access request;

将申请标识发送至目标节点。Send the application ID to the target node.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在对接入请求的审核通过的情况下,在第一区域记录申请标识与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the application identifier and the first link information to be accessed in the first area;

接收目标节点发送的第一接入链更新请求,第一接入链更新请求中携带第二待接入链信息和申请标识;receiving the first access link update request sent by the target node, where the first access link update request carries the information of the second to-be-access link and the application identifier;

响应于第一接入链更新请求,将第一区域中申请标识关联的接入链信息由第一待接入链信息更新为第二待接入链信息,并将目标节点由加入第一区块链网络切换为加入第二待接入链对应的第二区块链网络。In response to the first access link update request, update the access link information associated with the application identifier in the first area from the first to-be-access link information to the second to-be-access link information, and add the target node from the first area The block chain network is switched to join the second block chain network corresponding to the second chain to be connected.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在将申请标识发送至目标节点之后,接收目标节点发送的携带申请标识的申请详情请求;After sending the application identification to the target node, receive the application details request carrying the application identification sent by the target node;

响应于申请详情请求,确定接入请求对应的申请详情信息,申请详情信息包括:许可颁发信息、审核状态、申请状态中的至少一者,以及节点基础信息、第一待接入链信息、节点申请类型;In response to the application details request, determine the application details information corresponding to the access request. The application details information includes: at least one of license issuance information, review status, and application status, as well as node basic information, first to-be-accessed chain information, node application type;

将申请详情信息发送至目标节点。Send the application details to the target node.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在将申请标识发送至目标节点之后,在对接入请求的审核通过的情况下,确定接入请求对应的颁发信息,颁发信息包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及申请标识;After the application identifier is sent to the target node, if the access request is approved, the issuance information corresponding to the access request is determined, and the issuance information includes: at least one of the issuance object information, the installation package information, and the basic issuance information item, and the application identification;

将颁发信息发送至目标节点。Send the issuance information to the target node.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

基于节点基础信息,确定目标节点的节点地址;Determine the node address of the target node based on the basic information of the node;

在对接入请求的审核通过的情况下,在第二区域记录节点地址与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the node address and the first link information to be accessed in the second area;

接收目标节点发送的第二接入链更新请求,第二接入链更新请求中携带第二待接入链信息和节点地址;receiving a second access link update request sent by the target node, where the second access link update request carries information on the second link to be accessed and a node address;

响应于第二接入链更新请求,确定第二区域中最新记录的待接入链信息,并将目标节点由加入第二区域中最新记录的待接入链信息对应的区块链网络切换为加入第二待接入链信息对应的第二区块链网络。In response to the second access chain update request, determine the latest recorded information on the chain to be accessed in the second area, and switch the target node from the blockchain network corresponding to the latest recorded information on the chain to be accessed in the second area to Join the second blockchain network corresponding to the second chain information to be connected.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配之后,在满足第一预设条件的情况下,按照节点申请类型,取消目标节点在第一区块链网络中的相应权限;After the target node is added to the first blockchain network corresponding to the first chain information to be connected, and the role of the target node in the first blockchain network matches the node application type, the first preset condition is met In the case of , cancel the corresponding authority of the target node in the first blockchain network according to the type of node application;

在满足第二预设条件的情况下,按照节点申请类型,恢复目标节点在第一区块链网络中的相应权限。When the second preset condition is met, according to the type of node application, the corresponding authority of the target node in the first blockchain network is restored.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在接收目标节点发送的接入请求之前,接收目标节点发送的链信息获取请求;Before receiving the access request sent by the target node, receiving the chain information acquisition request sent by the target node;

响应于链信息获取请求,确定多个链信息,每个链信息中均包括链名称和链编号中的至少一者;In response to the chain information acquisition request, determine a plurality of chain information, each of which includes at least one of a chain name and a chain number;

将多个链信息发送至目标节点;Send multiple chain information to the target node;

其中,第一待接入链信息选自多个链信息。Wherein, the first to-be-accessed chain information is selected from a plurality of chain information.

在一个可选示例中,该计算机程序被处理器执行时还实现如下步骤:In an optional example, when the computer program is executed by the processor, the following steps are also implemented:

在接收目标节点发送的接入请求之前,接收目标节点发送的申请类型获取请求;Before receiving the access request sent by the target node, receiving the application type acquisition request sent by the target node;

响应于申请类型获取请求,确定多个申请类型;determining a plurality of application types in response to the application type acquisition request;

将多个申请类型发送至目标节点;Send multiple application types to the target node;

其中,节点申请类型选自多个申请类型。Wherein, the node application type is selected from multiple application types.

基于同一发明构思,本实施例提供了一种电子设备,参见图7,包括存储器701、处理器702、总线703以及存储在存储器701上并可在处理器702上运行的计算机程序,处理器702执行该计算机程序时实现如下步骤:Based on the same inventive concept, this embodiment provides an electronic device, referring to FIG. 7 , including a memory 701, a processor 702, a bus 703, and a computer program stored in the memory 701 and operable on the processor 702. The processor 702 When executing the computer program, the following steps are realized:

接收目标节点发送的接入请求;Receive the access request sent by the target node;

从接入请求中,获取目标节点的节点基础信息、第一待接入链信息和节点申请类型;From the access request, obtain the node basic information of the target node, the first link information to be connected, and the node application type;

将第一待接入链信息与节点申请类型进行拼接,得到拼接结果;Splicing the information of the first link to be connected with the node application type to obtain the splicing result;

确定拼接结果对应的节点约束信息;Determine the node constraint information corresponding to the splicing result;

确定节点基础信息与节点约束信息的匹配度;Determine the matching degree of node basic information and node constraint information;

在基于匹配度,确定对接入请求的审核通过的情况下,将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配。Based on the degree of matching, if it is determined that the access request is approved, the target node is added to the first blockchain network corresponding to the first chain information to be connected, and the target node is in the first blockchain network The role matches the node application type.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在接收目标节点发送的接入请求之后,为接入请求分配申请标识;After receiving the access request sent by the target node, assigning an application identifier to the access request;

将申请标识发送至目标节点。Send the application ID to the target node.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在对接入请求的审核通过的情况下,在第一区域记录申请标识与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the application identifier and the first link information to be accessed in the first area;

接收目标节点发送的第一接入链更新请求,第一接入链更新请求中携带第二待接入链信息和申请标识;receiving the first access link update request sent by the target node, where the first access link update request carries the information of the second to-be-access link and the application identifier;

响应于第一接入链更新请求,将第一区域中申请标识关联的接入链信息由第一待接入链信息更新为第二待接入链信息,并将目标节点由加入第一区块链网络切换为加入第二待接入链对应的第二区块链网络。In response to the first access link update request, update the access link information associated with the application identifier in the first area from the first to-be-access link information to the second to-be-access link information, and add the target node from the first area The block chain network is switched to join the second block chain network corresponding to the second chain to be connected.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在将申请标识发送至目标节点之后,接收目标节点发送的携带申请标识的申请详情请求;After sending the application identification to the target node, receive the application details request carrying the application identification sent by the target node;

响应于申请详情请求,确定接入请求对应的申请详情信息,申请详情信息包括:许可颁发信息、审核状态、申请状态中的至少一者,以及节点基础信息、第一待接入链信息、节点申请类型;In response to the application details request, determine the application details information corresponding to the access request. The application details information includes: at least one of license issuance information, review status, and application status, as well as node basic information, first to-be-accessed chain information, node application type;

将申请详情信息发送至目标节点。Send the application details to the target node.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在将申请标识发送至目标节点之后,在对接入请求的审核通过的情况下,确定接入请求对应的颁发信息,颁发信息包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及申请标识;After the application identifier is sent to the target node, if the access request is approved, the issuance information corresponding to the access request is determined, and the issuance information includes: at least one of the issuance object information, the installation package information, and the basic issuance information item, and the application identification;

将颁发信息发送至目标节点。Send the issuance information to the target node.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

基于节点基础信息,确定目标节点的节点地址;Determine the node address of the target node based on the basic information of the node;

在对接入请求的审核通过的情况下,在第二区域记录节点地址与第一待接入链信息之间的关联关系;If the access request is approved, record the association relationship between the node address and the first link information to be accessed in the second area;

接收目标节点发送的第二接入链更新请求,第二接入链更新请求中携带第二待接入链信息和节点地址;receiving a second access link update request sent by the target node, where the second access link update request carries information on the second link to be accessed and a node address;

响应于第二接入链更新请求,确定第二区域中最新记录的待接入链信息,并将目标节点由加入第二区域中最新记录的待接入链信息对应的区块链网络切换为加入第二待接入链信息对应的第二区块链网络。In response to the second access chain update request, determine the latest recorded information on the chain to be accessed in the second area, and switch the target node from the blockchain network corresponding to the latest recorded information on the chain to be accessed in the second area to Join the second blockchain network corresponding to the second chain information to be connected.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在将目标节点加入第一待接入链信息对应的第一区块链网络,且令目标节点在第一区块链网络中的角色与节点申请类型相匹配之后,在满足第一预设条件的情况下,按照节点申请类型,取消目标节点在第一区块链网络中的相应权限;After the target node is added to the first blockchain network corresponding to the first chain information to be connected, and the role of the target node in the first blockchain network matches the node application type, the first preset condition is met In the case of , cancel the corresponding authority of the target node in the first blockchain network according to the type of node application;

在满足第二预设条件的情况下,按照节点申请类型,恢复目标节点在第一区块链网络中的相应权限。When the second preset condition is met, according to the type of node application, the corresponding authority of the target node in the first blockchain network is restored.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在接收目标节点发送的接入请求之前,接收目标节点发送的链信息获取请求;Before receiving the access request sent by the target node, receiving the chain information acquisition request sent by the target node;

响应于链信息获取请求,确定多个链信息,每个链信息中均包括链名称和链编号中的至少一者;In response to the chain information acquisition request, determine a plurality of chain information, each of which includes at least one of a chain name and a chain number;

将多个链信息发送至目标节点;Send multiple chain information to the target node;

其中,第一待接入链信息选自多个链信息。Wherein, the first to-be-accessed chain information is selected from a plurality of chain information.

在一个可选示例中,处理器702执行该计算机程序时还实现如下步骤:In an optional example, when the processor 702 executes the computer program, the following steps are also implemented:

在接收目标节点发送的接入请求之前,接收目标节点发送的申请类型获取请求;Before receiving the access request sent by the target node, receiving the application type acquisition request sent by the target node;

响应于申请类型获取请求,确定多个申请类型;determining a plurality of application types in response to the application type acquisition request;

将多个申请类型发送至目标节点;Send multiple application types to the target node;

其中,节点申请类型选自多个申请类型。Wherein, the node application type is selected from multiple application types.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and combinations of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a Means for realizing the functions specified in one or more steps of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart flow or flows and/or block diagram block or blocks.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (10)

1.一种用于加入区块链网络的方法,其特征在于,应用于接入授权服务设备,所述方法包括:1. A method for joining a blockchain network, characterized in that it is applied to an access authorization service device, the method comprising: 接收目标节点发送的接入请求;Receive the access request sent by the target node; 从所述接入请求中,获取所述目标节点的节点基础信息、第一待接入链信息和节点申请类型;其中,所述节点申请类型为以下七项中的一项:服务节点类型、主链超级节点类型、骨干节点类型、出块超级节点类型、监管节点类型、子链共识节点类型、子链出块共识节点类型;From the access request, obtain the node basic information of the target node, the first to-be-connected link information, and the node application type; wherein, the node application type is one of the following seven items: service node type, Main chain super node type, backbone node type, block producing super node type, supervision node type, sub-chain consensus node type, sub-chain block consensus node type; 将所述第一待接入链信息与所述节点申请类型进行拼接,得到拼接结果;其中,所述拼接结果通过利用预设字符将所述第一待接入链信息和所述节点申请类型进行连接得到;splicing the first to-be-connected link information and the node application type to obtain a splicing result; wherein, the splicing result combines the first to-be-connected link information and the node application type by using preset characters connect to get; 确定所述拼接结果对应的节点约束信息;determining node constraint information corresponding to the splicing result; 确定所述节点基础信息与所述节点约束信息的匹配度;determining the degree of matching between the node basic information and the node constraint information; 在基于所述匹配度,确定对所述接入请求的审核通过的情况下,将所述目标节点加入所述第一待接入链信息对应的第一区块链网络,且令所述目标节点在所述第一区块链网络中的角色与所述节点申请类型相匹配。When it is determined that the access request is approved based on the matching degree, add the target node to the first block chain network corresponding to the first link information to be connected, and make the target node The role of the node in the first blockchain network matches the node application type. 2.根据权利要求1所述的方法,其特征在于,所述接收目标节点发送的接入请求之后,所述方法还包括:2. The method according to claim 1, wherein after receiving the access request sent by the target node, the method further comprises: 为所述接入请求分配申请标识;assigning an application identifier to the access request; 将所述申请标识发送至所述目标节点。Send the application identifier to the target node. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, wherein the method further comprises: 在对所述接入请求的审核通过的情况下,在第一区域记录所述申请标识与所述第一待接入链信息之间的关联关系;If the review of the access request is passed, record the association relationship between the application identifier and the first link information to be accessed in the first area; 接收所述目标节点发送的第一接入链更新请求,所述第一接入链更新请求中携带第二待接入链信息和所述申请标识;receiving a first access link update request sent by the target node, where the first access link update request carries information about a second to-be-access link and the application identifier; 响应于所述第一接入链更新请求,将所述第一区域中所述申请标识关联的接入链信息由所述第一待接入链信息更新为所述第二待接入链信息,并将所述目标节点由加入所述第一区块链网络切换为加入所述第二待接入链对应的第二区块链网络。In response to the first access link update request, updating the access link information associated with the application identifier in the first area from the first to-be-access link information to the second to-be-access link information , and switch the target node from joining the first blockchain network to joining the second blockchain network corresponding to the second chain to be connected. 4.根据权利要求2所述的方法,其特征在于,所述将所述申请标识发送至所述目标节点之后,所述方法还包括:4. The method according to claim 2, wherein after the application identifier is sent to the target node, the method further comprises: 接收所述目标节点发送的携带所述申请标识的申请详情请求;receiving an application details request carrying the application identifier sent by the target node; 响应于所述申请详情请求,确定所述接入请求对应的申请详情信息,所述申请详情信息包括:许可颁发信息、审核状态、申请状态中的至少一者,以及所述节点基础信息、所述第一待接入链信息、所述节点申请类型;In response to the application details request, determine application details information corresponding to the access request, where the application details information includes: at least one of license issuance information, review status, and application status, as well as the node basic information, all The first to-be-connected chain information, the node application type; 将所述申请详情信息发送至所述目标节点。Send the application detail information to the target node. 5.根据权利要求2所述的方法,其特征在于,所述将所述申请标识发送至所述目标节点之后,所述方法还包括:5. The method according to claim 2, characterized in that, after the application identifier is sent to the target node, the method further comprises: 在对所述接入请求的审核通过的情况下,确定所述接入请求对应的颁发信息,所述颁发信息包括:签发对象信息、安装包信息、颁发基础信息中的至少一项,以及所述申请标识;When the review of the access request is passed, determine the issuance information corresponding to the access request, where the issuance information includes: at least one of the issuance object information, installation package information, and basic issuance information, and the the above application identification; 将所述颁发信息发送至所述目标节点。Send the issuance information to the target node. 6.根据权利要求1所述的方法,其特征在于,所述方法还包括:6. The method according to claim 1, further comprising: 基于所述节点基础信息,确定所述目标节点的节点地址;determining the node address of the target node based on the node basic information; 在对所述接入请求的审核通过的情况下,在第二区域记录所述节点地址与所述第一待接入链信息之间的关联关系;If the review of the access request is passed, record the association relationship between the node address and the first to-be-accessed link information in the second area; 接收所述目标节点发送的第二接入链更新请求,所述第二接入链更新请求中携带第二待接入链信息和所述节点地址;receiving a second access link update request sent by the target node, where the second access link update request carries information on a second to-be-access link and the node address; 响应于所述第二接入链更新请求,确定所述第二区域中最新记录的待接入链信息,并将所述目标节点由加入所述第二区域中最新记录的待接入链信息对应的区块链网络切换为加入所述第二待接入链信息对应的第二区块链网络。In response to the second access link update request, determine the latest recorded information about the link to be accessed in the second area, and add the target node to the latest recorded information about the link to be accessed in the second area The corresponding blockchain network is switched to join the second blockchain network corresponding to the second to-be-connected chain information. 7.根据权利要求1所述的方法,其特征在于,所述将所述目标节点加入所述第一待接入链信息对应的第一区块链网络,且令所述目标节点在所述第一区块链网络中的角色与所述节点申请类型相匹配之后,所述方法还包括:7. The method according to claim 1, wherein the target node is added to the first block chain network corresponding to the first to-be-connected chain information, and the target node is in the After the role in the first blockchain network matches the node application type, the method further includes: 在满足第一预设条件的情况下,按照所述节点申请类型,取消所述目标节点在所述第一区块链网络中的相应权限;When the first preset condition is met, according to the node application type, cancel the corresponding authority of the target node in the first blockchain network; 在满足第二预设条件的情况下,按照所述节点申请类型,恢复所述目标节点在所述第一区块链网络中的相应权限。If the second preset condition is met, according to the node application type, the corresponding authority of the target node in the first blockchain network is restored. 8.根据权利要求1所述的方法,其特征在于,8. The method of claim 1, wherein, 所述接收目标节点发送的接入请求之前,所述方法还包括:Before receiving the access request sent by the target node, the method further includes: 接收所述目标节点发送的链信息获取请求;receiving the chain information acquisition request sent by the target node; 响应于所述链信息获取请求,确定多个链信息,每个链信息中均包括链名称和链编号中的至少一者;In response to the chain information acquisition request, determine a plurality of chain information, each of which includes at least one of a chain name and a chain number; 将所述多个链信息发送至所述目标节点;sending the plurality of chain information to the target node; 其中,所述第一待接入链信息选自所述多个链信息;Wherein, the first to-be-accessed chain information is selected from the plurality of chain information; 和/或,and / or, 所述接收目标节点发送的接入请求之前,所述方法还包括:Before receiving the access request sent by the target node, the method further includes: 接收所述目标节点发送的申请类型获取请求;receiving the application type acquisition request sent by the target node; 响应于所述申请类型获取请求,确定多个申请类型;determining a plurality of application types in response to the application type acquisition request; 将所述多个申请类型发送至所述目标节点;sending the plurality of application types to the target node; 其中,所述节点申请类型选自所述多个申请类型。Wherein, the node application type is selected from the multiple application types. 9.一种计算机存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述方法的步骤。9. A computer storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are realized. 10.一种电子设备,其特征在于,包括存储器、以及一个或多个处理器,所述存储器用于存储一个或多个程序;所述一个或多个程序被所述一个或多个处理器执行时,实现如权利要求1至8中任一项所述的方法。10. An electronic device, characterized in that it includes a memory and one or more processors, the memory is used to store one or more programs; the one or more programs are stored by the one or more processors When executed, the method according to any one of claims 1 to 8 is realized.
CN202211289952.0A 2022-10-21 2022-10-21 Method for joining a blockchain network, computer storage medium and electronic device Active CN115361390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211289952.0A CN115361390B (en) 2022-10-21 2022-10-21 Method for joining a blockchain network, computer storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211289952.0A CN115361390B (en) 2022-10-21 2022-10-21 Method for joining a blockchain network, computer storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115361390A CN115361390A (en) 2022-11-18
CN115361390B true CN115361390B (en) 2023-01-20

Family

ID=84007873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211289952.0A Active CN115361390B (en) 2022-10-21 2022-10-21 Method for joining a blockchain network, computer storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115361390B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119585A1 (en) * 2016-12-26 2018-07-05 深圳前海达闼云端智能科技有限公司 Permission control method, apparatus and system for block chain, and node device
CN108702622A (en) * 2017-11-30 2018-10-23 深圳前海达闼云端智能科技有限公司 Mobile network's access authentication method, device, storage medium and block chain node
CN109150607A (en) * 2018-08-22 2019-01-04 中链科技有限公司 Classification management-control method and device for block chain network
US11301845B2 (en) * 2019-08-19 2022-04-12 Anchor Labs, Inc. Cryptoasset custodial system with proof-of-stake blockchain support
CN111131286B (en) * 2019-12-30 2022-06-17 百度在线网络技术(北京)有限公司 Access control method, device, equipment and medium for block link points
CN112632575A (en) * 2020-12-22 2021-04-09 平安普惠企业管理有限公司 Authority management method and device of business system, computer equipment and storage medium
CN113949632B (en) * 2021-12-21 2022-06-28 北京溪塔科技有限公司 Dynamic node configuration method and device for block chain

Also Published As

Publication number Publication date
CN115361390A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
US11341490B2 (en) Carbon footprint blockchain network
CN109544160B (en) Transaction authenticity verification method and system based on block chain and intelligent contract
CN110620810B (en) Non-linked ownership of continuous asset transfer over blockchain
US11030681B2 (en) Intermediate blockchain system for managing transactions
EP3438903B1 (en) Hierarchical network system, and node and program used in same
US10523526B2 (en) System and method for managing services and licenses using a blockchain network
WO2023056249A1 (en) Custodial systems for non-fungible tokens
CN115769241A (en) Privacy preserving architecture for licensed blockchains
CN112052474B (en) Method and system relating to blue-ray copy services
US20240104642A1 (en) Apparatus for processing non-fungible token
CN111488626B (en) Blockchain-based data processing method, device, equipment and medium
US20250193032A1 (en) Composite Cryptographic Systems with Variable Configuration Parameters and Memory Bound Functions
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN112291321A (en) Service processing method, device and system
US12052369B2 (en) Method for securing private structured databases within a public blockchain
CN114066451B (en) Method and system for managing funds transaction and electronic equipment
CN115361390B (en) Method for joining a blockchain network, computer storage medium and electronic device
US11887146B2 (en) Product exploration-based promotion
US20230224166A1 (en) Systems and Methods for Associating Digital Media Files with External Commodities
CN112163917A (en) Bill processing method, device, medium and electronic equipment based on block chain
US20220084026A1 (en) Secure transactions
WO2022241945A1 (en) Data processing method and device, and computer-readable storage medium
CN113011941B (en) Virtual resource processing method, device, equipment and computer readable storage medium
CN115220775A (en) Resource issuing method, device, resource issuing equipment and storage medium
CN113592645A (en) Data verification method and device

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