CN114172671A - Method and device for adding block chain - Google Patents

Method and device for adding block chain Download PDF

Info

Publication number
CN114172671A
CN114172671A CN202010840195.6A CN202010840195A CN114172671A CN 114172671 A CN114172671 A CN 114172671A CN 202010840195 A CN202010840195 A CN 202010840195A CN 114172671 A CN114172671 A CN 114172671A
Authority
CN
China
Prior art keywords
node
block chain
request
joining request
joining
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
Application number
CN202010840195.6A
Other languages
Chinese (zh)
Inventor
朱江
高波
王森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010840195.6A priority Critical patent/CN114172671A/en
Publication of CN114172671A publication Critical patent/CN114172671A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic 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/3247Cryptographic 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 digital signatures

Abstract

The invention provides a method and a device for adding a block chain, which relate to the field of block chains, and the method comprises the following steps: acquiring a first node joining request, generating a node configuration file according to the first node joining request, and sending the node configuration file to a node to be joined so as to configure the node to be joined according to the node configuration file; and sending a second node joining request to the target block chain network so that other nodes in the target block chain network communicate with the node to be joined based on the second node joining request. The method of the embodiment of the invention enables the user to quickly join the block chain ecology on the premise of not needing the user to deeply understand the block chain technology.

Description

Method and device for adding block chain
Technical Field
The present invention relates to the field of block chain technology, and in particular, to a method and an apparatus for adding a block chain.
Background
A block chain is a chained data structure that is commonly maintained by multiple peer block chain nodes in a distributed database. Blockchains, which allow only nodes in an organization to read and send transactions and which collectively record transaction data, may be commonly managed by multiple organizations, each running one or more nodes.
At present, when a node is added into the block chain, professional technicians are required to perform complicated and complicated configuration and operation, and numerous organizations have poor understanding of the block chain technology, so that barriers are brought to the organization for adding the block chain ecology. How to enable the organization to be rapidly added into the block chain ecology is a problem to be urgently solved.
Disclosure of Invention
The invention aims to provide a method and a device for adding a block chain, so as to organize the ecology of the block chain which is added rapidly under the condition that the block chain technology is not deeply understood.
In a first aspect, an embodiment of the present invention provides a method for adding a blockchain. The method comprises the following steps:
acquiring a first node joining request, wherein the first node joining request is used for requesting to join a node to be joined to a target block chain network;
generating a node configuration file according to the first node joining request, and sending the node configuration file to the node to be joined so that the node to be joined is configured according to the node configuration file;
and sending a second node joining request to the target block chain network so that other nodes in the target block chain network communicate with the node to be joined based on the second node joining request.
In some optional implementations, the first node join request includes information of a node to be joined and a target blockchain network identifier; before generating the node profile according to the first node join request, the method further comprises:
determining target blockchain network information based on the target blockchain network identifier;
checking whether the first node joining request is legal or not based on the information of the node to be joined and the network information of the target block chain;
and if the first node joining request is legal, executing the step of generating the node configuration file according to the first node joining request.
In some optional implementations, generating the node profile according to the first node join request includes:
determining network resources of the node to be added in the target block chain network based on the target block chain network information and the node to be added information;
and generating a node configuration file based on the network resources so that the node to be added communicates in the target block chain network according to the network resources.
In some optional implementations, before sending the second node join request to the target blockchain network, after checking whether the first node join request is legal based on the information of the node to be joined and the information of the target blockchain network, the method further includes:
signing the first node joining request by using a private key to obtain signature information;
determining a second node joining request based on the first node joining request, the signature information and the public key.
In some optional implementations, the method further comprises:
receiving a verification result aiming at a second node joining request sent by other nodes in the target block chain network, and verifying the signature information by the other nodes in the target block chain network based on the public key to obtain the verification result;
and when the node to be joined is determined to fail to join based on the verification result, sending a rollback operation instruction to the node to be joined so that the node to be joined executes rollback operation.
In a second aspect, a method of joining a blockchain is provided. The method comprises the following steps:
sending a first node joining request to a BaaS platform so that the BaaS platform generates a node configuration file according to the first node joining request, wherein the first node joining request is used for requesting to join a target block chain network;
receiving a node configuration file sent by a BaaS platform;
and configuring according to the node configuration file so as to communicate in the target block chain network.
In a third aspect, a method of joining a blockchain is provided. The method comprises the following steps:
receiving a second node joining request sent by the BaaS platform, wherein the second node joining request comprises a first node joining request, signature information and a public key;
verifying the signature information to obtain a verification result based on the public key and a first node joining request, wherein the first node joining request is used for requesting to join in a target block chain network;
and if the verification result is legal, adding the node to be added into the target block chain network based on the first node adding request.
In some optional implementations, if the verification result is legal, adding the node to be added to the target blockchain network based on the first node adding request includes:
determining whether the ratio of the node in the target block chain network to the second node joining request with the verification result of legal reaches a preset value;
and determining the identifier of the node to be added, and adding the identifier of the node to be added into a permitted node list of the target block chain network.
In a fourth aspect, there is provided an apparatus for joining a blockchain, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first node joining request which is used for requesting to join a node to be joined to a target block chain network;
the generation module is used for generating a node configuration file according to the first node joining request and sending the node configuration file to the node to be joined so as to configure the node to be joined according to the node configuration file;
and the sending module is used for sending a second node joining request to the target block chain network so as to enable other nodes in the target block chain network to communicate with the node to be joined based on the second node joining request.
In a fifth aspect, an apparatus for joining a blockchain is provided. The device comprises:
the system comprises a sending module, a target block chain network and a service module, wherein the sending module is used for sending a first node joining request to a BaaS platform so that the BaaS platform generates a node configuration file according to the first node joining request, and the first node joining request is used for requesting to join in the target block chain network;
the receiving module is used for receiving the node configuration file sent by the BaaS platform;
and the configuration module is used for configuring according to the node configuration file so as to communicate in the target block chain network.
In a sixth aspect, an apparatus for adding a blockchain is provided. The device comprises:
the receiving module is used for receiving a second node joining request sent by the BaaS platform, wherein the second node joining request comprises a first node joining request, signature information and a public key;
the verification module is used for verifying the signature information to obtain a verification result based on the public key and a first node joining request, wherein the first node joining request is used for requesting to join in the target block chain network;
and the joining module is used for joining the node to be joined into the target block chain network based on the first node joining request if the verification result is legal.
In a seventh aspect, an electronic device provided in an embodiment of the present invention includes a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor executes the machine-executable instructions to implement the above method for joining a blockchain.
In an eighth aspect, embodiments of the invention provide a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement a method of joining a blockchain as above.
In the method and the apparatus for joining a block chain according to the embodiments of the present invention, a first node joining request may be obtained, a node configuration file may be generated according to the first node joining request, and the node configuration file may be sent to a node to be joined, so that the node to be joined may be configured according to the node configuration file; and sending a second node joining request to the target block chain network so that other nodes in the target block chain network communicate with the node to be joined based on the second node joining request. When the node to be added is added into the block chain, the node to be added can be realized through a BaaS platform, so that the operation of a user is reduced, the user can rapidly add into the block chain ecology and participate in the block chain transaction.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a method for adding a blockchain according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another method for adding a blockchain according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another method for adding a blockchain according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for adding a block chain according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another apparatus for adding a blockchain according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another apparatus for adding a blockchain according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Currently, when a node joins a blockchain, a series of operations such as node configuration, join request verification, node joining a blockchain network and the like need to be realized in steps, and although existing blockchain frameworks (for example, Fabric and the like) provide many tools and examples for the operations, still a professional is required to perform complicated and complicated configuration and operation. However, most organizations have poor understanding of the blockchain technology, which brings obstacles to users to join the blockchain ecology, and how to rapidly join the organizations into the blockchain ecology is a problem to be solved urgently. Based on this, the method and the device for joining the blockchain provided by the embodiment of the invention do not need a user to deeply understand the blockchain technology, but realize a series of operations such as node configuration, joining request verification, node joining the blockchain network and the like through the BaaS platform, thereby reducing the user operation, enabling the user to rapidly join the blockchain ecology and participate in the blockchain transaction. In addition, visualization can be realized through the BaaS platform in the process of adding the node into the block chain network, so that the running state and the operation result of the node one-key adding process can be intuitively known in real time.
For the convenience of understanding the embodiments of the present invention, a method for adding a blockchain according to the embodiments of the present invention will be described in detail below.
BaaS (Blockchain as a Service) is a Service that is used to help users create, manage, and maintain enterprise-level Blockchain networks and applications in conjunction with Blockchain technology. The main uses of BaaS are: the method can quickly establish the required block chain application environment and provide a series of operation services such as search query, transaction, data analysis and the like based on the block chain network. The embodiment of the invention realizes the purpose of rapidly adding block chain ecology by a user based on BaaS.
Fig. 1 shows a flowchart of a method for joining a blockchain according to an embodiment of the present invention. Referring to fig. 1, a method for adding a block chain provided in an embodiment of the present invention is applied to a BaaS platform, and the method includes the following steps:
s110, acquiring a first node joining request, wherein the first node joining request is used for requesting to join a node to be joined to a target block chain network;
the user to which the node to be added belongs can log in the BaaS platform through the user terminal to initiate the first node adding request by one key, the BaaS platform receives the first node adding request, and the node to be added can be the user terminal or other nodes.
The first node join request may include information of a node to be joined and a target blockchain network identification. The information of the node to be added and the target blockchain network identifier may be determined based on an operation of the user on the BaaS platform, where the operation may include selecting, filling, and the like.
The information of the node to be joined may include a joining feature, and the joining feature may include a feature attribute of the node, for example, the feature attribute of the node may include information such as a node identification, a physical address, a network address, and the like.
The target blockchain network identifier may include a name of a blockchain to be joined, an identifier of the blockchain to be joined, and the like, and the target blockchain network identifier is used to specify a target blockchain network to be joined.
For example, the first node join request may include a join instruction and a join feature, wherein the join instruction may include a target blockchain network identification.
In some embodiments, the first node join request may also be checked. For example, target blockchain network information may be determined based on the target blockchain network identification; checking whether the first node joining request is legal or not based on the information of the node to be joined and the network information of the target block chain; if the first node join request is legitimate, step S120 is performed.
For example, when verifying whether the first node join request is legal, the BaaS platform may verify the content of the first node join request, for example, may verify a user name, a user identifier, a node identifier, a name of a to-be-joined block chain, an identifier of the to-be-joined block chain, or may verify information of the to-be-joined node based on a requirement of a target block chain network, so as to verify whether the information of the to-be-joined node meets the requirement of the target block chain network, where the requirement of the target block chain network may include one or more of a region requirement, a reputation requirement, a processing capability requirement, and the like, and may be specifically determined according to actual needs. If the verification is not legal, prompt information can be sent to the user equipment to prompt the user to modify the related parameters.
S120, generating a node configuration file according to the first node joining request, and sending the node configuration file to the node to be joined so that the node to be joined is configured according to the node configuration file;
determining network resources of a node to be added in the target block chain network based on the target block chain network information and the node to be added information; and generating a node configuration file based on the network resources so that the node to be added communicates in the target block chain network according to the network resources.
The content of the configuration file may include information such as a node identifier, a node type, a host name, and a domain name of the node to be added. The BaaS platform sends a node configuration file to a node to be added, so that the node to be added reads the configuration file, loads a corresponding plug-in the node, initializes a node program and the plug-in, then starts the node program and the plug-in, resets a network state and a communication protocol service state of the node, monitors and connects a blockchain network to be added, and can establish a secure communication channel with the blockchain network by using a technology meeting a password standard. In addition, the node to be added can generate a public key and private key pair, and the private key of the node to be added is stored in the encryption database, so that the security of the private key is ensured, the public key can be used for encryption, and the private key can be used for signature.
S130, sending a second node joining request to the target block chain network so that other nodes in the target block chain network communicate with the node to be joined based on the second node joining request.
The second node joining request may include notarization information of the BaaS platform. For example, the BaaS platform may sign the first node join request using a private key to obtain signature information; determining a second node joining request based on the first node joining request, the signature information and the public key.
For example, the first node join request may be digitally signed using RSA (Rivest Shamir Adleman), DSA (Digital Signature Algorithm), or ECDSA Elliptic curve Digital Signature Algorithm, etc., where ECDSA is a combination of ECC (Elliptic curve Cryptography) and DSA.
After each node in the block chain network receives the first node joining request, the signature information and the public key of the node to be joined, the public key of the node to be joined is used for decrypting the signature information to obtain decrypted summary information, then the HASH function is used for generating the summary information of the first node joining request, and the decrypted summary information is compared with the generated summary information, so that identity verification is carried out on the node to be joined. In addition, the initial information in the account book data can be compared, the validity of the first node joining request is verified, if the verification results of all nodes in the block chain network are agreed, the node to be joined is approved to join the block chain network after the identity of the node to be joined is confirmed, the node to be joined is added to the block chain member, the node identification is added to a local permission list, the record is submitted, and a new block is generated. And at this point, the node to be added is finally added into the block chain network. If the identity of the node to be joined is not confirmed, it is not allowed to join the blockchain network. And finally, the block chain network returns the adding result of the node to be added to the BaaS platform.
The BaaS platform can receive a verification result aiming at a second node joining request sent by other nodes in the target block chain network; and when the node to be joined is determined to fail to join based on the verification result, sending a rollback operation instruction to the node to be joined so that the node to be joined executes rollback operation.
In order to facilitate the user to intuitively know the joining state of the node to be joined, the BaaS platform may further display the joining state of the node to be joined, that is, the joining is successful or fails.
In addition, if the node to be added fails to join the blockchain, the BaaS platform may also send a rollback operation instruction to the node to be added, so that the node to be added executes a rollback operation, thereby recovering a state before the blockchain network to be added is connected. At this time, the BaaS platform may monitor the operating state of the node to be joined and send a prompt to the node to be joined.
When the node to be added in the embodiment is added into the blockchain, a user does not need to deeply know the blockchain technology, but a series of operations such as node configuration, addition request verification, node addition into the blockchain network and the like are realized through the BaaS platform, so that the user operation is reduced, the user can rapidly add into the blockchain ecology and participate in the blockchain transaction.
In addition, a series of operations such as node configuration, join request verification, node joining in a block chain network and the like can be realized through the BaaS platform, whether the node joins in the block chain or not can be displayed through the BaaS platform, and the running state of the node can be monitored. Even if the node is abnormal in the joining process, the node can be rolled back quickly without influencing the existing states of the node and the block chain. Visualization is realized through the BaaS platform in the whole operation process, so that the running state and the operation result of the node one-key adding process can be intuitively known in real time.
Fig. 2 is a schematic flow chart of another method for adding a blockchain according to an embodiment of the present invention. The method can be applied to a node to be added, and the node to be added can be matched with the BaaS platform to realize the addition of the block chain. As shown in fig. 2, the method comprises the steps of:
and S210, sending a first node joining request to the BaaS platform so that the BaaS platform generates a node configuration file according to the first node joining request.
Wherein the first node joining request is used for requesting to join the target block chain network; for the first node join request, reference may be made to the related description in the embodiment shown in fig. 1, and details are not described here.
And S220, receiving the node configuration file sent by the BaaS platform.
The configuration file is the same as the configuration file in the embodiment shown in fig. 1, and can be understood by referring to each other.
And S230, configuring according to the node configuration file so as to communicate in the target block chain network.
After the configuration is performed according to the configuration file, the node to be joined can be considered to have the capability of performing communication in the target blockchain network. For example, the configuration file may include network resources allocated to the to-be-joined node according to which the to-be-joined node may communicate in the target blockchain network.
For example, after the node to be joined reads the configuration file, the corresponding plug-in the node may be loaded, and the node program and the plug-in are initialized, and then the node program and the plug-in are started, the network state and the communication protocol service state of the node are reset, and then the node to be joined is monitored and connected to the blockchain network. Additionally, techniques that conform to cryptographic standards may be used to establish secure communication channels with the blockchain network. Meanwhile, the node to be added generates a public key and private key pair, and the private key of the public key and private key pair is stored in the encryption database, so that the safety of the private key is ensured.
In the embodiment, the node to be added realizes node configuration through the BaaS platform, a user does not need to deeply know the block chain technology, the operation of the user is reduced, and the user can conveniently and quickly add the block chain ecology.
In some embodiments, the method may further comprise the steps of:
step 1) receiving a rollback operation instruction sent by a BaaS platform;
and step 2) executing the rollback operation according to the rollback operation instruction so as to recover the state before connecting the to-be-added block chain network.
Fig. 3 is a schematic flow chart of another method for adding a blockchain according to an embodiment of the present invention. The method can be applied to nodes in a target block chain network, in the process of adding the block chain, the nodes in the target block chain network can also be called verification nodes or other nodes, and the verification nodes are matched with the nodes to be added and the BaaS platform to realize the addition of the block chain. As shown in fig. 3, the method comprises the steps of:
and S310, receiving a second node joining request sent by the BaaS platform. The second node join request includes the first node join request, signature information, and a public key.
This second node join request is the same as in the previously described embodiment shown in fig. 1 and can be understood by cross-reference.
S320, verifying the signature information to obtain a verification result based on the public key and a first node joining request, wherein the first node joining request is used for requesting to join in the target block chain network;
after each node in the block chain network receives the first node joining request, the signature information and the public key of the node to be joined, the public key of the node to be joined is used for decrypting the signature information to obtain decrypted summary information, then the HASH function is used for generating the summary information of the first node joining request, and the decrypted summary information is compared with the generated summary information, so that identity verification is carried out on the node to be joined. In addition, the validity of the first node joining request can be verified by comparing the initial information in the ledger data.
S330, if the verification result is legal, adding the node to be added into the target block chain network based on the first node adding request.
If the verification results of the nodes in the blockchain network are agreed, the node to be added is approved to be added into the blockchain network after the identity of the node to be added is confirmed, the node to be added is added into the blockchain member, the node identification of the node to be added is added into a local permission list, a record is submitted, and a new block is generated. And at this point, the node to be added is finally added into the block chain network. If the identity of the node to be joined is not confirmed, it is not allowed to join the blockchain network. And finally, the block chain network returns the adding result of the node to be added to the BaaS platform. For example, whether the ratio of the node in the target block chain network to the node in the second node joining request that is verified as being legal reaches a preset value can be determined; and determining the identifier of the node to be added, and adding the identifier of the node to be added into a permitted node list of the target block chain network. The reaching of the preset value can be determined according to actual needs, for example, the reaching of the preset value can mean more than half of the number.
In the embodiment, the node to be added realizes node configuration through the BaaS platform, a user does not need to deeply know the block chain technology, the operation of the user is reduced, and the user can conveniently and quickly add the block chain ecology.
Fig. 4 is a schematic structural diagram of a device for adding a block chain according to an embodiment of the present invention, which is applied to a BaaS platform, and as shown in fig. 4, the device includes:
an obtaining module 401, configured to obtain a first node join request, where the first node join request is used to request that a node to be joined is joined to a target block link network;
a generating module 402, configured to generate a node configuration file according to the first node joining request, and send the node configuration file to the node to be joined, so that the node to be joined performs configuration according to the node configuration file;
a sending module 403, configured to send a second node join request to the target blockchain network, so that other nodes in the target blockchain network communicate with the node to be joined based on the second node join request.
In some embodiments, the first node join request includes information of a node to be joined and a target blockchain network identifier; further comprising a verification module for:
determining target blockchain network information based on the target blockchain network identifier;
checking whether the first node joining request is legal or not based on the information of the node to be joined and the network information of the target block chain;
and if the first node joining request is legal, executing the step of generating the node configuration file according to the first node joining request.
In some embodiments, the generating module 402 is specifically configured to:
determining network resources of the node to be added in the target block chain network based on the target block chain network information and the node to be added information;
and generating a node configuration file based on the network resources so that the node to be added communicates in the target block chain network according to the network resources.
In some embodiments, further comprising a signature module to:
signing the first node joining request by using a private key to obtain signature information;
determining a second node joining request based on the first node joining request, the signature information and the public key.
In some embodiments, further comprising:
the receiving module is used for receiving a verification result aiming at the second node joining request sent by other nodes in the target block chain network, and the other nodes in the target block chain network verify the signature information based on the public key to obtain the verification result;
the sending module 403 is further configured to send a rollback operation instruction to the node to be joined to enable the node to be joined to perform a rollback operation when it is determined that the node to be joined fails to join based on the verification result.
The device for adding a block chain provided by the embodiment of the application has the same technical characteristics as the method for adding a block chain provided by the embodiment shown in fig. 1, so that the same technical problems can be solved, and the same technical effects can be achieved.
Fig. 5 is a schematic structural diagram of another apparatus for joining a blockchain according to an embodiment of the present invention, which is applied to a node to be joined, and as shown in fig. 5, the apparatus may include:
a sending module 501, configured to send a first node joining request to a BaaS platform, so that the BaaS platform generates a node configuration file according to the first node joining request, where the first node joining request is used to request to join in a target block link network;
a receiving module 502, configured to receive a node configuration file sent by a BaaS platform;
a configuration module 503, configured according to the node configuration file, to enable communication in the target blockchain network.
The device for adding a block chain provided by the embodiment of the application has the same technical characteristics as the method for adding a block chain provided by the embodiment shown in fig. 2, so that the same technical problems can be solved, and the same technical effects can be achieved.
Fig. 6 also provides another schematic structural diagram of an apparatus for joining a blockchain, which is applied to a node to be joined, and as shown in fig. 6, the apparatus may include:
a receiving module 601, configured to receive a second node joining request sent by a BaaS platform, where the second node joining request includes a first node joining request, signature information, and a public key;
a verification module 602, configured to verify the signature information to obtain a verification result based on the public key and a first node join request, where the first node join request is used to request to join in the target blockchain network;
and a joining module 603, configured to join the node to be joined to the target blockchain network based on the first node joining request if the verification result is legal.
In some embodiments, the adding module 603 is specifically configured to:
determining whether the ratio of the node in the target block chain network to the second node joining request with the verification result of legal reaches a preset value;
and determining the identifier of the node to be added, and adding the identifier of the node to be added into a permitted node list of the target block chain network.
The device for adding a block chain provided by the embodiment of the application has the same technical characteristics as the method for adding a block chain provided by the embodiment shown in fig. 3, so that the same technical problems can be solved, and the same technical effects can be achieved.
Referring to fig. 7, an embodiment of the present invention further provides an electronic device 700, including: a processor 701, a memory 702, a bus 703 and a communication interface 704, wherein the processor 701, the communication interface 704 and the memory 702 are connected through the bus 703; the memory 702 is used to store programs; the processor 701 is configured to call a program stored in the memory 702 through the bus 703 to execute the method for joining a blockchain according to the above-described embodiment.
The Memory 702 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 704 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 703 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The memory 702 is used for storing a program, and the processor 701 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701.
The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
Embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above method of joining a blockchain.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (13)

1. A method of joining a blockchain, the method comprising:
acquiring a first node joining request, wherein the first node joining request is used for requesting a node to be joined to a target block chain network;
generating a node configuration file according to the first node joining request, and sending the node configuration file to the node to be joined so that the node to be joined is configured according to the node configuration file;
and sending a second node joining request to the target block chain network so that other nodes in the target block chain network communicate with the node to be joined based on the second node joining request.
2. The method of claim 1, wherein the first node join request comprises information of a node to be joined and a target blockchain network identifier; before generating a node profile according to the first node join request, the method further comprises:
determining target blockchain network information based on the target blockchain network identification;
checking whether the first node joining request is legal or not based on the information of the node to be joined and the network information of the target block chain;
and if the first node joining request is legal, executing the step of generating a node configuration file according to the first node joining request.
3. The method of claim 2, wherein generating a node profile based on the first node join request comprises:
determining network resources of the node to be added in the target block chain network based on the target block chain network information and the node to be added information;
and generating a node configuration file based on the network resources so that the node to be added communicates in the target block chain network according to the network resources.
4. The method of claim 2, wherein before sending the second node join request to the target blockchain network, after checking whether the first node join request is legitimate based on the node information to be joined and the target blockchain network information, the method further comprises:
signing the first node joining request by using a private key to obtain signature information;
determining the second node joining request based on the first node joining request, the signature information and a public key.
5. The method of claim 4, further comprising:
receiving a verification result aiming at the second node joining request sent by other nodes in the target block chain network, wherein the other nodes in the target block chain network verify the signature information based on the public key to obtain the verification result;
and when the node to be added is determined to fail to be added based on the verification result, sending a rollback operation instruction to the node to be added so that the node to be added executes rollback operation.
6. A method of joining a blockchain, the method comprising:
sending a first node joining request to a BaaS platform so that the BaaS platform generates a node configuration file according to the first node joining request, wherein the first node joining request is used for requesting to join a target block chain network;
receiving the node configuration file sent by the BaaS platform;
and configuring according to the node configuration file so as to communicate in the target block chain network.
7. A method of joining a blockchain, the method comprising:
receiving a second node joining request sent by a BaaS platform, wherein the second node joining request comprises a first node joining request, signature information and a public key;
verifying the signature information to obtain a verification result based on the public key and the first node joining request, wherein the first node joining request is used for requesting to join in a target block chain network;
and if the verification result is legal, adding the node to be added into the target block chain network based on the first node adding request.
8. The method of claim 7, wherein if the verification result is legal, joining the node to be joined to the target blockchain network based on the first node joining request comprises:
determining whether the ratio of the node in the target block chain network to the second node joining request with the verification result of legal reaches a preset value;
and determining the identifier of the node to be added, and adding the identifier of the node to be added into a permitted node list of the target block chain network.
9. An apparatus for joining a blockchain, the apparatus comprising:
the node joining method comprises the steps that an obtaining module is used for obtaining a first node joining request, wherein the first node joining request is used for requesting a node to be joined to a target block chain network;
a generating module, configured to generate a node configuration file according to the first node joining request, and send the node configuration file to the node to be joined, so that the node to be joined performs configuration according to the node configuration file;
a sending module, configured to send a second node join request to the target blockchain network, so that other nodes in the target blockchain network communicate with the node to be joined based on the second node join request.
10. An apparatus for joining a blockchain, the apparatus comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a first node joining request to a BaaS platform so that the BaaS platform generates a node configuration file according to the first node joining request, and the first node joining request is used for requesting to join a target block chain network;
the receiving module is used for receiving the node configuration file sent by the BaaS platform;
and the configuration module is used for configuring according to the node configuration file so as to communicate in the target block chain network.
11. An apparatus for joining a blockchain, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a second node joining request sent by a BaaS platform, and the second node joining request comprises a first node joining request, signature information and a public key;
the verification module is used for verifying the signature information to obtain a verification result based on the public key and the first node joining request, wherein the first node joining request is used for requesting to join in a target block chain network;
and the joining module is used for joining the node to be joined into the target block chain network based on the first node joining request if the verification result is legal.
12. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to perform the method of any of claims 1-8.
13. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1-8.
CN202010840195.6A 2020-08-19 2020-08-19 Method and device for adding block chain Pending CN114172671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010840195.6A CN114172671A (en) 2020-08-19 2020-08-19 Method and device for adding block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010840195.6A CN114172671A (en) 2020-08-19 2020-08-19 Method and device for adding block chain

Publications (1)

Publication Number Publication Date
CN114172671A true CN114172671A (en) 2022-03-11

Family

ID=80475372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010840195.6A Pending CN114172671A (en) 2020-08-19 2020-08-19 Method and device for adding block chain

Country Status (1)

Country Link
CN (1) CN114172671A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190049931A1 (en) * 2017-12-28 2019-02-14 Intel Corporation Systems, apparatus, and methods for robot swarm coordination
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center
CN110519246A (en) * 2019-08-15 2019-11-29 安徽师范大学 Based on the degree of belief calculation method for trusting block chain link point
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium
CN111222174A (en) * 2019-12-31 2020-06-02 远光软件股份有限公司 Joining method, verification method, device and storage medium of block chain node
CN111277647A (en) * 2020-01-19 2020-06-12 北京百度网讯科技有限公司 Block chain network member management method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190049931A1 (en) * 2017-12-28 2019-02-14 Intel Corporation Systems, apparatus, and methods for robot swarm coordination
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center
CN110519246A (en) * 2019-08-15 2019-11-29 安徽师范大学 Based on the degree of belief calculation method for trusting block chain link point
CN111222174A (en) * 2019-12-31 2020-06-02 远光软件股份有限公司 Joining method, verification method, device and storage medium of block chain node
CN111277647A (en) * 2020-01-19 2020-06-12 北京百度网讯科技有限公司 Block chain network member management method, device, equipment and medium
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHUOHUANGHAN7401: "蚂蚁区块链BaaS:开放在云端,落地于实体", pages 1 - 3, Retrieved from the Internet <URL:http://t.csdnimg.cn/JlF2j> *

Similar Documents

Publication Publication Date Title
CN112446785B (en) Cross-chain transaction method, system, device, equipment and storage medium
CN110378139B (en) Data key protection method, system, electronic equipment and storage medium
CN110177124B (en) Identity authentication method based on block chain and related equipment
CN110874494B (en) Method, device and system for processing password operation and method for constructing measurement trust chain
CN108805571B (en) Data protection method, platform, block chain node, system and storage medium
CN112788036B (en) Identity verification method and device
EP2852118A1 (en) Method for an enhanced authentication and/or an enhanced identification of a secure element located in a communication device, especially a user equipment
CN113055188B (en) Data processing method, device, equipment and storage medium
CN110570196A (en) Transaction data processing method and device, terminal equipment and storage medium
CN112989426B (en) Authorization authentication method and device, and resource access token acquisition method
CN104715183A (en) Trusted verifying method and equipment used in running process of virtual machine
US20210241270A1 (en) System and method of blockchain transaction verification
CN110990484A (en) Block chain based information storage method and system, computer equipment and storage medium
CN105743854A (en) Security authentication system and method
CN110191467B (en) Authentication method, equipment, device and storage medium for Internet of things equipment
CN111414640A (en) Key access control method and device
CN111241492A (en) Product multi-tenant secure credit granting method, system and electronic equipment
CN110798432A (en) Security authentication method, device and system and mobile terminal
CN112632573A (en) Intelligent contract execution method, device and system, storage medium and electronic equipment
WO2017059737A1 (en) Method and device for verifying validity of identity of entity
CN114172671A (en) Method and device for adding block chain
CN112865981B (en) Token acquisition and verification method and device
CN112003705B (en) Identity authentication method and device based on zero-knowledge proof
CN112184440A (en) Data processing method, data processing device, node equipment and storage medium
CN112925535A (en) Method and device for installing embedded application of password chip

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