Method and device for joining blockchain

Through the BaaS platform, the configuration and verification of blockchain nodes is simplified, and the problem of difficulty for organizations to quickly join the blockchain ecosystem is solved, a fast and simplified blockchain joining process is realized, and real-time operation status monitoring is provided.

CN114172671BActive Publication Date: 2024-11-26BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010840195.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2024-11-26
Estimated Expiration
2040-08-19

AI Technical Summary

Technical Problem

In the existing technology, organizations joining the blockchain ecosystem requires professional and technical personnel to perform cumbersome and complex configurations and operations, making it difficult for organizations with poor understanding of blockchain technology to join quickly.

Method used

Through the BaaS platform, node configuration, join request verification and node joining the blockchain network operation is realized, reducing user operations, allowing users to quickly join the blockchain ecosystem, and monitoring the node's joining process and results in real time through the visual interface.

Benefits of technology

Without users needing to have an in-depth understanding of blockchain technology, the BaaS platform can quickly join the blockchain ecosystem, simplifying the node configuration and verification process, reducing operational complexity, and providing real-time operational status and result monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114172671B_ABST
    Figure CN114172671B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for joining a blockchain, and relates to the field of blockchain. The method comprises: obtaining a first node joining request, 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; sending a second node joining request to a target blockchain network, so that other nodes in the target blockchain network communicate with the node to be joined based on the second node joining request. The method of the embodiment of the present invention enables users to quickly join the blockchain ecosystem without requiring users to have a deep understanding of blockchain technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method and device for joining a blockchain. Background Art

[0002] Blockchain is a chain data structure maintained by multiple peer-to-peer blockchain nodes in a distributed database. Blockchain can be jointly managed by multiple organizations, each of which runs one or more nodes. The blockchain only allows nodes in the organization to read and send transactions and jointly record transaction data.

[0003] At present, when nodes join the above blockchains, professional technicians need to perform tedious and complex configuration and operation, and many organizations do not have a deep understanding of blockchain technology, which brings obstacles to organizations joining the blockchain ecosystem. How to enable organizations to quickly join the blockchain ecosystem is an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to provide a method and device for joining a blockchain, so that an organization can quickly join the blockchain ecosystem without having a deep understanding of blockchain technology.

[0005] In a first aspect, an embodiment of the present invention provides a method for joining a blockchain. The method includes:

[0006] Obtaining a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network;

[0007] 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 is configured according to the node configuration file;

[0008] A second node joining request is sent 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 joining request.

[0009] In some optional implementations, the first node joining request includes information of the node to be joined and an identifier of the target blockchain network; before generating a node configuration file according to the first node joining request, the method further includes:

[0010] Determine the target blockchain network information based on the target blockchain network identifier;

[0011] Verify whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information;

[0012] If the first node joining request is legal, the step of generating a node configuration file according to the first node joining request is performed.

[0013] In some optional implementations, generating a node configuration file according to the first node joining request includes:

[0014] Based on the target blockchain network information and the information of the node to be added, determine the network resources of the node to be added in the target blockchain network;

[0015] Generate a node configuration file based on network resources so that the nodes to be joined can communicate in the target blockchain network according to network resources.

[0016] In some optional implementations, before sending the second node joining request to the target blockchain network, after verifying whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information, the method further includes:

[0017] Use the private key to sign the first node joining request to obtain signature information;

[0018] Based on the first node joining request, the signature information and the public key, a second node joining request is determined.

[0019] In some optional implementations, the method further includes:

[0020] Receiving a verification result of the second node joining request sent by other nodes in the target blockchain network, and the other nodes in the target blockchain network verify the signature information based on the public key to obtain a verification result;

[0021] When it is determined based on the verification result that the node to be joined fails to join, a rollback operation instruction is sent to the node to be joined, so that the node to be joined performs a rollback operation.

[0022] In the second aspect, a method for joining a blockchain is provided. The method includes:

[0023] 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 to request to join the target blockchain network;

[0024] Receive the node configuration file sent by the BaaS platform;

[0025] Configure according to the node configuration file to enable communication in the target blockchain network.

[0026] In the third aspect, a method for joining a blockchain is provided. The method includes:

[0027] Receive a second node joining request sent by the BaaS platform, where the second node joining request includes the first node joining request, signature information, and a public key;

[0028] Based on the public key and the first node joining request, verify the signature information to obtain a verification result, wherein the first node joining request is used to request to join the target blockchain network;

[0029] If the verification result is legal, the node to be joined will be added to the target blockchain network based on the first node joining request.

[0030] 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 joining request includes:

[0031] Determine whether the proportion of nodes in the target blockchain network that verify the second node's joining request as legitimate reaches a preset value;

[0032] Determine the identity of the node to be added, and add the identity of the node to be added to the list of permitted nodes of the target blockchain network.

[0033] In a fourth aspect, a device for joining a blockchain is provided, the device comprising:

[0034] An acquisition module, used to acquire a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network;

[0035] 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 is configured according to the node configuration file;

[0036] The sending module is used to send a second node joining 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 joining request.

[0037] In a fifth aspect, a device for joining a blockchain is provided. The device includes:

[0038] A sending module, used to send 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 to request to join the target blockchain network;

[0039] A receiving module, used to receive the node configuration file sent by the BaaS platform;

[0040] The configuration module is used to configure according to the node configuration file to enable communication in the target blockchain network.

[0041] In a sixth aspect, a device for joining a blockchain is provided. The device includes:

[0042] A receiving module, used to receive a second node joining request sent by the BaaS platform, where the second node joining request includes the first node joining request, signature information, and a public key;

[0043] A verification module, configured to verify the signature information based on the public key and the first node joining request to obtain a verification result, wherein the first node joining request is used to request to join the target blockchain network;

[0044] The joining module is used 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.

[0045] In a seventh aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor executing the machine-executable instructions to implement the above method of joining a blockchain.

[0046] In an eighth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above method of joining a blockchain.

[0047] In the above-mentioned method and device for joining a blockchain provided by an embodiment of the present invention, a first node joining request can be obtained, a node configuration file can be generated according to the first node joining request, and the node configuration file can be sent to the node to be joined, so that the node to be joined is configured according to the node configuration file; a second node joining request is sent 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 joining request. When the above-mentioned node to be joined joins the blockchain, it can be implemented through the BaaS platform, reducing the user's operations, allowing the user to quickly join the blockchain ecosystem and participate in blockchain transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A flowchart of a method for joining a blockchain provided by an embodiment of the present invention;

[0050] Figure 2 A flowchart of another method for joining a blockchain provided by an embodiment of the present invention;

[0051] Figure 3 A flowchart of another method for joining a blockchain provided by an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of the structure of a device for joining a blockchain provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of another device structure for joining a blockchain provided by an embodiment of the present invention;

[0054] Figure 6 A schematic diagram of another device structure for joining a blockchain provided by an embodiment of the present invention;

[0055] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] At present, when a node joins a blockchain, it is necessary to implement a series of operations such as node configuration, join request verification, and node joining the blockchain network in steps. Although some existing blockchain frameworks (such as Fabric, etc.) provide many tools and examples for these operations, professional technicians are still required to perform cumbersome and complex configuration and operations. However, most organizations do not have a deep understanding of blockchain technology, which brings obstacles to users joining the blockchain ecosystem. How to enable organizations to quickly join the blockchain ecosystem is an urgent problem to be solved. Based on this, a method and device for joining a blockchain provided by an embodiment of the present invention does not require users to have a deep understanding of blockchain technology, but implements a series of operations such as node configuration, join request verification, and node joining the blockchain network through the BaaS platform, reducing user operations, allowing users to quickly join the blockchain ecosystem, and participate in blockchain transactions. In addition, in the process of nodes joining the blockchain network, visualization can be achieved through the BaaS platform, so that the running status and operation results of the node one-click joining process can be understood in real time and intuitively.

[0058] To facilitate understanding of the embodiments of the present invention, a method for joining a blockchain provided by an embodiment of the present invention is first introduced in detail below.

[0059] BaaS (Blockchain as a Service) is a service that combines blockchain technology to help users create, manage and maintain enterprise-level blockchain networks and applications. The main purpose of BaaS is to quickly establish the required blockchain application environment and provide a series of operational services such as search query, transaction, data analysis, etc. based on the blockchain network. The embodiment of the present invention achieves the purpose of users quickly joining the blockchain ecosystem based on BaaS.

[0060] Figure 1 A flowchart of a method for joining a blockchain provided by an embodiment of the present invention is shown. Figure 1 , a method for joining a blockchain provided by an embodiment of the present invention is applied to a BaaS platform, and the method comprises the following steps:

[0061] S110, obtaining a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network;

[0062] Among them, the user of the node to be joined can log in to the BaaS platform through the user terminal to initiate a first node joining request with one click, and the BaaS platform will receive the first node joining request. The node to be joined can be the user terminal or other nodes.

[0063] The first node joining request may include information of the node to be joined and a target blockchain network identifier. The information of the node to be joined and the target blockchain network identifier may be determined based on the user's operation on the BaaS platform, which operation may include selection, filling in, etc.

[0064] The information of the node to be added may include a joining feature, and the joining feature may include a characteristic attribute of the node. For example, the characteristic attribute of the node may include information such as a node identifier, a physical address, and a network address.

[0065] The target blockchain network identifier may include the name of the blockchain to be joined, the identifier of the blockchain to be joined, etc. The target blockchain network identifier is used to specify the target blockchain network to be joined.

[0066] For example, the first node joining request may include a joining instruction and a joining feature, wherein the joining instruction may include a target blockchain network identifier.

[0067] In some embodiments, the first node joining request may also be verified. For example, the target blockchain network information may be determined based on the target blockchain network identifier; the first node joining request may be verified to be legal based on the to-be-joined node information and the target blockchain network information; if the first node joining request is legal, step S120 is executed.

[0068] For example, when verifying whether the first node joining request is legal, the BaaS platform can verify the content of the first node joining request, for example, the user name, user ID, node ID, name of the blockchain to be joined, ID of the blockchain to be joined, etc. can be verified, or the information of the node to be joined can be verified based on the requirements of the target blockchain network, so as to verify whether the information of the node to be joined meets the requirements of the target blockchain network, and the requirements of the target blockchain network can include one or more of the geographical requirements, reputation requirements, and processing capacity requirements, etc., which can be determined according to actual needs. If the verification is illegal, a prompt message can be sent to the user device to prompt the user to modify the relevant parameters.

[0069] 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;

[0070] Based on the target blockchain network information and the information of the node to be joined, the network resources of the node to be joined in the target blockchain network can be determined; a node configuration file can be generated based on the network resources so that the node to be joined can communicate in the target blockchain network according to the network resources.

[0071] The content of the configuration file may include the node identification, node type, host name, domain name and other information of the node to be added. The BaaS platform sends the node configuration file to the node to be added, so that after the node to be added reads the configuration file, it loads the corresponding plug-in in the node, initializes the node program and plug-in, then starts the node program and plug-in, resets the network status and the communication protocol service status of the node, and then monitors and connects to the blockchain network to be added. It can use cryptographic standards-compliant technology to establish a secure communication channel with the blockchain network. In addition, the node to be added can generate a public key and private key pair, and save the private key of the node to be added in an encrypted database to ensure the security of the private key. The public key can be used for encryption, and the private key can be used for signing.

[0072] S130, sending a second node joining 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 joining request.

[0073] The second node joining request may include notarization information of the BaaS platform. For example, the BaaS platform may use a private key to sign the first node joining request to obtain signature information; based on the first node joining request, signature information and public key, determine the second node joining request.

[0074] For example, the first node joining request may be digitally signed using RSA (Rivest Shamir Adleman, asymmetric encryption algorithm), DSA (Digital Signature Algorithm), or ECDSA elliptic curve digital signature algorithm, where ECDSA is a combination of ECC (Elliptic Curves Cryptography) and DSA.

[0075] When each node in the blockchain network receives the first node joining request, signature information and the public key of the node to be joined, the signature information is decrypted using the public key of the node to be joined to obtain the decrypted summary information, and then the summary information of the first node joining request is generated using the HASH function, and the decrypted summary information is compared with the generated summary information to authenticate the node to be joined. In addition, the initial information in the ledger data can also be compared to verify the legitimacy of the first node joining request. If the verification results of each node in the blockchain network reach a consensus, the node to be joined can be approved to join the blockchain network after confirming the identity of the node to be joined, and the node to be joined can be added to the blockchain members, and its node identification can be added to the local permission list, and the record is submitted and a new block is generated. At this point, the node to be joined finally joins the blockchain network. If the identity of the node to be joined is not confirmed, it is not allowed to join the blockchain network. Finally, the blockchain network returns the joining result of the node to be joined to the BaaS platform.

[0076] The BaaS platform can receive the verification results of the second node joining request sent by other nodes in the target blockchain network; when it is determined based on the verification results that the joining of the node to be joined fails, a rollback operation instruction is sent to the node to be joined, so that the node to be joined performs a rollback operation.

[0077] In order to help users intuitively understand the joining status of the node to be joined, the BaaS platform can also display the joining status of the node to be joined, that is, joining success or joining failure.

[0078] In addition, if the node to be added fails to join the blockchain, the BaaS platform can also send a rollback operation instruction to the node to be added, so that the node to be added performs a rollback operation, thereby restoring the state before connecting to the blockchain network to be added. At this time, the BaaS platform can monitor the operating status of the node to be added and issue a prompt to the node to be added.

[0079] In this embodiment, when the above-mentioned node to be joined joins the blockchain, the user does not need to have an in-depth understanding of blockchain technology. Instead, a series of operations such as node configuration, joining request verification, and node joining the blockchain network are implemented through the BaaS platform, which reduces the user's operations and enables the user to quickly join the blockchain ecosystem and participate in blockchain transactions.

[0080] In addition, the BaaS platform can not only realize a series of operations such as node configuration, joining request verification, and node joining the blockchain network, but also display whether the node has joined the blockchain and monitor the node's operating status. Even if an abnormality occurs during the node joining process, it can be quickly rolled back without affecting the existing status of the node and the blockchain. The entire operation process is visualized through the BaaS platform, so that the running status and operation results of the node one-click joining process can be understood in real time and intuitively.

[0081] Figure 2 Another method for joining a blockchain is also provided as a flowchart for an embodiment of the present invention. The method can be applied to a node to be joined, and the node to be joined can cooperate with the aforementioned BaaS platform to join the blockchain. Figure 2 As shown, the method comprises the following steps:

[0082] S210: Send 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.

[0083] The first node joining request is used to request to join the target blockchain network; the first node joining request can refer to the aforementioned Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0084] S220, receiving a node configuration file sent by the BaaS platform.

[0085] Among them, this configuration file is the same as the above Figure 1 The configuration files in the illustrated embodiments are the same and can be understood by reference to each other.

[0086] S230, configuring according to the node configuration file to enable communication in the target blockchain network.

[0087] After being configured according to the configuration file, the node to be added can be considered to have the ability to communicate in the target blockchain network. For example, the configuration file may include network resources allocated to the node to be added, and according to the network resources, the node to be added can communicate in the target blockchain network.

[0088] For example, after reading the configuration file, the node to be added can load the corresponding plug-in in the node, initialize the node program and plug-in, then start the node program and plug-in, reset the network status and the node's communication protocol service status, and then listen to and connect to the blockchain network to be added. In addition, a secure communication channel can be established with the blockchain network using cryptographic standards. At the same time, the node to be added generates a public key and private key pair, and its private key is stored in an encrypted database to ensure the security of the private key.

[0089] In this embodiment, the node to be joined is configured through the BaaS platform, which does not require the user to have an in-depth understanding of blockchain technology, reduces user operations, and facilitates users to quickly join the blockchain ecosystem.

[0090] In some embodiments, the method may further include the following steps:

[0091] Step 1) receiving the rollback operation instruction sent by the BaaS platform;

[0092] Step 2) Perform a rollback operation according to the rollback operation instruction to restore the state before the connection is added to the blockchain network.

[0093] Figure 3 Another method for joining a blockchain is also provided as a flowchart for an embodiment of the present invention. The method can be applied to nodes in a target blockchain network. In the process of joining a blockchain, the nodes in the target blockchain network can also be called verification nodes or other nodes. The verification nodes cooperate with the aforementioned nodes to be joined and the BaaS platform to join the blockchain. Figure 3 As shown, the method comprises the following steps:

[0094] S310, receiving a second node joining request sent by the BaaS platform. The second node joining request includes the first node joining request, signature information, and a public key.

[0095] The second node join request is the same as the aforementioned Figure 1 The embodiments shown are the same and can be understood by reference to each other.

[0096] S320, based on the public key and the first node joining request, verify the signature information to obtain a verification result, wherein the first node joining request is used to request to join the target blockchain network;

[0097] When each node in the blockchain network receives the first node joining request, signature information and the public key of the node to be joined, it uses the public key of the node to be joined to decrypt the signature information to obtain the decrypted summary information, and then uses the HASH function to generate the summary information of the first node joining request, and compares the decrypted summary information with the generated summary information to authenticate the node to be joined. In addition, the initial information in the ledger data can also be compared to verify the legitimacy of the first node joining request.

[0098] S330: If the verification result is legal, the node to be joined is added to the target blockchain network based on the first node joining request.

[0099] If the verification results of each node in the blockchain network reach a consensus, the node to be added can be approved to join the blockchain network after confirming the identity of the node to be added, and the node to be added can be added to the blockchain members, and its node identifier can be added to the local permission list, and the record can be submitted and a new block can be generated. At this point, the node to be added finally joins the blockchain network. If the identity of the node to be added is not confirmed, it is not allowed to join the blockchain network. Finally, the blockchain network returns the joining result of the node to be added to the BaaS platform. For example, it can be determined whether the proportion of nodes in the target blockchain network that verify the legality of the second node joining request reaches a preset value; determine the identifier of the node to be added, and add the identifier of the node to be added to the list of permitted nodes of the target blockchain network. The reaching of the preset value can be determined according to actual needs. For example, the reaching of the preset value can refer to more than half.

[0100] In this embodiment, the node to be joined is configured through the BaaS platform, which does not require the user to have an in-depth understanding of blockchain technology, reduces user operations, and facilitates users to quickly join the blockchain ecosystem.

[0101] Figure 4 A schematic diagram of a device structure for adding blockchain is provided in an embodiment of the present invention, which is applied to a BaaS platform, such as Figure 4 As shown, the device comprises:

[0102] An acquisition module 401 is used to acquire a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network;

[0103] 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 is configured according to the node configuration file;

[0104] The sending module 403 is used to send a second node joining 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 joining request.

[0105] In some embodiments, the first node joining request includes information of the node to be joined and an identifier of the target blockchain network; and also includes a verification module for:

[0106] Determine the target blockchain network information based on the target blockchain network identifier;

[0107] Verify whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information;

[0108] If the first node joining request is legal, the step of generating a node configuration file according to the first node joining request is performed.

[0109] In some embodiments, the generating module 402 is specifically used to:

[0110] Based on the target blockchain network information and the information of the node to be added, determine the network resources of the node to be added in the target blockchain network;

[0111] Generate a node configuration file based on network resources so that the nodes to be joined can communicate in the target blockchain network according to network resources.

[0112] In some embodiments, a signature module is further included for:

[0113] Use the private key to sign the first node joining request to obtain signature information;

[0114] Based on the first node joining request, the signature information and the public key, a second node joining request is determined.

[0115] In some embodiments, it also includes:

[0116] A receiving module, used to receive a verification result of the second node joining request sent by other nodes in the target blockchain network, and the other nodes in the target blockchain network verify the signature information based on the public key to obtain the verification result;

[0117] The sending module 403 is further configured to send a rollback operation instruction to the node to be joined when it is determined based on the verification result that the node to be joined fails to join, so that the node to be joined performs a rollback operation.

[0118] The device for joining the blockchain provided in the embodiment of the present application is similar to the above Figure 1 The method for joining the blockchain provided in the illustrated embodiments has the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0119] Figure 5 Another schematic diagram of a device structure for joining a blockchain is provided for an embodiment of the present invention, which is applied to a node to be joined, such as Figure 5As shown, the device may include:

[0120] A sending module 501 is used to send 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 to request to join the target blockchain network;

[0121] The receiving module 502 is used to receive the node configuration file sent by the BaaS platform;

[0122] The configuration module 503 is used to configure according to the node configuration file to enable communication in the target blockchain network.

[0123] The device for joining the blockchain provided in the embodiment of the present application is similar to the above Figure 2 The method for joining the blockchain provided in the illustrated embodiments has the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0124] Figure 6 The embodiment of the present invention also provides another schematic diagram of the structure of a device for joining a blockchain, which is applied to a node to be joined, such as Figure 6 As shown, the device may include:

[0125] The receiving module 601 is used to receive a second node joining request sent by the BaaS platform, where the second node joining request includes the first node joining request, signature information, and a public key;

[0126] A verification module 602 is used to verify the signature information based on the public key and the first node joining request to obtain a verification result, wherein the first node joining request is used to request to join the target blockchain network;

[0127] The joining module 603 is used to add the node to be joined to the target blockchain network based on the first node joining request if the verification result is legal.

[0128] In some embodiments, the adding module 603 is specifically used to:

[0129] Determine whether the proportion of nodes in the target blockchain network that verify the second node's joining request as legitimate reaches a preset value;

[0130] Determine the identity of the node to be added, and add the identity of the node to be added to the list of permitted nodes of the target blockchain network.

[0131] The device for joining the blockchain provided in the embodiment of the present application is similar to the above Figure 3 The method for joining the blockchain provided in the illustrated embodiments has the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0132] See also Figure 7 An embodiment of the present invention further provides an electronic device 700, comprising: 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 via the bus 703; the memory 702 is used to store programs; the processor 701 is used to call the program stored in the memory 702 via the bus 703, and execute the method for joining the blockchain of the above embodiment.

[0133] The memory 702 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element 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, wide area network, local area network, metropolitan area network, etc. may be used.

[0134] The bus 703 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0135] Among them, the memory 702 is used to store programs, and the processor 701 executes the program after receiving the execution instruction. The method executed by the process definition device disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 701 or implemented by the processor 701.

[0136] The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 701. The above processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and completes the steps of the above method in combination with its hardware.

[0137] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above method for joining a blockchain.

[0138] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0141] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0142] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention rather than to limit it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed by the present invention, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the protection scope of the present invention.

Claims

1. A method for joining a blockchain, characterized in that: Applied to the BaaS platform, the method includes: Obtaining a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network, and the user to which the node to be joined belongs logs in to the BaaS platform through a user terminal to initiate the first node joining request with one click; Determine the target blockchain network information based on the target blockchain network identifier; Verify whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; If the first node joining request is legal, then based on the target blockchain network information and the information of the node to be joined, determine the network resources of the node to be joined in the target blockchain network; generate a node configuration file based on the network resources, and send the node configuration file to the node to be joined, so that the node to be joined loads the corresponding plug-in in the node according to the node configuration file, initializes the node program and the plug-in, then starts the node program and the plug-in, resets the network status and the communication protocol service status of the node, and then listens to and connects to the blockchain network to be joined; Using the private key to sign the first node joining request to obtain signature information; Determine a second node joining request based on the first node joining request, the signature information and the public key; The second node joining request is sent 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 joining request.

2. The method according to claim 1, characterized in that Also includes: Receiving a verification result for the second node joining request sent by other nodes in the target blockchain network, where the other nodes in the target blockchain network verify the signature information based on the public key to obtain the verification result; When it is determined based on the verification result that the node to be joined fails to join, a rollback operation instruction is sent to the node to be joined, so that the node to be joined performs a rollback operation.

3. A method for joining a blockchain, characterized in that: Applied to the node to be added, the method includes: 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 to request to join the target blockchain network, and the user to which the node to be joined belongs logs in to the BaaS platform through the user terminal to initiate the first node joining request with one click; if the first node joining request is legal, the BaaS platform sends a second node joining request to the target blockchain network, wherein the second node joining request includes the first node joining request, signature information, and a public key, so that other nodes in the target blockchain network communicate with the node to be joined based on the second node joining request; Receive the node configuration file sent by the BaaS platform; wherein the BaaS platform determines the target blockchain network information based on the target blockchain network identifier; verifies whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; if the first node joining request is legal, determines the network resources of the node to be joined in the target blockchain network based on the target blockchain network information and the information of the node to be joined; generates a node configuration file based on the network resources; The corresponding plug-in in the node is loaded according to the node configuration file, and the node program and the plug-in are initialized, and then the node program and the plug-in are started, the network status and the communication protocol service status of the node are reset, and then the blockchain network to be joined is listened and connected to enable communication in the target blockchain network.

4. A method for joining a blockchain, characterized in that: Applied to a node in a target blockchain network, the method comprises: Receive a second node joining request sent by the BaaS platform, the second node joining request including the first node joining request, signature information and public key; wherein the BaaS platform obtains the first node joining request, determines the target blockchain network information based on the target blockchain network identifier; verifies whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; if the first node joining request is legal, sends a second node joining 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 joining request; wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network, and the user to whom the node to be joined belongs communicates with the user through the user The terminal logs in to the BaaS platform to initiate a first node joining request with one click; wherein, the BaaS platform generates a node configuration file according to the first node joining request, and sends 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; the BaaS platform determines the target blockchain network information based on the target blockchain network identifier; the BaaS platform verifies whether the first node joining request is legal based on the node information to be joined and the target blockchain network information; if the first node joining request is legal, the BaaS platform determines the network resources of the node to be joined in the target blockchain network based on the target blockchain network information and the node information to be joined; the BaaS platform generates a node configuration file based on the network resources; Based on the public key and the first node joining request, verifying the signature information to obtain a verification result, wherein the first node joining request is used to request to join the target blockchain network; If the verification result is legal, the node to be joined is added to the target blockchain network based on the first node joining request.

5. The method according to claim 4, characterized in that If the verification result is legal, adding the node to be joined to the target blockchain network based on the first node joining request includes: Determine whether the proportion of nodes in the target blockchain network that verify the second node's joining request as legitimate reaches a preset value; Determine the identifier of the node to be added, and add the identifier of the node to be added to the permitted node list of the target blockchain network.

6. A device for joining a blockchain, characterized in that: Applied to the BaaS platform, the device includes: An acquisition module is used to acquire a first node joining request, wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network, and the user to which the node to be joined belongs logs in to the BaaS platform through a user terminal to initiate the first node joining request with one click; A verification module, used to determine the target blockchain network information based on the target blockchain network identifier; and verify whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; A generation module is used to determine the network resources of the node to be joined in the target blockchain network based on the target blockchain network information and the node to be joined information if the first node joining request is legal; generate a node configuration file based on the network resources, and send the node configuration file to the node to be joined, so that the node to be joined loads the corresponding plug-in in the node according to the node configuration file, initializes the node program and the plug-in, then starts the node program and the plug-in, resets the network status and the communication protocol service status of the node, and then monitors and connects to the blockchain network to be joined; A signature module, configured to sign the first node joining request using a private key to obtain signature information; and determine a second node joining request based on the first node joining request, the signature information and the public key; A sending module is used to send the second node joining 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 joining request.

7. A device for joining a blockchain, characterized in that: Applied to a node to be added, the device comprises: A sending module is used to send 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 to request to join the target blockchain network, and the user to which the node to be joined belongs logs in to the BaaS platform through the user terminal to initiate the first node joining request with one click; if the first node joining request is legal, the BaaS platform sends a second node joining request to the target blockchain network, and the second node joining request includes the first node joining request, signature information, and a public key, so that other nodes in the target blockchain network communicate with the node to be joined based on the second node joining request; A receiving module, configured to receive the node configuration file sent by the BaaS platform; wherein the BaaS platform determines the target blockchain network information based on the target blockchain network identifier; verifies whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; if the first node joining request is legal, determines the network resources of the node to be joined in the target blockchain network based on the target blockchain network information and the information of the node to be joined; and generates a node configuration file based on the network resources; The configuration module is used to load the corresponding plug-in in the node according to the node configuration file, and initialize the node program and plug-in, then start the node program and plug-in, reset the network status and the communication protocol service status of the node, and then listen to and connect to the blockchain network to be joined, so as to communicate in the target blockchain network.

8. A device for joining a blockchain, characterized in that: Applied to a node in a target blockchain network, the device comprises: A receiving module is used to receive a second node joining request sent by the BaaS platform, wherein the second node joining request includes a first node joining request, signature information, and a public key; wherein the BaaS platform obtains the first node joining request, determines the target blockchain network information based on the target blockchain network identifier; verifies whether the first node joining request is legal based on the information of the node to be joined and the target blockchain network information; if the first node joining request is legal, sends a second node joining 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 joining request; wherein the first node joining request is used to request that the node to be joined be added to the target blockchain network, and the user to which the node to be joined belongs communicates with the user to which the node to be joined belongs. Log in to the BaaS platform through a user terminal to initiate a first node joining request with one click; wherein, the BaaS platform generates a node configuration file according to the first node joining request, and sends 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; the BaaS platform determines the target blockchain network information based on the target blockchain network identifier; the BaaS platform verifies whether the first node joining request is legal based on the node information to be joined and the target blockchain network information; if the first node joining request is legal, the BaaS platform determines the network resources of the node to be joined in the target blockchain network based on the target blockchain network information and the node information to be joined; the BaaS platform generates a node configuration file based on the network resources; A verification module, configured to verify the signature information based on the public key and the first node joining request to obtain a verification result, wherein the first node joining request is used to request to join a target blockchain network; A joining module is used to add the node to be joined to the target blockchain network based on the first node joining request if the verification result is legal.

9. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method according to any one of claims 1 to 5.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method according to any one of claims 1 to 5.