CN117097610A - Block chain network access method, related device, storage medium and program product - Google Patents
Block chain network access method, related device, storage medium and program product Download PDFInfo
- Publication number
- CN117097610A CN117097610A CN202210525970.8A CN202210525970A CN117097610A CN 117097610 A CN117097610 A CN 117097610A CN 202210525970 A CN202210525970 A CN 202210525970A CN 117097610 A CN117097610 A CN 117097610A
- Authority
- CN
- China
- Prior art keywords
- target
- network
- blockchain network
- blockchain
- configuration
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000004891 communication Methods 0.000 claims description 50
- 238000007726 management method Methods 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 29
- 238000012550 audit Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 description 16
- 230000008569 process Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000009434 installation Methods 0.000 description 4
- 238000003032 molecular docking Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000012384 transportation and delivery Methods 0.000 description 2
- 208000001613 Gambling Diseases 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2854—Wide area networks, e.g. public data networks
- H04L12/2856—Access arrangements, e.g. Internet access
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0846—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3239—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3297—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a blockchain network access method, related equipment, a storage medium and a program product, wherein the method comprises the following steps: acquiring an access request for adding target equipment into a target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured; according to the configuration template, acquiring configuration parameters required by the information to be configured from the target equipment, and generating a configuration file according to the configuration parameters and the configuration template; transmitting the configuration file and the node program to the target device so that the target device starts the node program according to the configuration file; when the node program is started successfully according to the configuration file, the deployment of the target blockchain is completed in the target equipment, and the target equipment completing the deployment of the target blockchain is determined to be added into the target blockchain network. By adopting the embodiment of the application, the efficiency of adding the target equipment into the target block chain network can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a blockchain network access method, a related device, a storage medium, and a program product.
Background
Blockchain technology in the field of computer technology can be suitable for a plurality of application scenes, and blockchains with different functions can be developed under different application scenes to provide corresponding blockchain services (such as asset management services, information exchange services and the like). In the process of developing the target service by the service provider, the service equipment for providing the target service can be accessed to the developed blockchain network to enjoy the blockchain service provided by the blockchain, so that the speed of service development can be greatly improved. However, with the current technical support, the access efficiency of the service provider when the service provider accesses the service device to the blockchain network is low, which seriously affects the service development efficiency of the service provider. Therefore, how to improve the efficiency of the service device in accessing the blockchain network is a current research hotspot.
Disclosure of Invention
The embodiment of the application provides a blockchain network access method, related equipment, a storage medium and a program product, which can improve the efficiency of accessing target equipment into a blockchain network.
In one aspect, an embodiment of the present application provides a blockchain network access method, including:
acquiring an access request for adding target equipment into a target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured;
According to the configuration template, acquiring configuration parameters required by the information to be configured from the target equipment, and generating a configuration file according to the configuration parameters and the configuration template;
transmitting the configuration file and the node program to the target equipment so that the target equipment starts the node program according to the configuration file; and when the node program is started successfully according to the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
In still another aspect, an embodiment of the present application provides a blockchain network access device, including:
the acquisition unit is used for acquiring an access request for adding the target equipment into the target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured;
the generating unit is used for acquiring configuration parameters required by the information to be configured from the target equipment according to the configuration template, and generating a configuration file according to the configuration parameters and the configuration template;
A deployment unit, configured to send the configuration file and the node program to the target device, so that the target device starts the node program based on the configuration file; and when the node program is started successfully based on the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
In still another aspect, an embodiment of the present application further provides a computer apparatus, including:
a processor for implementing one or more computer programs;
a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the blockchain network access method of the first aspect.
In yet another aspect, embodiments of the present application further provide a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the blockchain network access method of the first aspect.
In yet another aspect, embodiments of the present application provide a computer product comprising a computer program adapted to be loaded by a processor and to perform the blockchain network access method of the first aspect.
In the embodiment of the application, the computer equipment can acquire the configuration template and the node program according to the access request, then the computer equipment can acquire the configuration parameters matched with the information to be configured contained in the configuration template from the target equipment, and generate the configuration file according to the configuration parameters and the configuration template, and further, the computer equipment can send the configuration file and the node program to the target equipment so that the target equipment can start the node program based on the configuration file, thereby realizing the addition of the target equipment to the target blockchain network. Therefore, in the embodiment of the application, the data required for joining the target blockchain network is mainly acquired for the target device through the computer device, so that the target device can join the target blockchain network only by executing a small amount of work (such as providing configuration parameters required by the information to be configured), and the deployment flow and the specific deployment mode of the blockchain network are not required to be focused for the target device, thereby greatly reducing the workload of the target device and improving the efficiency of joining the target device into the target blockchain network.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a block chain architecture diagram according to an embodiment of the present application;
FIG. 1b is a schematic diagram of a data sharing system according to an embodiment of the present application;
fig. 1c is a schematic diagram of a blockchain network access system provided by an embodiment of the present application;
FIG. 1d is a schematic diagram of yet another blockchain network access system provided by an embodiment of the present application;
fig. 2 is a schematic flow chart of a blockchain network access method provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart of yet another blockchain network access method provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a blockchain network access device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the solutions provided by the embodiments of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. It should be noted that each of the specific embodiments described in the embodiments of the present application is only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the application, are within the scope of the application based on the various embodiments of the application.
When the service provider has the requirement of the blockchain service, the embodiment of the application can rapidly deploy the blockchain nodes to the service equipment under the service provider, so that the service equipment can become one blockchain node in the blockchain network, and the service equipment can call the blockchain service provided by the corresponding blockchain network to complete rapid development of the corresponding service. The block chain network and the block chain nodes are constructed based on the block chain technology, and the block chains in the block chain network have the characteristics of decentralization, transparent information, non-falsification and the like. In order to facilitate understanding of the application field and implementation manner of the embodiments of the present application, the blockchain technique and the definition related to the blockchain technique in the embodiments of the present application are explained in detail below.
Blockchain techniques: blockchain technology is an emerging technology, a cross discipline involving cryptography, gambling theory, and monetization. The Internet product developed based on the blockchain technology mainly utilizes the blockchain to store data, utilizes a consensus algorithm to ensure the consistency of the data, and utilizes cryptography to ensure the safety of the data. The distributed ledgers concatenated with blockchain technology enable each participant to effectively record the transaction and permanently verify the transaction. A distributed ledger is understood, among other things, to be a database that is shared, replicated, and synchronized among the network members, and embodiments of the present application are not described in detail.
Blockchain: english terms blockchain or blockchain. A blockchain is a block-by-block chain data structure, that is, a blockchain may be composed of a plurality of blocks, and the structure is schematically shown in fig. 1 a. For a clearer understanding of fig. 1a, the following description of the blocks is given: a block is understood to be a concatenated literal record concatenated and protected by cryptography. In practice, each chunk in the blockchain includes a cryptographic hash of the previous chunk, a corresponding time stamp, and transaction data. Illustratively, the transaction data is typically represented by a hash value calculated by the Merkle tree (Merkle tree) algorithm, which is designed to make the contents of the block difficult to tamper with, and neither the transaction data nor the Merkle tree algorithm are described in detail herein. Based on this, referring to FIG. 1a, the blockchain may include an initiation block (first block), where the initiation block (e.g., the block denoted by 101 in FIG. 1 a) includes a block header and a block body, where the block header stores an input information feature value, a version number, a timestamp, and a difficulty value, and the block body stores input information. The next block of the starting block (e.g., the block marked 102 in fig. 1 a) takes the starting block as a parent block, the next block of the block (e.g., the block marked 103 in fig. 1 a) also includes a block header and a block body, and the block header stores the input information characteristic value of the current block, the block header characteristic value, the version number, the timestamp and the difficulty value of the parent block (e.g., the block 102 in fig. 1 a). Similarly, the block data stored in each block in the block chain is associated with the block data stored in the parent block, so that the safety of the input information in the block is ensured.
Block chain network: the blockchain network is a network of a plurality of blockchain nodes that can communicate with each other, each blockchain node in the blockchain network storing one and the same blockchain. The block chain nodes can perform data transmission through communication connection among the block chain nodes, so that data sharing among the block chain nodes is realized. Therefore, in practical applications, the blockchain network may also be understood as a data sharing system, and the blockchain node is a node in the data sharing system. In particular, a node may be a client or an application in a data sharing system. Each node may receive input information during normal operation and may maintain shared data within the data sharing system based on the received input information. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system can acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that data stored on all nodes in the data sharing system can be kept consistent, thereby embodying data consistency of a blockchain network. Illustratively, the structure of the data sharing system may be as shown by the system labeled 110 in FIG. 1b, and the data sharing system 110 may include a plurality of nodes (e.g., node 111, node 112, node 113, etc.).
Blockchain nodes: the blockchain node may have a number of functions, such as: routing functions, application functions, etc. The routing function is a basic function of the blockchain node, and is mainly used for supporting communication between the blockchain nodes. Application functions may be deployed in a blockchain that are primarily used to implement specific services according to actual service requirements. In the process of realizing related services by the block link point based on the application function, the application function can also be used for recording record data formed by data related to realizing the function, and carrying a digital signature in the record data to represent the source of the record data. In addition, each blockchain node in the blockchain network has a corresponding node identification, and each blockchain node in the blockchain network may store the node identifications of other blockchain nodes in the blockchain network for subsequent broadcasting of related data (e.g., generated blocks) to other blockchain nodes in the blockchain network based on the node identifications of the other blockchain nodes. The node identification may be an IP (Internet Protocol, protocol interconnecting between networks) address or any other information that can be used to uniquely identify the blockchain node. Based on this, in practical application, a node identifier list shown in table 1 may be maintained in each blockchain node, where the node names and node identifiers of the blockchain nodes may be stored in association (the table 1 is only illustrated by taking an IP address as an example).
TABLE 1
Node name | Node identification |
Node 1 | 117.114.151.XX |
Node 2 | 117.XX.XXX.XX |
… | … |
Node N | xx.xx.xx.xx |
Based on the above-mentioned widely-used blockchain technology and related products, many service providers (such as enterprises, institutions, etc.) prefer to call the blockchain services (such as asset management services, information exchange services, etc.) provided by the blockchain network by joining the existing blockchain network when developing the services, so as to complete the rapid development of the corresponding services. In this application context, in order to improve the efficiency of a service provider joining a blockchain network, the embodiment of the application provides a blockchain network access scheme. The general principles of this blockchain network access scheme are described below in connection with specific implementations.
In one embodiment, the blockchain network access scheme proposed by embodiments of the present application may be implemented by a computer device. In this case, the general principle of the blockchain network access scheme may be as follows: after the computer equipment acquires the access request of the target equipment about joining the target blockchain network, acquiring a corresponding node program and a configuration template according to the access request. The node program is associated with the target blockchain, and the configuration template comprises one or more pieces of information to be configured, wherein the information to be configured is used for indicating configuration parameters required to be provided by the target equipment. Further, the computer device may obtain the configuration parameters provided by the target device from the target device according to the configuration template, and may generate a configuration file according to the configuration parameters and the configuration template. The computer device sends the configuration file and the node program to the target device, so that the target device can start the node program based on the configuration file, and further the target device with the successfully started node program can complete the deployment of the corresponding target blockchain, wherein the target device with the successfully deployed target device can be determined to be successfully added into the target blockchain network. In the embodiment of the application, the computer equipment is adopted to deploy the corresponding blockchain network for the target equipment based on the access request sent by the target equipment so as to add the target equipment to the target blockchain network, so that the target equipment does not need to pay attention to a specific deployment mode and a deployment flow of the target blockchain network. The processing mode can lead the workload of the target equipment to be smaller, so the method and the device have higher efficiency when the target equipment is added into the target blockchain network, and the rate of service development related to the target equipment can be increased to a certain extent.
In yet another embodiment, the blockchain network access scheme provided by the embodiment of the present application may also be applied to a blockchain network access system as shown in fig. 1c, where the blockchain network access scheme is cooperatively executed by related constituent devices of the system. As shown in fig. 1c, the blockchain network access system includes at least one or more target devices labeled 121, an access service provider labeled 122, and a network manager (hereinafter referred to as "network manager") of the blockchain network labeled 123, where the number of network managers may be one or more, and the network manager shown in fig. 1c is not to be construed as limiting the embodiments of the present application. Wherein the target device 121 establishes a communication connection with at least the access service provider 122, and the access service provider 122 establishes a communication connection with the network manager 123. In this case, the general implementation flow of the blockchain network access scheme provided by the embodiment of the present application may be as follows: the access service provider 122 first obtains an access request for joining the target device to the target blockchain network, where the access request may be sent by the target device to the access service provider 122, and the target blockchain network is provided by the network manager 123. The access service provider 122 may then obtain the node program corresponding to the target blockchain network and the configuration template according to the access request, for example: the access service provider 122 obtains the corresponding node program and configuration template from the network manager 123 based on the communication connection between the access service provider 122 and the network manager 123. Further, the access service provider 122 may send the obtained node program and the configuration template to the target device that initiates the access request, so that the target device may initiate the node program based on the configuration template, thereby joining the target blockchain network after the node program is successfully initiated, so that the target device may establish a communication connection with the target blockchain.
The target device may be an electronic device belonging to a service provider (such as: XX enterprise), and the access service provider may provide a blockchain network access platform (hereinafter referred to as "access platform") to the target device, where the access platform may be a client, a mobile application, a web page, or the like. The access platform in the embodiment of the application can be used for maintaining network description information, node programs, supported network access modes and the like of at least one blockchain network. The description information of the target blockchain network exists in the at least one blockchain network description information maintained by the access platform, and specifically, the target blockchain network can be the blockchain network indicated by any one of the at least one network description information maintained by the access platform. Thus, the target device may join the target blockchain network through the access platform. Furthermore, in some implementations, the access platform may also be used to visually expose network description information for the blockchain network. In this case, the manner in which the access service provider obtains the access request for joining the target device to the target blockchain network may be as follows: the target device downloads and installs the access program (i.e., the access platform) provided by the access service provider, and then the target device may obtain network description information of at least one blockchain network from the access platform. Further, the target device may select a target blockchain network that meets the traffic demand from the at least one blockchain network based on the at least one network description information, and further initiate an access request for the target blockchain network to the access service provider, so that the target device may become one blockchain node in the target blockchain network after joining the target blockchain network.
Then, it will be understood from the foregoing description that the specific structure of the blockchain network access system and the functions of the corresponding components applied in the embodiment of the present application may be as shown in fig. 1 d. Based on fig. 1d, it can be seen that an access platform service provider (i.e., an access service provider) in the blockchain network access system can be used to manage an access procedure (e.g., update an access procedure, store related data of an access procedure, etc.), and thus, the access platform service provider can be regarded as a management background of an access platform. The access platform service provider can establish a communication connection with at least a chain service provider (i.e., a network manager) and a service provider (i.e., an enterprise or organization to which the target device belongs, etc.). The access platform service provider can acquire the network description information of the corresponding blockchain network from the chain service provider based on the communication connection with the chain service provider, and update and maintain the network description information in the access platform in time when the network description information is updated. The access platform service provider may also provide the service provider with a download and installation service of the access program based on the communication connection with the service provider, such that the service provider may install the access program on the associated device to use the access platform.
In particular embodiments, the access platform may provide chain services of the blockchain network to the target device by way of SDK (Software Development Kit ) access. The SDK includes an API (Application Program Interface ) associated with a corresponding blockchain network, and the API referred to in the embodiments of the present application may be understood as a middleware for providing data sharing for various platforms. In the embodiment of the present application, the SDK access manner may be, for example: the access platform acquires the SDK corresponding to the target blockchain network and provides the acquired SDK for the target device, so that the target device can acquire an API (application program interface) for accessing the chain service from the SDK, and the target device can call the corresponding chain service by adopting the acquired API. In addition, the access platform may also provide a node access service for accessing the target device as a blockchain node to the target blockchain network, and a node operation and maintenance service for maintaining and visually displaying (i.e. browsing information in fig. 1 d) network description information, network update information, etc. of the blockchain network, and the specific manner of providing the node operation and maintenance service will be described in detail in the following embodiments, which are not described in detail herein.
Based on the above description about fig. 1c and fig. 1d, it will be apparent that the embodiment of the present application implements the addition of the target device to the target blockchain network through the access platform. Specifically, in the embodiment of the application, the node program required by accessing the target blockchain is acquired for the target equipment through the access platform, and the configuration file required by accessing the target blockchain network is generated, so that the target equipment can acquire the access data required by accessing the target blockchain without performing the docking work with the target blockchain network when accessing the target blockchain network, and the workload of the target equipment is reduced. Therefore, the blockchain network access scheme and the corresponding blockchain network access system provided by the embodiment of the application can improve the overall rate of the target equipment accessing the target blockchain network.
It should be noted that the computer device and any related devices (e.g., the target device of the service provider, the chain service providing device used by the chain service provider in fig. 1d, and the access service providing device used by the access service provider) related to fig. 1c and 1d may be any one or more of a server and a terminal device. The terminal device may include, but is not limited to: smart phones, tablet computers, notebook computers, desktop computers, vehicle terminals, smart televisions, and the like. A wide variety of clients (APP) may also be running within the terminal device, such as multimedia play clients, social clients, browser clients, information flow clients, educational clients, image processing clients, and so on. Further, the server may include, but is not limited to: the embodiments of the present application are not limited in particular, and the embodiments may include an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), and basic cloud computing services such as big data and artificial intelligence platforms.
Based on the above description of the principles regarding the blockchain network access scheme, the embodiment of the present application provides a specific blockchain network access method. It will be appreciated that the blockchain network access method may of course be implemented using a computer device, and may also be applied to blockchain network access systems as shown in fig. 1c or 1 d. However, for convenience of description and for clear understanding of the blockchain network access method provided in the embodiments of the present application according to the related description, the following embodiments will take a computer device to execute the related blockchain network access method as an example, to describe related implementation in detail. And, for example, the computer device may be configured to manage an access platform for providing blockchain network access services to the target device.
Referring to fig. 2, fig. 2 is a flowchart of a blockchain network access method according to an embodiment of the present application. As shown in fig. 2, the method includes steps S201 to S203:
s201, acquiring an access request for joining the target device into the target blockchain network, and acquiring a node program and a configuration template according to the access request.
In the embodiment of the present application, the target device may be understood as an electronic device of a service provider, and the service provider may be understood as an enterprise or an organization or an object individual for providing an internet service. Internet business refers to related transactions in any industry that is handled via the internet, such as: asset management business of financial industry, game development business of game industry, navigation business of car networking industry, information exchange business in program development industry, and the like. Then the target device may specifically be as follows: a service providing device of an asset management service, a service providing device of an information exchange service, etc. The access request may be sent by the service provider to the computer device, or may be automatically generated by the computer device when it detects that an access requirement exists for the service provider.
The target blockchain network may be a blockchain network already built in the internet or a blockchain network being built. In practical application, the target blockchain network may be a blockchain network constructed based on a federated chain, or may be a blockchain network constructed based on a public chain. Where a federated chain refers to a blockchain whose consensus process is controlled by preselected nodes. For example, a community of X institutions, each running a node, needs to obtain a validation of Y (Y is less than or equal to X) institutions in order to validate the generated block. Then, the blockchain built by this community can be understood as a coalition chain. Blockchain data in the coalition chain may allow each node to read, or may allow only some nodes to read. That is, the federation chain only internally designates a plurality of preselected nodes as billable members for members of a particular community and limited third parties, the generation of each block is determined by all preselected nodes in common, other access nodes can participate in the transaction, but not the billing process, and other access nodes or third parties can make a defined query through the blockchain open API. Public chains refer to blockchains that are open to the whole network and do not have an authorization mechanism set up, any third party can read, send transactions, and participate in the co-process in the blockchain.
Node procedures refer to applications that may be used to establish communication connections between a target device and various blockchain nodes in a target blockchain network. Different blockchain networks correspond to different node programs, and the target device can enable the target device to be called as one blockchain node in the blockchain network after the node program is successfully started by downloading and starting the node program, so that the target device can be successfully added into the corresponding blockchain network. When the target blockchain network is a blockchain network constructed based on public chains, the target device running the node program can synchronize corresponding blockchain data from other blockchain nodes of the blockchain network. In this way, the target device may invoke the blockchain service corresponding to the target blockchain network.
The configuration template is used to instruct the computer device as to the configuration parameters that need to be provided when the target device is added to the target blockchain network. In particular, the configuration template may include one or more information to be configured. For example, the information to be configured may be, for example, parameter names of configuration parameters that need to be filled in, such as: IP (Internet Protocol ) address of the target device, identity information of the target device (e.g., name of the service provider to which it belongs), key information associated with the target blockchain network, etc. Correspondingly, the configuration parameter may be understood as a specific parameter value under the name of the parameter (the parameter value in the embodiment of the present application may include, but is not limited to, any one or more of a character string, a number, and a text). Such as: the configuration parameters corresponding to the information to be configured, i.e. the IP address of the target device, may be: 172.0.00.XX (i.e., specific IP address of target device); the configuration parameters corresponding to the to-be-configured information, which is the identity information of the target device, may be: a service provider a. In practice, the configuration templates may be provided by the network management of the target blockchain network to the computer device. Specifically, when the network manager of the target blockchain network establishes a communication connection with the computer device to provide the blockchain network access entry for the service provider, the computer device may require the network manager to provide a corresponding configuration template, so that the computer device does not need to query and confirm relevant information to be configured by the computer device or the target device when the computer device accesses the target blockchain network, and the access efficiency of the blockchain network may be improved to a certain extent.
S202, acquiring configuration parameters required by information to be configured from target equipment according to a configuration template, and generating a configuration file according to the configuration parameters and the configuration template.
In particular embodiments, the target device may establish a communication connection with the computer device. In this case, then, the computer device may send the configuration template to the target device over the communication connection with the target device after the configuration template is acquired. After receiving the configuration template, the target device can fill in corresponding configuration parameters according to the information to be configured in the configuration template, so as to provide the configuration parameters required by the information to be configured for the computer device. Further, the computer device may then generate a configuration file based on the configuration parameters and the configuration template. The configuration file can be used for providing corresponding parameter information for starting the node program when the target device starts the node program, so that the node program can be started successfully.
S203, the configuration file and the node program are sent to the target device, so that the target device starts the node program according to the configuration file; when the node program is started successfully according to the configuration file, the deployment of the target blockchain is completed in the target equipment, and the target equipment completing the deployment of the target blockchain is determined to be added into the target blockchain network.
In a specific embodiment, in order to enable the target device to join the target blockchain network, the corresponding node program needs to be installed and started in the target device, and the starting of the node program needs to be completed in combination with the related configuration file. Thus, after the computer device acquires the node program and generates the configuration file, the computer device may send the configuration file and the node program to the target device, and then the computer device may instruct the target device to perform installation and startup of the node program based on the configuration file. The successful start of the node program in the target device means that the target device completes the deployment of the target blockchain, and the target device completing the deployment of the target blockchain can determine to join the target blockchain network. It should be noted that, the target blockchain refers to a blockchain used to compose the target blockchain network, that is: a blockchain maintained by each blockchain node in the target blockchain network. The deployment of the target blockchain can be understood as: configuration of the running environment of the node program of the target block chain, generation of a node identifier corresponding to the target equipment where the node program is located, and the like.
In the embodiment of the application, the target equipment can realize the deployment of the corresponding blockchain network through the computer equipment when the target equipment has the access requirement of the blockchain network. Specifically, the computer device obtains the node program and the configuration template when deploying the blockchain network for the target device. Further, the computer device generates a configuration file by acquiring the configuration template and corresponding configuration parameters, and sends the configuration file and the node program to the target device, so that the target device can start the node program based on the configuration file, and further the target device is added to the blockchain network. Therefore, the computer equipment can add the target equipment into the blockchain network by acquiring preset related data, and in the adding process of the target equipment, the target equipment does not need to pay attention to a specific deployment process and only needs to provide corresponding configuration parameters according to the configuration template, so that the workload of the target equipment is greatly reduced, and the efficiency of the target equipment for accessing the blockchain network is improved.
Based on the description of the above blockchain network access scheme and the description of the related embodiment of fig. 2, the embodiment of the present application further proposes another blockchain network access method. Referring to fig. 3, fig. 3 is a flowchart of the blockchain network access method. As shown in fig. 3, the method includes steps S301-S304:
s301, acquiring an access request for joining the target device to the target blockchain network, and acquiring a node program and a configuration template according to the access request.
In a specific implementation of the embodiment of the present application, a manner in which the computer device obtains the access request may be as follows: the computer device responds to the query request for the blockchain network and acquires the network description information of at least one blockchain network so that the target device can select the target blockchain network to be accessed according to the at least one network description information. The query request may be generated by triggering the target device, or may be generated by triggering the manager of the target device (hereinafter, the query request generated by triggering the target device is described as an example). The network description information is used for indicating the blockchain service provided by the corresponding blockchain network and the supported network access mode. The network description information may be generated by a network manager of the blockchain network and sent to the computer device, or may be generated by the computer device after analyzing the blockchain network, which is not limited by the embodiment of the present application. After the computer device obtains the at least one network description information, the at least one network description information may be sent to the target device, so that the target device may perform a selection operation with respect to any network description information. Then, after the computer device detects a selection operation of the target device for the network description information corresponding to the target blockchain network, the computer device may determine that an access request for joining the target device to the target blockchain network is obtained.
It should be further understood that, in the embodiment of the present application, the precondition that the computer device obtains the access request for joining the target device to the target blockchain network is: the computer device establishes a communication connection with the target device and a network manager of the target blockchain network, and the network manager allows the computer device to increase blockchain nodes for the target blockchain network. The communication connection between the computer device and the network management party may be: the network management initiates a docking request to the computer device, the docking request carrying network identifications of one or more blockchain networks, and the network identifications of the target blockchain network being present in the one or more network identifications. Then, the computer device may obtain the identity information of the network manager after obtaining the docking request to further authenticate the identity of the network manager or the related blockchain network managed by the network manager based on the identity information. The purpose of identity authentication may be, for example, to determine the security of the network administrator and/or the associated blockchain network to ensure the security of data in the blockchain network access party (e.g., the target device). It will be appreciated that a network administrator authenticated may successfully establish a communication connection with a computer device.
Based on the foregoing, it can be seen that: the node program is associated with a blockchain network, and different blockchain networks correspond to different node programs. In practical applications, then, in order to ensure the security of the blockchain data in the blockchain network, the network access manner supported by different blockchain networks may be different. Thus, the configuration templates corresponding to different blockchain networks may also be different. In other words, in the embodiment of the present application, the node program acquired by the computer device according to the access request may be a node program corresponding to the target blockchain network, and the configuration template acquired by the computer device also has an association relationship with the target blockchain network. In the embodiment of the present application, the access request may carry the network identifier of the target blockchain network. The network identification is used to instruct the computer device to obtain the specifically required node program and configuration templates. In a specific implementation, after the computer device obtains the access request, the computer device may parse the access request to obtain the network identifier carried in the access request. Further, the computer device may obtain, according to the network identifier, a node program and a configuration template corresponding to the network identifier.
In a specific embodiment, the specific implementation manner of the node program corresponding to the network identifier obtained by the computer device according to the network identifier may be as follows: the computer equipment acquires a downloading mode supported by the node program from the network management side, and then the computer equipment can determine a corresponding target downloading mode according to the network identification, so that the computer equipment can download the node program from the network management side by adopting the target downloading mode. Optionally, the node program mentioned in the download manner supported by the node program refers to a general meaning, which can be understood as a download manner in which the node program can be downloaded, including but not limited to one or more of the following: installation package download in binary form, installation package download in executable file form, download by accessing download address, etc. In this case, the target download method is: among the download modes supported by the node program, any one of the download modes supported by the node program of the target blockchain network. Optionally, the downloading manner supported by the node program may also be: one or more download modes supported by the node program of the target blockchain network. Then, in this case, the target download mode may be any one of the one or more download modes. For example, in order to increase the acquisition rate of the node program, the target downloading manner may also be any one of the downloading manners in which the computer device predicts that the downloading rate meets the rate requirement based on the current running condition of the target blockchain network.
It should be noted that, the computer device may also obtain the downloading mode of the node program from a database or other storage space managed by the computer device itself. In this case, the node program may be downloaded in such a manner that the computer device acquires and stores from the network manager in the process that the computer device establishes a communication connection with the network manager of the target blockchain network. The processing mode can reduce the information interaction times between the computer equipment and the network management party, and can also improve the determination rate of the target downloading mode to a certain extent, thereby improving the rate of the target equipment accessing the target blockchain network. In addition, the configuration template may be obtained from a database or other storage space managed by the computer device, and the principle and corresponding beneficial effects of the configuration template are similar to those of the downloading manner of the node program, which is not described in detail in the embodiment of the present application.
S302, acquiring configuration parameters required by information to be configured from target equipment according to a configuration template, and generating a configuration file according to the configuration parameters and the configuration template.
Based on the foregoing, the target blockchain network may be a blockchain network composed of federated chains, and the permissions possessed by different blockchain nodes in such a blockchain network may vary, illustratively: the blockchain node a may have access to all blockchain data and record authority to record newly generated blockchain data, while the blockchain node B has access to only part of the blockchain data. In practice, these rights may be determined by the communication credentials of the corresponding blockchain node. Therefore, in the embodiment of the present application, when the target blockchain network is a blockchain network formed by alliance chains, the computer device needs to acquire the communication certificate of the target device when the target device joins the target blockchain network, so as to ensure that the target device joining the blockchain network can communicate with the corresponding blockchain point.
In a specific embodiment, the manner in which the computer device obtains the communication credentials of the target device may be as follows: the computer device obtains the identity information of the target device and sends the identity information of the target device to a network manager of the target blockchain network, so that the network manager can conduct security audit on the target device based on the identity information of the target device. Illustratively, the identity information may include, but is not limited to, any one or more of the following: information about the service provider to which the target device belongs, a business license for the service provider, and the like. After the target device passes the security audit (namely, when the network manager of the target blockchain network determines that the security of the target device is qualified), the network manager of the target blockchain network can issue a corresponding access certificate and/or a communication certificate for the target device, so that the computer device can acquire the communication certificate of the target device from the network manager, and further, after the target device successfully joins the target blockchain network, the communication certificate can be used for carrying out network communication with other node devices of the target blockchain network. The communication credentials in the embodiments of the present application may be generated by the network manager based on the access certificate and/or the communication certificate, or may be directly the access certificate and/or the communication certificate, which is not limited in this embodiment of the present application.
S303, acquiring a program starting script from a network manager of the target blockchain network, wherein the program starting script is used for indicating starting logic for starting the node program based on the configuration file.
In the embodiment of the application, in order to further improve the efficiency of the target device accessing the target blockchain network, the computer device may further acquire the program start script from the network manager of the target blockchain network. The program start script specifies the start logic for starting the node program by a device (e.g., a target device) that needs to access the target blockchain network based on the configuration file. Specifically, the startup logic may include, but is not limited to, any one or more of the following: the method of using the configuration file by the target device, the use flow of each configuration information in the configuration file by the target device, the cooperation mode between the starting of the node program and the configuration file, and the like. The program start script may be provided by a network manager of the target blockchain network during a process of establishing a communication connection with the computer device. That is, the program start script may be written by a network manager of the target blockchain network. It will be appreciated that the network manager of the target blockchain network has sufficient knowledge of the access logic of the target blockchain network, and therefore the boot logic indicated by the program boot script written by the network manager of the target blockchain network has high accuracy and boot efficiency. Then, when the subsequent target device adopts the program start script to start the node program, the subsequent target device can also have a higher start rate.
S304, the configuration file, the node program and the program starting script are sent to the target equipment, so that the target equipment starts the node program in combination with the configuration file according to starting logic specified by the program starting script; when the node program is started successfully based on the configuration file, the deployment of the target blockchain is completed in the target equipment, and the target equipment completing the deployment of the target blockchain is determined to be added into the target blockchain network.
Based on step S201, the computer device may establish a communication connection with the target device, so in a specific embodiment, the computer device may send the configuration file, the node program, and the program start script to the target device through the communication connection with the target device. After the computer device sends the configuration file, the node program, and the program launch script to the target device, the computer device may further instruct the target device to run the program launch script, so that the target device may launch the access program in combination with the configuration file according to launch logic specified by the program launch script. Because the starting logic of the node program is already specified in the program starting script, the target device or related technician does not need to explore the process or mode of starting the node program by combining the configuration file, so that the workload of the target device or related technician can be effectively reduced, and the rate of accessing the target device to the target blockchain network can be improved.
Based on the above description about fig. 2 and fig. 3, it should be added that, in other implementations of the embodiments of the present application, the access request in the target blockchain network access method related to fig. 2 and/or fig. 3 may also be initiated by a manager (or referred to as a device manager) of the target device. That is, the computer device may also establish a communication connection with the manager of the target device. In this case, the computer device may also send the configuration template to the device manager so that the device manager may perform the filling of the relevant configuration parameters according to the configuration template. Correspondingly, the computer device may also obtain configuration parameters required for the information to be configured from the device manager and generate a configuration file further based on the configuration parameters and the configuration template. In the actual application, the device manager may manage the target device through the target device itself, or may manage the target device through other devices. In addition, the manner in which the computer device sends the configuration file to the target device may be: the device management provides the address information of the target device to the computer device, and the computer device may then send a configuration file to the target device indicated by the address information.
The number of target devices may be N (N is a positive integer). The configuration template may then include N device addresses to be configured in addition to one or more information to be configured. The device address to be configured is used for indicating that the information required to be provided by the device manager is the device address of the target device. In this case, the manner in which the computer device generates the configuration file may also be as follows: the computer device obtains device address information of each target device from the device manager based on the communication connection with the device manager to obtain N pieces of device address information. The computer device may also obtain configuration parameters required for each of the one or more pieces of information to be configured from the device manager. The computer device may then generate a configuration file based on the configuration template, the N device address information, and the obtained configuration parameters.
In addition, in other implementations of the embodiments of the present application, the number of target blockchain networks to which the target device needs to join may also be multiple, where the multiple target blockchain networks do not necessarily have a service intersection (i.e., the provided blockchain services are not necessarily the same or similar), and the network managers to which the target blockchain networks belong are not necessarily the same. In this case, the access request may carry a plurality of network identifiers (network identifiers of each target blockchain network), and the computer device may respectively obtain a configuration template and a node program associated with each network identifier, and send the obtained configuration template and node program to the target device, so that the target device may obtain, according to the configuration template, configuration parameters required when the corresponding node program is started, and further implement starting of the corresponding node program. It should be noted that, the computer device may also add a plurality of target devices to different target blockchain networks, and a specific implementation manner of the computer device may be any implementation manner obtained by combining the related implementation manners, which is not described in detail in the embodiments of the present application.
Based on the above description about fig. 2 and fig. 3, it should be further noted that, in an implementation of an embodiment of the present application, the computer device may periodically obtain, from a network manager of the target blockchain network, one or more network information of the target blockchain network at the current time, where the one or more network information may include, but is not limited to, any one or more of the following: network description information, version information of node programs, configuration templates, downloading modes of the node programs, node certificate information, supported network access modes and the like. In this case, the computer device may generate a hint information when any network information is detected to have an update, and broadcast the hint information to each target device that accesses the target blockchain network, so as to hint the target device to update the network information or hint the target device to re-access the target blockchain network. Then, if the target device determines to update the network information, the computer device may re-acquire the corresponding network information and send the acquired network information to the target device. If the target device determines to update the node program, the computer device may obtain the latest node program and configuration template, and then the computer device may re-access the target device to the target blockchain network based on the node program and configuration template. A step of
Optionally, after detecting that the node program of the target blockchain network has an update, the computer device may directly send the updated node program to the target device, and automatically complete the update of the node program in the target device. Because the blockchain network relies on the respective operations of the node programs in the individual blockchain nodes and the communication between each other, maintenance of the distributed database is achieved. If the node program versions of the nodes in the blockchain network are different, the processing results generated by the nodes are different, so that the maintenance efficiency of the whole blockchain network on the database is affected. Based on the above, in the embodiment of the application, after the node program is detected to be updated, the node program in the target device is directly updated, so that the consistency of the node program versions running in each node can be ensured, and the maintenance efficiency of the blockchain network to the database is improved to a certain extent. Based on the above, it can be seen that the device manager can also use the computer device provided by the embodiment of the present application to perform unified operation and maintenance on different blockchain networks, which reduces the difficulty of the device manager in invoking related blockchain services, and can improve the efficiency of the device manager in developing related services to a certain extent.
In the embodiment of the application, the computer equipment can visually display the network description information of at least one blockchain network to the target equipment or the equipment manager, so that the target equipment or the equipment manager can quickly and intuitively know the blockchain services provided by each blockchain network and the network access modes supported by the blockchain network, and the target equipment or the equipment manager can quickly select the target blockchain network meeting the service requirements from the at least one blockchain network. The network description information can be provided for the computer equipment by the network management of the corresponding blockchain network, and it is easy to understand that displaying the network description information on the computer equipment can increase the exposure degree of the blockchain service provided by the related blockchain network, so that greater benefits can be brought to the network management side of the related blockchain network. In addition, in the embodiment of the application, the computer device can also send a program start script to the target device to instruct the target device to start the node program by running the program start script in combination with the configuration file. Moreover, the program starting script, the node program and the configuration template for generating the configuration file are provided by the network management side, so that the workload of the computer equipment is small, the working content and the working flow are simple, and the working accuracy and the working efficiency of the computer equipment can be effectively ensured. In this way, the target device is added to the target blockchain network, so that higher blockchain network adding efficiency can be achieved.
Based on the above description about the blockchain network access method, the embodiment of the present application also discloses a blockchain network access device, which may be a computer program (including program code) running in the above-mentioned computer device. In particular embodiments, the blockchain network access device may be used to perform the blockchain network access method as shown in fig. 2 or 3. Referring to fig. 4, the blockchain network access device may include: acquisition unit 401, generation unit 402, deployment unit 403, and request response unit 404.
An obtaining unit 401, configured to obtain an access request for joining a target device to a target blockchain network, and obtain a node program and a configuration template according to the access request, where the configuration template includes one or more pieces of information to be configured;
a generating unit 402, configured to obtain, according to the configuration template, configuration parameters required by the information to be configured from the target device, and generate a configuration file according to the configuration parameters and the configuration template;
a deployment unit 403, configured to send the configuration file and the node program to the target device, so that the target device starts the node program based on the configuration file; and when the node program is started successfully based on the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
In one embodiment, the access request carries a network identification of the target blockchain network; the acquisition unit 401 may be configured to perform:
analyzing the access request to obtain the network identifier, and acquiring a node program and a configuration template corresponding to the network identifier according to the network identifier;
wherein, the node program corresponding to the network identifier is used for: communication connections between the target device and each block link point in the target blockchain network are established.
In yet another embodiment, the obtaining unit 401 may be further configured to perform:
acquiring a downloading mode supported by the node program from a network management side, and determining a corresponding target downloading mode according to the network identification;
and downloading the node program from the network management side by adopting the target downloading mode.
In yet another embodiment, the obtaining unit 401 may be further configured to perform:
acquiring a program start script from a network manager of the target blockchain network, wherein the program start script is used for indicating start logic for starting the node program based on the configuration file;
and sending the program starting script to the target equipment so that the target equipment starts the node program according to starting logic specified by the program starting script and combining the configuration file.
In yet another embodiment, the target blockchain network is a blockchain network made up of federated chains, and the generating unit 402 may be configured to perform:
acquiring identity information of the target equipment, and sending the identity information to a network manager of the target blockchain network so that the network manager carries out security audit on the target equipment based on the identity information;
after passing the security audit, acquiring a communication certificate of the target equipment from the network management party, wherein the target equipment adopts the communication certificate to carry out network communication with other node equipment of the target blockchain network after successfully joining the target blockchain network;
and generating a configuration file according to the communication certificate, the configuration parameters and the configuration template.
In yet another embodiment, the number of the target devices is N, the configuration template includes N addresses of devices to be configured and the one or more information to be configured, and N is a positive integer; the generating unit 402 may be further configured to perform:
acquiring device address information of each target device from a device management side to obtain N pieces of device address information; the device management side is used for managing the N target devices;
Generating a configuration file according to the configuration template, the N pieces of equipment address information and the acquired configuration parameters.
In yet another embodiment, the blockchain network access device further includes a request response unit 404, the request response unit 404 being operable to perform:
responding to a query request aiming at the blockchain network, acquiring network description information of at least one blockchain network, so that the target equipment selects a target blockchain network to be accessed according to the at least one network description information; the network description information is used for indicating the block chain service provided by the corresponding block chain network and the supported network access mode;
and detecting the selection operation of the target equipment aiming at the network description information corresponding to the target blockchain network, and determining to acquire the access request for joining the target equipment into the target blockchain network.
According to one embodiment of the application, the steps involved in the methods shown in fig. 2 and 3 may be performed by the various units in the blockchain network access device shown in fig. 4. For example, step S201 shown in fig. 2 may be performed by the acquisition unit 401 in the blockchain network access device shown in fig. 4; step S202 may be performed by the generation unit 402 in the blockchain network access device shown in fig. 4; step S203 may be performed by the deployment unit 403 in the blockchain network access device shown in fig. 4. As another example, both of step S301 and step S303 shown in fig. 3 may be performed by the acquisition unit 401 in the blockchain network access device shown in fig. 4; step S302 may be performed by the generation unit 402 in the blockchain network access device shown in fig. 4; step S304 may be performed by the deployment unit 403 in the blockchain network access device shown in fig. 4.
According to another embodiment of the present application, each unit in the blockchain network access device shown in fig. 4 is divided based on a logic function, and each unit may be separately or completely combined into one or several other units to form the blockchain network access device, or some (some) of the units may be further split into a plurality of units with smaller functions to form the blockchain network access device, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. In other embodiments of the present application, the blockchain network access device may also include other units, and in practical applications, these functions may be implemented with assistance from other units, and may be implemented with assistance from multiple units.
According to another embodiment of the present application, the blockchain network access device shown in fig. 4 may be constructed by running a computer program (including program code) capable of executing the steps involved in the methods shown in fig. 2 and 3 on a general-purpose computing device such as a domain name management device including a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), etc., processing elements and storage elements, and implementing the blockchain network access method of the embodiments of the present application. The computer program may be recorded on, for example, a computer storage medium, and loaded into and run on the above-described computing device through the computer storage medium.
In the embodiment of the application, the blockchain network access device can acquire the configuration template and the node program according to the access request, then the blockchain network access device can acquire the configuration parameters matched with the information to be configured contained in the configuration template from the target equipment, and generate the configuration file according to the configuration parameters and the configuration template, and further the blockchain network access device can send the configuration file and the node program to the target equipment so that the target equipment can start the node program based on the configuration file, thereby realizing the addition of the target equipment to the target blockchain network. Therefore, in the embodiment of the application, the data required for joining the target blockchain network is mainly acquired for the target equipment through the blockchain network access device, so that the target equipment can join the target blockchain network only by executing a small amount of work (such as providing configuration parameters required by information to be configured), and the deployment flow and specific deployment mode of the blockchain network are not required to be focused on the target equipment, thereby greatly reducing the workload of the target equipment and improving the efficiency of joining the target equipment into the target blockchain network.
Based on the above description of the method embodiment and the apparatus embodiment, the embodiment of the present application further provides a computer device, please refer to fig. 5. The computer device includes at least a processor 501, an input interface 502, an output interface 503, and a computer storage medium 504, and the processor 501, the input interface 502, the output interface 503, and the computer storage medium 504 may be connected by a bus or other means. Among them, the above-mentioned computer storage medium 504 is a memory device in a computer device for storing programs and data. It is understood that the computer storage media 504 herein may include both built-in storage media in a computer device and extended storage media supported by the computer device. Computer storage media 504 provides storage space that stores the operating system of the computer device. Also stored in this memory space are one or more computer programs, which may be one or more program codes, adapted to be loaded and executed by the processor 701. The computer storage medium herein may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; optionally, at least one storage medium located remotely from the processor. The processor 701, or CPU (Central Processing Unit ), is a computing core as well as a control core of a computer device, which is adapted to implement one or more computer programs, in particular to load and execute one or more computer programs to implement the respective method flows or the respective functions.
In one embodiment, one or more computer programs stored in computer storage medium 504 may be loaded and executed by processor 501 to implement the corresponding method steps in the method embodiments described above with respect to fig. 2 and 3. In a specific implementation, one or more computer programs in computer storage medium 504 may be loaded by processor 501 and perform the steps of:
acquiring an access request for adding target equipment into a target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured;
according to the configuration template, acquiring configuration parameters required by the information to be configured from the target equipment, and generating a configuration file according to the configuration parameters and the configuration template;
transmitting the configuration file and the node program to the target device so that the target device starts the node program based on the configuration file; and when the node program is started successfully based on the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
In one embodiment, the access request carries a network identification of the target blockchain network; the processor 501 may be configured to load and execute:
analyzing the access request to obtain the network identifier, and acquiring a node program and a configuration template corresponding to the network identifier according to the network identifier;
wherein, the node program corresponding to the network identifier is used for: communication connections between the target device and each block link point in the target blockchain network are established.
In yet another embodiment, the processor 501 may be further configured to load and execute:
acquiring a downloading mode supported by the node program from a network management side, and determining a corresponding target downloading mode according to the network identification;
and downloading the node program from the network management side by adopting the target downloading mode.
In yet another embodiment, the processor 501 may be further configured to load and execute:
acquiring a program start script from a network manager of the target blockchain network, wherein the program start script is used for indicating start logic for starting the node program based on the configuration file;
and sending the program starting script to the target equipment so that the target equipment starts the node program according to starting logic specified by the program starting script and combining the configuration file.
In yet another embodiment, the target blockchain network is a blockchain network made up of federated chains, and the processor 501 may be further configured to load and execute:
acquiring identity information of the target equipment, and sending the identity information to a network manager of the target blockchain network so that the network manager carries out security audit on the target equipment based on the identity information;
after passing the security audit, acquiring a communication certificate of the target equipment from the network management party, wherein the target equipment adopts the communication certificate to carry out network communication with other node equipment of the target blockchain network after successfully joining the target blockchain network;
and generating a configuration file according to the communication certificate, the configuration parameters and the configuration template.
In yet another embodiment, the number of the target devices is N, the configuration template includes N addresses of devices to be configured and the one or more information to be configured, and N is a positive integer; the processor 501 may also be configured to load and execute:
acquiring device address information of each target device from a device management side to obtain N pieces of device address information; the device management side is used for managing the N target devices;
Generating a configuration file according to the configuration template, the N pieces of equipment address information and the acquired configuration parameters.
In yet another embodiment, the processor 501 may be further configured to load and execute:
responding to a query request aiming at the blockchain network, acquiring network description information of at least one blockchain network, so that the target equipment selects a target blockchain network to be accessed according to the at least one network description information; the network description information is used for indicating the block chain service provided by the corresponding block chain network and the supported network access mode;
and detecting the selection operation of the target equipment aiming at the network description information corresponding to the target blockchain network, and determining to acquire the access request for joining the target equipment into the target blockchain network.
In the embodiment of the application, the computer equipment can acquire the configuration template and the node program according to the access request, then the computer equipment can acquire the configuration parameters matched with the information to be configured contained in the configuration template from the target equipment, and generate the configuration file according to the configuration parameters and the configuration template, and further, the computer equipment can send the configuration file and the node program to the target equipment so that the target equipment can start the node program based on the configuration file, thereby realizing the addition of the target equipment to the target blockchain network. Therefore, in the embodiment of the application, the data required for joining the target blockchain network is mainly acquired for the target device through the computer device, so that the target device can join the target blockchain network only by executing a small amount of work (such as providing configuration parameters required by the information to be configured), and the deployment flow and the specific deployment mode of the blockchain network are not required to be focused for the target device, thereby greatly reducing the workload of the target device and improving the efficiency of joining the target device into the target blockchain network.
The application also provides a computer storage medium, in which one or more computer programs corresponding to the blockchain network access method are stored, and when one or more processors load and execute the one or more computer programs, the description of the blockchain network access method in the embodiment can be realized, and the description is omitted here. The description of the advantageous effects of the same method is not repeated here. It will be appreciated that a computer program may be deployed to be executed on one or more devices that are capable of communication with one another.
It should be noted that according to an aspect of the present application, there is also provided a computer program product or a computer program, the computer program product comprising a computer program, the computer program being stored in a computer storage medium. A processor in a computer device reads the computer program from a computer storage medium and then executes the computer program to thereby enable the computer device to perform the methods provided in the various alternatives described above with respect to the blockchain network access method embodiment aspects shown in fig. 2 and 3.
Those skilled in the art will appreciate that implementing all or part of the above-described embodiment method may be accomplished by a computer program to instruct related hardware, and the computer program may be stored in a computer-readable storage medium, where the computer program, when executed, may include the embodiment of the blockchain network access method as described above. The computer storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
It is to be understood that the foregoing disclosure is only a partial embodiment of the present application, and it is not to be limited thereto, but it is to be understood that all or a partial process for implementing the above embodiment may be modified by one skilled in the art to fall within the scope of the present application as defined by the appended claims.
Claims (11)
1. A blockchain network access method, comprising:
acquiring an access request for adding target equipment into a target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured;
according to the configuration template, acquiring configuration parameters required by the information to be configured from the target equipment, and generating a configuration file according to the configuration parameters and the configuration template;
transmitting the configuration file and the node program to the target device so that the target device starts the node program based on the configuration file; and when the node program is started successfully based on the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
2. The method of claim 1, wherein the access request carries a network identification of the target blockchain network; the obtaining the node program and the configuration template according to the access request comprises the following steps:
analyzing the access request to obtain the network identifier, and acquiring a node program and a configuration template corresponding to the network identifier according to the network identifier;
wherein, the node program corresponding to the network identifier is used for: communication connections between the target device and each block link point in the target blockchain network are established.
3. The method according to claim 2, wherein the manner of obtaining the node program corresponding to the network identifier according to the network identifier comprises:
acquiring a downloading mode supported by the node program from a network management side, and determining a corresponding target downloading mode according to the network identification;
and downloading the node program from the network management side by adopting the target downloading mode.
4. The method according to claim 1, wherein the method further comprises:
acquiring a program start script from a network manager of the target blockchain network, wherein the program start script is used for indicating start logic for starting the node program based on the configuration file;
And sending the program starting script to the target equipment so that the target equipment starts the node program according to starting logic specified by the program starting script and combining the configuration file.
5. The method of claim 1, wherein the target blockchain network is a blockchain network of federated chains, the generating a configuration file from the configuration parameters and the configuration templates comprising:
acquiring identity information of the target equipment, and sending the identity information to a network manager of the target blockchain network so that the network manager carries out security audit on the target equipment based on the identity information;
after passing the security audit, acquiring a communication certificate of the target equipment from the network management party, wherein the target equipment adopts the communication certificate to carry out network communication with other node equipment of the target blockchain network after successfully joining the target blockchain network;
and generating a configuration file according to the communication certificate, the configuration parameters and the configuration template.
6. The method of claim 1, wherein the number of target devices is N, the configuration template includes N device addresses to be configured and the one or more information to be configured, N is a positive integer; the method further comprises the steps of:
Acquiring device address information of each target device from a device management side to obtain N pieces of device address information; the device management side is used for managing the N target devices;
generating a configuration file according to the configuration template, the N pieces of equipment address information and the acquired configuration parameters.
7. The method according to claim 1, wherein the method further comprises:
responding to a query request aiming at the blockchain network, acquiring network description information of at least one blockchain network, so that the target equipment selects a target blockchain network to be accessed according to the at least one network description information; the network description information is used for indicating the block chain service provided by the corresponding block chain network and the supported network access mode;
and detecting the selection operation of the target equipment aiming at the network description information corresponding to the target blockchain network, and determining to acquire the access request for joining the target equipment into the target blockchain network.
8. A blockchain network access device, comprising:
The acquisition unit is used for acquiring an access request for adding the target equipment into the target blockchain network, and acquiring a node program and a configuration template according to the access request, wherein the configuration template comprises one or more pieces of information to be configured;
the generating unit is used for acquiring configuration parameters required by the information to be configured from the target equipment according to the configuration template, and generating a configuration file according to the configuration parameters and the configuration template;
a deployment unit, configured to send the configuration file and the node program to the target device, so that the target device starts the node program based on the configuration file; and when the node program is started successfully based on the configuration file, completing the deployment of the target blockchain in the target equipment, and determining that the target equipment completing the deployment of the target blockchain is added into the target blockchain network.
9. A computer device, comprising:
a processor for implementing one or more computer programs;
a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the blockchain network access method of any of claims 1-7.
10. A computer storage medium storing one or more computer programs adapted to be loaded by a processor and to perform the blockchain network access method of any of claims 1-7.
11. A computer product, characterized in that it comprises a computer program adapted to be loaded by a processor and to perform the blockchain network access method according to any of the claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210525970.8A CN117097610A (en) | 2022-05-12 | 2022-05-12 | Block chain network access method, related device, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210525970.8A CN117097610A (en) | 2022-05-12 | 2022-05-12 | Block chain network access method, related device, storage medium and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117097610A true CN117097610A (en) | 2023-11-21 |
Family
ID=88772293
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210525970.8A Pending CN117097610A (en) | 2022-05-12 | 2022-05-12 | Block chain network access method, related device, storage medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117097610A (en) |
-
2022
- 2022-05-12 CN CN202210525970.8A patent/CN117097610A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108901022B (en) | Micro-service unified authentication method and gateway | |
US10725803B1 (en) | Methods and systems for automatic blockchain deployment based on cloud platform | |
CN112235420B (en) | Data synchronization method, system and related equipment based on block chain | |
US20210144017A1 (en) | Method and apparatus for replacing identity certificate in blockchain network, storage medium, and computer device | |
CN108965469B (en) | Dynamic management method, device, equipment and storage medium for members of block chain network | |
WO2021227457A1 (en) | Blockchain-based electronic data evidence preservation method and system, and storage medium and terminal | |
JP2024505692A (en) | Data processing methods, devices and computer equipment based on blockchain networks | |
CN110247758B (en) | Password management method and device and password manager | |
CN112231741B (en) | Data processing method, device, medium and electronic equipment based on block chain system | |
CN114978635B (en) | Cross-domain authentication method and device, user registration method and device | |
US20230325833A1 (en) | Blockchain-based data processing method and apparatus, device, storage medium, and program product | |
CN113689216A (en) | Cross-chain transaction processing method and device, equipment, storage medium and program product | |
CN114338682B (en) | Flow identity identification transmission method and device, electronic equipment and storage medium | |
WO2024146285A1 (en) | Blockchain-based data processing method, device, and readable storage medium | |
Chen et al. | FileWallet: A File Management System Based on IPFS and Hyperledger Fabric. | |
CN113987062A (en) | Data uplink storage method, system, device and storage medium | |
CN111695098A (en) | Multi-distributed cluster access method and device | |
CN109104472B (en) | Block chain network networking method, device, equipment and computer readable storage medium | |
CN113836573B (en) | User information processing method and device based on distributed storage | |
CN117097610A (en) | Block chain network access method, related device, storage medium and program product | |
CN115190483A (en) | Method and device for accessing network | |
CN115378605B (en) | Data processing method and device based on block chain | |
WO2024078108A1 (en) | Blockchain-based data processing method and apparatus, electronic device, computer-readable storage medium, and computer program product | |
CN118798879A (en) | Block chain data processing method, device, equipment and storage medium | |
CN116366272A (en) | Resource processing method, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |