WO2020177601A1 - 一种基于群组的区块链系统、群组管理方法及装置 - Google Patents

一种基于群组的区块链系统、群组管理方法及装置 Download PDF

Info

Publication number
WO2020177601A1
WO2020177601A1 PCT/CN2020/076843 CN2020076843W WO2020177601A1 WO 2020177601 A1 WO2020177601 A1 WO 2020177601A1 CN 2020076843 W CN2020076843 W CN 2020076843W WO 2020177601 A1 WO2020177601 A1 WO 2020177601A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
group
child
nodes
child node
Prior art date
Application number
PCT/CN2020/076843
Other languages
English (en)
French (fr)
Inventor
李昊轩
王�章
李辉忠
张开翔
范瑞彬
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020177601A1 publication Critical patent/WO2020177601A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Definitions

  • the present invention relates to the field of financial technology (Fintech), and in particular to a group-based blockchain system, group management method and device.
  • Blockchain (Blockchain) system is a distributed system architecture commonly used in the field of financial technology (Fintech). It uses blockchain-like data structure, distributed node consensus algorithm and cryptographic access technology to complete multiple Transactions between nodes.
  • the blockchain system can include banking institutions and various branches managed by the banking institutions, such as the Industrial and Commercial Bank of China and the Industrial and Commercial Bank of China Shanghai Branch and the Industrial and Commercial Bank of China Beijing Branch managed by the Industrial and Commercial Bank of China.
  • the existing blockchain systems can be divided into public blockchain systems, private blockchain systems and consortium chain systems.
  • the consortium chain system can usually include a ledger and multiple nodes (or referred to as institutions), and each node can manage at least one child node.
  • a management solution for the existing alliance chain system is: multiple nodes participating in the construction of the first alliance chain system can jointly maintain the ledger of the first alliance chain system. For example, if the alliance chain system is jointly constructed by ICBC and China Construction Bank, all transaction records of ICBC and China Construction Bank (including transaction records of multiple branches) can be stored on the ledger of the alliance chain system. And China Construction Bank can operate on the transaction records in the ledger (such as reading transaction records, generating new transaction records, etc.).
  • the existing alliance chain system has technical problems of inflexible management in the management process.
  • the embodiment of the present invention provides a group-based blockchain system, a group management method and device, which are used to solve the technical problem of inflexible management of existing blockchain systems (such as alliance chain systems).
  • An embodiment of the present invention provides a blockchain system, the blockchain system includes one or more nodes, and each of the one or more nodes manages one or more child nodes; the blockchain The system also includes one or more groups, each of the one or more groups includes at least one child node; in specific implementation, the child nodes included in the first group can jointly maintain the first ledger, so The first ledger is used to record transaction records generated by child nodes included in the first group; the first group is any one of the one or more groups; and managing the first group includes The node of the child node is used to add child nodes other than the child nodes included in the first group to the first group or delete any child node included in the first group from the first group Child node.
  • the blockchain system may include multiple groups, and the multiple sub-nodes included in each group can jointly maintain the ledger in each group, by setting up multiple groups and forming each group
  • the child nodes of can make the transaction records generated by multiple child nodes in the group to which they belong to be stored in the group’s ledger, so as to avoid the transaction records from being obtained by child nodes that do not belong to the group, and to ensure the privacy and security of transaction records .
  • the flexibility of the blockchain system management can be improved.
  • An embodiment of the present invention provides a method for managing a blockchain system, the method is applied to the above-mentioned blockchain system, and the method includes:
  • the first node in the blockchain system After determining the M sub-nodes included in the second group to be established, the first node in the blockchain system sends the M sub-nodes managed by the first node to the second to N-th nodes Certificates of P child nodes; each of the first to Nth nodes can manage at least one child node of the M child nodes; the first node receives the MP child nodes sent by the second to Nth nodes The certificate of the node, if it is determined that the certificates of the MP child nodes are legitimate certificates, then the group configuration files of the P child nodes are generated, and the P child nodes are activated according to the group configuration files of the P child nodes; If the first node determines that the number of activated child nodes in the second group is greater than or equal to a first preset threshold, it is determined that the second group is successfully established.
  • each node in the blockchain system can establish a group by managing multiple sub-nodes, so that multiple sub-nodes in the group jointly maintain the ledger of the group; in actual operation, Groups are established by node management of sub-nodes, so that nodes can group sub-nodes with the same needs into one group, or can group multiple sub-nodes into one group according to the actual situation, so as to target Management is performed in different groups separately, that is, the management method in the embodiment of the present invention can manage the blockchain system more flexibly.
  • the method further includes: the first node determines that the child node to be added to the second group is the first After the M+1th child node managed by the node, the group configuration file of the M+1th child node is generated; the first node determines that the M+1th child node is allowed to access the M After the number of child nodes of the second group is greater than or equal to a second preset threshold, the M+1th child node is activated according to the group configuration file of the M+1th child node.
  • each node in the blockchain system can add child nodes to the group (that is, expand the group capacity), so that when a new organization joins the blockchain system, the new The way an organization is added to an existing group does not need to generate a new blockchain based on the original organization and the new organization in the blockchain system, which makes the management of the blockchain system more efficient.
  • the first node determines to remove the Qth child node from the second group, it sends a group change request to the second to Nth nodes;
  • the Q child node is a child node managed by the first node; if the first node determines that the number of child nodes that agree to the group change request among the M child nodes is greater than or equal to the third preset threshold, generate Transaction records, and write the transaction records into a second ledger jointly maintained by the M child nodes in the second group.
  • each node in the blockchain system can remove the child node from the group.
  • the node is used to manage the group where the child node is located, so that the node can perform different tasks for different groups. Operations (such as adding child nodes, removing child nodes, etc.) make the management process of the blockchain system more flexible; on the other hand, by maintaining a ledger by a group, you can record the transactions generated in the group (such as Excluding child nodes) is written into the ledger of the group, so that multiple child nodes can maintain the ledger related to the group, which can ensure the privacy and security of the group.
  • An embodiment of the present invention provides a block chain system group management device, the device includes:
  • a transceiver module configured to, after determining the M child nodes included in the second group to be established, send to the second to Nth nodes the certificates of the P child nodes managed by the first node among the M child nodes; Each of the first to Nth nodes manages at least one child node of the M child nodes; and, receiving the second to Nth nodes among the M child nodes sent by the second to Nth nodes The certificates of the MP child nodes managed by the Nth node;
  • a processing module configured to, if it is determined that the certificates of the MP child nodes are legal certificates, generate group configuration files of the P child nodes, and activate the P child nodes according to the group configuration files of the P child nodes; And, if it is determined that the number of activated child nodes in the second group is greater than or equal to a first preset threshold, it is determined that the second group is successfully established.
  • the processing module is further configured to: after determining that the child node to be added to the second group is the M+1th child node managed by the first node, generate the M+1th child node Group configuration file; after determining that the number of child nodes that allow the M+1th child node to access the second group among the M child nodes is greater than or equal to a second preset threshold, according to the M+th child node
  • the group configuration file of 1 child node activates the M+1th child node.
  • the transceiver module is further configured to send a group change request to the second to Nth nodes if it is determined to remove the Qth child node from the second group; the Qth child node A node is a child node managed by the first node;
  • the processing module is further configured to, if it is determined that the number of child nodes that agree to the group change request among the M child nodes is greater than or equal to a third preset threshold, generate a transaction record and write the transaction record In the second ledger maintained by the M child nodes in the second group.
  • An embodiment of the present invention provides a computing device, the computing device includes:
  • processor memory, transceiver, and bus interface; among them, the processor, memory and transceiver are connected by a bus;
  • the processor is configured to read the program in the memory and execute the above group management method
  • the memory is used to store one or more executable programs and store data used by the processor when performing operations.
  • An embodiment of the present invention provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the above group management method.
  • a computer program product provided by an embodiment of the present invention when it runs on a computer, causes the computer to execute the above group management method.
  • FIG. 1 is a schematic diagram of a system architecture of a group-based blockchain system provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a corresponding process of a method for group management of a blockchain system provided by an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a corresponding structure of a group management device of a blockchain system provided in an embodiment of the present invention
  • Fig. 4 is a schematic structural diagram of a computing device provided in an embodiment of the present invention.
  • an organization may refer to a server or a software program running in a server, that is, a node may exist in the form of software or hardware; a sub-node may also refer to a server or a software program running in the server, namely The child nodes can also exist in the form of software or hardware; the specifics are not limited.
  • a node is a software program running in an operation and maintenance server and a sub-node is a software program running in a background server managed by the operation and maintenance server as an example for description.
  • the node may generate multiple child node installation packages, and send the multiple child node installation packages to at least one child node respectively.
  • the first child node receives the child node installation package, it can obtain the operating information by parsing the child node installation package, and store the child node information (such as group configuration information, child node configuration information, child node Node certificate, etc.); accordingly, when the node generates the child node installation package, it can also store the information of the child node.
  • the node operates on a certain group, the node can determine and manage the child nodes in the group according to the information of the child nodes stored internally.
  • the node can be based on the correspondence between the group identifier and the group configuration information of the child nodes. Relationships, determine the child nodes included in the group, and then send management instructions to the child nodes in the group. Further, the child node may maintain the group where the child node is located according to the management instruction of the node.
  • Figure 1 is a schematic diagram of the system architecture of a group-based blockchain system provided by an embodiment of the present invention.
  • the blockchain system may include one or more nodes, such as the one shown in Figure 1
  • the first node 101, the second node 102, and the third node 103 wherein each of the one or more nodes can manage one or more child nodes.
  • the first node 101 can manage child node A, child node B, child node C, and child node D
  • the second node 102 can manage child node E, child node F, child node G, and child node H.
  • the node 102 can manage the child node I and the child node J.
  • the blockchain system may also include one or more groups (for example, group 1 to group 5 shown in FIG. 1), each of the one or more groups It can include at least one child node.
  • each of the one or more groups may be generated by the first node 101, the second node 102, and the third node 103 by managing corresponding child nodes.
  • group 1 can be generated by the first node 101 managing sub-node A and sub-node B, and the second node 102 managing sub-node E.
  • Group 1 can include sub-node A, sub-node B, and sub-node E.
  • group 2 can be generated by the first node 101 to manage child node B, and the second node 102 to manage child node E and child node H, group 2 can include child node B, child node E, and child node H;
  • Group 3 may be generated by the first node 101 to manage sub-node A and sub-node D. Group 3 may include sub-node A and sub-node D;
  • group 4 may be generated by first node 101 to manage sub-node B and the first node.
  • group 4 can include sub-node B, sub-node H, and sub-node I; group 5 can be managed by second node 102, sub-node F, sub-node G, and sub-node H, and the third node 103 manages the child node J generated.
  • the child nodes (that is, child node A, child node B, and child node E) included in group 1 can jointly maintain the first ledger.
  • the first ledger can be used to record transaction records generated by the child nodes included in group 1, that is, transaction records generated when child node A, child node B, and child node E conduct transactions in group 1.
  • the transaction records included in the first ledger can be acquired by any of the child node A, child node B, and child node E in group 1, and/or, child node A, child node in group 1
  • the transaction records generated by node B and child node E in group 1 can be recorded in the first ledger.
  • the transaction records included in the first ledger cannot be obtained by the child nodes included in the group 2 to group 5, and the child nodes included in the group 2 to group 5 are in the group 2 to group 5
  • the generated transaction records can be recorded in the ledger corresponding to group 2 to group 5 respectively.
  • the first node 101, the second node 102, and the third node 103 can manage the blockchain system by managing the child nodes.
  • the node that manages the child nodes included in a certain group can be It is used to add child nodes other than the child nodes included in the group to the group, or can delete any child node included in the group from the group.
  • group 1 includes child node A and child node B managed by the first node 101, and child node E managed by the second node 102.
  • the first node 101 can report to group 1 Add a child node C and/or child node D to the group 1 or add a child node W to the group 1 after the child node W is newly generated.
  • the first node 101 may delete any child node included in the group 1, such as child node A, child node B, or child node E, from the group 1.
  • the management process of the group 1 by the second node 102 can be implemented with reference to the first node 101, and details are not described again.
  • group 1 can be jointly managed by the first node 101 and the second node 102. It can be understood that, in other possible embodiments, a group may be managed by only one node, and the specific management group node may be set by a person skilled in the art, which is not specifically limited.
  • the blockchain system provided by the embodiment of the present invention may include multiple groups, and multiple sub-nodes included in each group may jointly maintain the ledger in each group.
  • the transaction records generated by multiple sub-nodes in the group to which they belong can be stored in the group’s ledger, preventing transaction records from being subtracted by children that do not belong to the group. Obtained by the node, which can ensure the privacy and security of transaction records.
  • the flexibility of the blockchain system management can be improved.
  • FIG. 2 is a schematic flowchart of a method for group management of a blockchain system according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
  • Step 201 After determining the M subnodes included in the second group to be established, the first node in the blockchain system sends P subnodes managed by the first node among the M subnodes to the second to Nth nodes Certificate.
  • the embodiment of the present invention takes the first node as an example to describe the method of managing the blockchain system in the embodiment of the present invention through the first node.
  • the method of managing the blockchain system through other nodes can be implemented with reference to the first node. , The details are not repeated here.
  • the first node may send child nodes to the second node and the third node, respectively.
  • the certificate of node A accordingly, the second node can send the certificate of the child node H to the first node and the third node respectively, and the third node can send the certificate of the child node I to the first node and the second node respectively.
  • each of the first node, the second node, and the third node can serve as a sending node or a receiving node.
  • the certificates of the child node A, child node H, and child node I are The node that manages the child node obtains and sends it.
  • the first node can obtain and send the certificate of the child node A managed by the first node, and if the first node is the receiving node, the first node can Receive the certificate of the child node H sent by the second node and/or the certificate of the child node I sent by the third node.
  • the certificate can be sent in multiple ways.
  • the first node can be wired (such as network cable, optical fiber, etc.) or wireless (such as Microwave, satellite, etc.) are connected to the second node.
  • the first node can send the certificate to the second node through the network, such as broadcast, network disk transmission, etc.
  • the first node can send the certificate to the second node in an offline manner, for example, the certificate on the first node can be copied through a storage device and pasted in the second node.
  • the first node may also send the certificate to the second node in other ways, and the method for sending the certificate among the first node, the second node, and the third node may be the same or different, which is not specifically limited.
  • Step 202 The first node receives the certificates of the MP subnodes sent by the second to Nth nodes, and if it is determined that the certificates of the MP subnodes are legitimate certificates, it generates a group configuration file of the P subnodes, and according to the group of the P subnodes The group configuration file activates P child nodes.
  • the first node after receiving the certificates of the child node H and the child node I sent by the second node and the third node, the first node can verify the certificates of the child node H and the child node I respectively.
  • the content of verifying the certificate may include any one or more of the following: the issuer of the certificate, the user of the certificate, the validity period of the certificate, the key usage of the certificate, and the public key information included in the certificate.
  • the content of the first node to verify the certificates of the child node H and the child node I may be the same or different, such as verifying the user of the certificate of the child node H and the user of the certificate of the child node I, or verifying the child node
  • the public key information of the certificate user of H and the certificate of child node I is not specifically limited.
  • the first node may generate and send a response message, which is used to identify the failure to establish the second group.
  • the existence of an illegal certificate in the certificates of the child node H and the child node I may mean that at least one of the certificates of the child node H and the certificate of the child node I is an illegal certificate, for example: the certificate of the child node H is an illegal certificate, the child node I The certificate of is a legal certificate; or, the certificate of the child node H is a legal certificate, and the certificate of the child node I is an illegal certificate; or, the certificate of the child node H and the certificate of the child node I are both illegal certificates.
  • the first node may generate the first node according to the public key information and certificate fingerprint information included in the certificates of the child node A, child node H, and child node I, respectively The serial number of the second group.
  • the serial number of the second group can be used to identify the second group, and the second group can be activated according to a call request of a related block (such as a genesis block) after the second group is successfully established.
  • the first node can generate the group configuration file for starting the second group through the genesis block in the blockchain system after generating the serial number of the second group; for example, the first node can set the second group configuration file The serial number of the group is sent to the genesis block, so that the genesis block generates a group configuration file for starting the second group according to the serial number of the second group.
  • the group configuration file of the second group may include at least the data volume information required to start the second group, the identification information of the child node A, the child node H, and the child node I included in the second group, and the start of the first group. The configuration procedure of the second group.
  • the first node can generate the group configuration file of the child node A according to the group configuration file of the second group and the configuration file of the child node A; wherein, the group configuration file of the child node A can be used to Start child node A in the second group.
  • the first node may add the group configuration file of the second group to the node installation package of the child node A, for example, add the identification information of the second group to the startup program of the child node A , Network connection method, etc.; at this time, if the first node activates child node A, then child node A can obtain the identification information of the group where child node A is located (ie, the second group), and perform activation in the second group process.
  • the second node and the third node can perform the same operations as the first node, that is, the second node can generate the group configuration file of the child node H and start the child node H, and the third node can generate The group configuration file of child node I and start child node I.
  • Step 203 If the first node determines that the number of activated child nodes in the second group is greater than or equal to the first preset threshold, it determines that the second group is successfully established.
  • the activated child node can be understood as the child node that has joined the second group.
  • the child node if the child node has joined the second group, the child node can communicate with other child nodes in the second group; therefore, if the child node can communicate with other child nodes in the second group, It can be determined that the child node has joined the second group, that is, the child node has been activated.
  • the multiple child nodes in the second group may communicate in multiple ways.
  • multiple child nodes can communicate through the same network.
  • the second group is provided with a first network, and each child node in the second group (and the node that manages the child nodes) can be on the first network Send information and get information from the first network.
  • To determine whether child node A is activated for example, after the first node can start child node A, if child node A can send information and/or obtain information on the first network, it can be determined that child node A is activated.
  • the specific implementation process may be: when the first node starts child node A, child node A can obtain the network connection mode of the second group (that is, the connection mode of the first network) from the group configuration file of child node A. At this time, the child node A can try to publish information on the first network. If the information is successfully published, the first node can determine that the child node A has joined the second group, that is, the child node A has been activated in the second group. Correspondingly, if the first node determines that the child node H and the child node I successfully publish information on the first network, it can be determined that the child node H and the child node I have been activated in the second group.
  • multiple child nodes can communicate through two or more networks.
  • the second group is provided with a second network, a third network, and a fourth network, and child nodes A and child nodes H pass through the first network.
  • the second network communicates, the child node H and the child node I communicate through the third network, and the child node A and the child node I communicate through the fourth network.
  • node A can send a message that child node A has joined the second group to child node H and child node I, and can receive child node H
  • the message that the child node H has joined the second group and the message that the child node I has joined the second group are sent. If the first node can receive the message sent by the child node H or the child node I through the child node A, it can be determined that the child node A has been activated.
  • the networks in the above example can be implemented by a carrier, that is, multiple sub-nodes can communicate in a wired way, or can also communicate in a wireless way. limited.
  • the communication modes of any two of the child node A, the child node H, and the child node I may be the same or different, which is not specifically limited.
  • the first node can obtain the number of child nodes activated in the second group (that is, the number of consensus child nodes). If it is determined that the number of consensus child nodes is greater than or equal to the first preset threshold, it can be determined The second group is successfully established; if it is determined that the number of consensus child nodes is less than the first preset threshold, it can be determined that the establishment of the second group has failed. At this time, the first node may generate and send a message indicating that the establishment of the second group failed.
  • the first preset threshold can be set by those skilled in the art based on experience, or can also be determined based on experiments, and is not specifically limited. For example, the first preset threshold may be set to 2M/3+1.
  • the first preset threshold may be It is 3; if the first node determines that the number of consensus sub-nodes is 2, at this time, since the number of consensus sub-nodes is less than the first preset threshold, the first node can determine that the establishment of the second group has failed, and can feedback to the user The second group failed to be established. It should be noted that the above is only an exemplary simple description. The number of consensus sub-nodes listed is only for the convenience of explaining the scheme and does not constitute a limitation on the scheme. In specific implementation, the number of consensus sub-nodes It can be more than 3, for example, it can be 4 or more.
  • each node in the blockchain system can establish a group by managing multiple sub-nodes, so that multiple sub-nodes in the group jointly maintain the ledger of the group; in actual operation, Groups are established by node management of sub-nodes, so that nodes can group sub-nodes with the same needs into one group, or can group multiple sub-nodes into one group according to the actual situation, so as to target Management is performed in different groups separately, that is, the management method in the embodiment of the present invention can manage the blockchain system more flexibly.
  • the first node after the first node determines that the second group is successfully established, it can also add child nodes to the second group (for ease of description, simply referred to as child nodes to be added to the second group), that is, the The second group is expanded.
  • the child node to be added to the second group can be any one or more of the multiple child nodes managed by the first node (it should be noted that the child node to be added to the second group is the second group Not included in), or it can be a new child node.
  • Example one is the implementation process of the first node adding the child node D managed by the first node to the second group.
  • Example 2 is the implementation process of the first node adding the newly generated child node X of the first node to the second group.
  • the second group includes child node A, child node H, and child node I. If the first node determines to add child node D managed by the first node to the second group, the first node can add The second node of the child node H and the third node that manages the child node I respectively send a first request message, and the first request message is used to request the group configuration file of the child node H and the group configuration file of the child node I.
  • the group configuration file of the child node H may include the identification information of the group where the child node H is located and the network connection information of the child node.
  • the second node after receiving the first request message, can send the group configuration file of child node H to the first node.
  • the third node can send the group configuration file of child node I The group configuration file is sent to the first node.
  • the first node after the first node receives the group configuration file of the child node H and the child node I, it can also obtain the group configuration file of the child node A stored inside the first node, and obtain the group configuration file of the child node A and the child node A respectively.
  • the group configuration files of node H and child node I parse out the identification information of the group where child node A, child node H and child node I are located, and the network connection information of child node A, child node H and child node I. Further, the first node may determine the group where the child node A, child node H, and child node I are located according to the identification information of the group where child node A, child node H, and child node I are located.
  • the first node may send a second request message to the node that manages the child nodes that are not in the second group, and the second request message is used for re-request The group configuration file of the child node. For example, if the identification information of the group where the child node H is located is group 5, the first node can send a second request message to the second node. At this time, the second node can retrieve the group configuration file of the child node H, and Sent to the first node.
  • the first node can generate the group configuration file of child node D, where the group configuration file of child node D can Including the identification information of the group where the child node D is located and the network connection information of the child node D. Further, after the first node starts the child node D according to the group configuration file of the child node D, it can determine the permission of the child node according to the network connection information of the child node D and the network connection information of the child node A, the child node H, and the child node I D The number of child nodes added to the second group.
  • the first node may control child node D to connect child node A and child nodes respectively.
  • Node H and child node I Taking the child node D connected to the child node H as an example, if the child node D can be connected to the child node H, it means that the child node H allows the child node D to join the second group (here, the child node H is a consensus child node).
  • Child node D can connect child node A and child node H, then child node A and child node H allow child node D to join the second group; at this time, the first node can determine that child node D is allowed to join the second group The number of child nodes is 2.
  • the child node D can send to any child node (such as child node H) among the multiple child nodes included in the second group Group request.
  • the child node H can broadcast the network access request information of the child node D on the first network. Accordingly, the child node A and the child node I can obtain the network access request information sent by the child node H on the first network.
  • child node A, child node H, and child node I can send information that allows child node D to enter the group or does not allow child node D to enter the group on the network.
  • the first node can determine the number of child nodes that allow the child node D to join the second group through the number of information that the child node D is allowed to join the group on the first network.
  • the first node determines that the number of consensus child nodes that allow child node D to join the second group is less than the second preset threshold, it can be determined that child node D fails to join the second group. At this time, the first node It is possible to generate and send a message that the child node D fails to enter the group.
  • the second preset threshold can be set by those skilled in the art based on experience, or can also be determined based on experiments. The second preset threshold can be the same as the first preset threshold, or it can be different from the first preset threshold. Not limited.
  • child node D may be activated according to the group configuration file of child node D.
  • the child node D can be started in the second group, that is, the child node D can communicate with the child node A, the child node H, and the child node I in the second group, and the child node D is in Transaction records generated in the second group (for example, transaction records corresponding to transactions generated by child node D and child node A in the second group) can be stored in the second ledger of the second group.
  • Node A, child node H, and child node I can jointly maintain the second ledger of the second group.
  • each node in the blockchain system can add child nodes to the group, so that when a new organization joins the blockchain system, the new organization can be added to the existing group.
  • the method in the group does not need to generate a new blockchain based on the original institution and the new institution in the blockchain system, which makes the management of the blockchain system more efficient.
  • the first node may also generate the certificate and private key of the child node X.
  • the certificate and private key of the child node X can be generated in multiple ways.
  • the first node may generate the child node X before sending the first request message to the second node and the third node. Certificate and private key. In this way, after the first node generates the certificate and private key of the child node X, the child node X becomes a child node managed by the first node; at this time, the first node can add the child node X to the second group. Refer to example one for implementation.
  • the first node may generate the certificate of the child node X before generating the group configuration file of the child node X, and check the certificate of the child node X, such as detecting the certificate of the child node X format. If it is determined that the certificate of the child node X is a legal certificate, the group configuration file of the child node X can be generated; if the certificate of the child node X is determined to be an illegal certificate, the certificate of the child node X can be regenerated.
  • the first node may also generate the private key of the child node X after generating the group configuration file of the child node X, and activate the child node X according to the private key of the child node X.
  • the certificate and private key of the child node X may also be generated in other manners, which are not specifically limited.
  • the first node may also remove the child nodes included in the second group from the second group.
  • the removed child node can be any one or any multiple child nodes in the second group (as shown in Figure 1 as the child node A, child node H, and child node I), or can also be the second group
  • Any one or any number of child nodes managed by the first node among the multiple child nodes (the child node A shown in Fig. 1) can be specifically set by those skilled in the art according to the actual situation. Not limited.
  • the second group includes child node A, child node H, and child node I. If the first node determines to remove child node A from the second group, the first node can initiate a member change request and determine Whether the membership change request is legal.
  • the first node can determine that the member change request is legal: the child node A to be removed is the child node included in the second group, the child node A included in the second group, and the child node After node H and child node I have completed block synchronization and child node A is removed from the second group, the child nodes included in the second group (ie child node H and child node I) can meet the fourth threshold for realizing service execution (For example, if setting transaction records in the second group in the blockchain system requires at least Y consensus child nodes to be written into the ledger of the second group, the fourth threshold is Y) and so on.
  • the first node may determine that the member change has failed, and may generate alarm information. For example, the first node determines that child node A is not a child node included in the second group, or the fourth preset threshold is 3, and after child node A is removed from the second group, the first node can determine the second group The number of child nodes in is less than the fourth preset threshold. At this time, the first node can generate alarm information.
  • the first node may generate a group change transaction request according to the group configuration information of the child node A.
  • the first node can send the group change transaction request to the first network through the child node A, so that the child node A, child node H, and child node I agree on the group change transaction request.
  • the third preset threshold can be set by those skilled in the art based on experience, or can also be determined based on experiments.
  • the third preset threshold can be the same as the first preset threshold and/or the second preset threshold, or can also be the same as The first preset threshold is different from the second preset threshold, which is not specifically limited.
  • the first node may generate a transaction record and store the transaction record in the ledger of the second group.
  • the transaction record may include the identification information of the child node A, the transaction signature and/or the hash value of the transaction.
  • the ledger of the second group can be assigned to the second group.
  • the included child node H and child node I are jointly maintained.
  • each node in the blockchain system can remove the child node from the group.
  • the group where the child node is located is managed by the node, so that the node can perform different tasks for different groups.
  • the operations (such as adding sub-nodes, removing sub-nodes, etc.) make the management process of the blockchain system more flexible; on the other hand, by maintaining a ledger by a group, the transactions generated in the group can be recorded ( For example, removing child nodes) is written into the ledger of the group, so that multiple child nodes can maintain the ledger related to the group, which can ensure the privacy and security of the group.
  • an embodiment of the present invention also provides a block chain system group management device.
  • the specific content of the device can be implemented with reference to the foregoing method.
  • FIG. 3 is a schematic structural diagram of a group management device of a blockchain system provided by an embodiment of the present invention. As shown in FIG. 3, the device includes:
  • the transceiver module 301 is configured to determine the M child nodes included in the second group to be established, and then send the certificates of the P child nodes managed by the first node among the M child nodes to the second to Nth node; Each node in the Nth node manages at least one child node of the M child nodes; and, receiving certificates of the MP child nodes managed by the second to Nth nodes among the M child nodes sent by the second to Nth nodes;
  • the processing module 302 is configured to, if it is determined that the certificates of the MP child nodes are legal certificates, generate group configuration files of the P child nodes, and activate the P child nodes according to the group configuration files of the P child nodes; and, if the second group is determined If the number of activated child nodes in the group is greater than or equal to the first preset threshold, it is determined that the second group is successfully established.
  • the processing module 302 is further configured to: after determining that the child node to be added to the second group is the M+1 th child node managed by the first node, generate a group configuration file of the M+1 th child node; and determine M After the number of child nodes that allow the M+1th child node to access the second group among the child nodes is greater than or equal to the second preset threshold, activate the M+1th child node according to the group configuration file of the M+1th child node .
  • the transceiver module 301 is further configured to, if it is determined to remove the Qth child node from the second group, send a member change request to the second to Nth nodes; the Qth child node is a child managed by the first node node;
  • the processing module 302 is further configured to, if it is determined that the number of child nodes that agree to the member change request among the M child nodes is greater than or equal to the third preset threshold, then generate a transaction record and write the transaction record to the M child nodes in the second group In the second ledger maintained by the nodes.
  • the first node in the blockchain system determines the M child nodes included in the second group to be established, it can send to the second to Nth nodes Among the M child nodes, the certificates of the P child nodes managed by the first node are received, and the certificates of the MP child nodes sent by the second to Nth nodes are received.
  • a group of P child nodes is generated Group configuration files, and activate P sub-nodes according to the group configuration files of P sub-nodes; further, if the first node determines that the number of activated sub-nodes in the second group is greater than or equal to the first preset threshold, it determines The second group was created successfully.
  • each node in the blockchain system can establish a group by managing multiple sub-nodes, so that multiple sub-nodes in the group jointly maintain the ledger of the group; in actual operation, Groups are established by node management of sub-nodes, so that nodes can group sub-nodes with the same needs into one group, or can group multiple sub-nodes into one group according to the actual situation, so as to target Management is performed in different groups separately, that is, the management method in the embodiment of the present invention can manage the blockchain system more flexibly.
  • the present application also provides a computing device.
  • the computing device includes:
  • the processor 401 is configured to read a program in the memory 402 and execute the above group management method
  • the processor 401 may be a central processing unit (central processing unit, CPU for short), a network processor (NP for short), or a combination of CPU and NP. It can also be a hardware chip.
  • the aforementioned hardware chip may be an application-specific integrated circuit (ASIC for short), a programmable logic device (PLD for short), or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (generic array logic, GAL), or any of them combination.
  • the memory 402 is configured to store one or more executable programs, and can store data used by the processor 401 when performing operations.
  • the program may include program code, and the program code includes computer operation instructions.
  • the memory 402 may include a volatile memory (volatile memory), such as random-access memory (RAM for short); the memory 402 may also include a non-volatile memory (non-volatile memory), such as flash memory ( flash memory, hard disk drive (HDD for short) or solid-state drive (SSD for short); the memory 402 may also include a combination of the foregoing types of memory.
  • volatile memory volatile memory
  • RAM random-access memory
  • non-volatile memory non-volatile memory
  • flash memory flash memory, hard disk drive (HDD for short) or solid-state drive (SSD for short
  • SSD solid-state drive
  • the memory 402 stores the following elements, executable modules or data structures, or their subsets, or their extended sets:
  • Operating instructions including various operating instructions, used to implement various operations.
  • Operating system including various system programs, used to implement various basic services and process hardware-based tasks.
  • the bus 405 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in FIG. 4 to represent, but it does not mean that there is only one bus or one type of bus.
  • the bus interface 404 may be a wired communication access port, a wireless bus interface or a combination thereof, where the wired bus interface may be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the wireless bus interface may be a WLAN interface.
  • an embodiment of the present application also provides a computer-readable storage medium, which stores instructions in the computer storage medium, and when it runs on a computer, the computer executes the above group management method.
  • embodiments of the present application provide a computer program product containing instructions, which when running on a computer, cause the computer to execute the above group management method.
  • the embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Abstract

本发明实施例公开了一种基于群组的区块链系统、群组管理方法及装置,其中方法包括:第一节点向第二至第N节点发送M个子节点中被第一节点管理的P个子节点的证书,并接收第二至第N节点发送的M-P个子节点的证书,若确定M-P个子节点的证书为合法证书,则生成P个子节点的群组配置文件,并激活P个子节点;进一步地,若第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定第二群组建立成功。本发明实施例中,通过节点管理子节点的方式来建立群组,可以使得节点将具有相同需求的子节点划归到一个群组中,或者可以根据实际情况将多个子节点划归到一个群组中,即本发明实施例中的管理方式可以更加灵活地管理联盟链系统。

Description

一种基于群组的区块链系统、群组管理方法及装置
相关申请的交叉引用
本申请要求在2019年03月05日提交中国专利局、申请号为201910163295.7、申请名称为“一种基于群组的区块链系统、群组管理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及金融科技(Fintech)领域,尤其涉及一种基于群组的区块链系统、群组管理方法及装置。
背景技术
区块链(Blockchain)系统是金融科技(Fintech)领域常用的一种分布式的系统架构,通过利用区块链式的数据结构、分布式的节点共识算法以及密码学的访问技术来完成多个节点之间的交易。其中,区块链系统中可以包括银行机构以及银行机构管理的各个分行,比如工商银行构以及工商银行管理的工商银行上海分行、工商银行北京分行等。现有的区块链系统可以分为公共区块链系统、私有区块链系统和联盟链系统。
以联盟链系统为例,联盟链系统中通常可以包括一个账本和多个节点(或者称为机构),每个节点可以管理至少一个子节点。针对于现有的联盟链系统的一种管理方案为:参与构建第一联盟链系统的多个节点可以共同维护第一联盟链系统的账本。举例来说,联盟链系统为工商银行和建设银行共同参与构建的,则工商银行和建设银行的所有交易记录(包括多个分行的交易记录)均可以存储在联盟链系统的账本上,工商银行和建设银行可以对账本中的交易记录进行操作(比如读取交易记录、生成新的交易记录等)。在一种可能的情况中,若建设银行上海分行与农业银行北京分行在交易的过程中生成了一个隐私交易记录,若采用现有的联盟链系统,则该隐私交易记录可以被工商 银行的其它分行(比如北京分行)或者建设银行的其他分行读取到。由此可知,现有的联盟链系统在管理过程中存在管理不灵活的技术问题。
综上,目前亟需一种区块链系统的群组管理方法,用以解决现有的区块链系统(比如联盟链系统)管理不灵活的技术问题。
发明内容
本发明实施例提供一种基于群组的区块链系统、群组管理方法及装置,用以解决现有的区块链系统(比如联盟链系统)管理不灵活的技术问题。
本发明实施例提供的一种区块链系统,所述区块链系统包括一个或多个节点,所述一个或多个节点中的每个节点管理一个或多个子节点;所述区块链系统还包括一个或多个群组,所述一个或多个群组中的每个群组包括至少一个子节点;具体实施中,第一群组包括的子节点可以共同维护第一账本,所述第一账本用于记录所述第一群组包括的子节点产生的交易记录;所述第一群组为所述一个或多个群组中的任一群组;管理所述第一群组包括的子节点的节点用于向所述第一群组中添加所述第一群组包括的子节点以外的子节点或者从所述第一群组中删除所述第一群组包括的任一子节点。
本发明实施例中,区块链系统中可以包括多个群组,每个群组包括的多个子节点可以共同维护每个群组中的账本,通过设置多个群组以及构成每个群组的子节点,可以使得多个子节点在所属的群组内产生的交易记录存储在群组的账本中,从而避免交易记录被不属于该群组的子节点获取到,保证交易记录的隐私和安全。也就是说,本发明实施例中通过设置多个群组,可以提高区块链系统管理的灵活性。
本发明实施例提供的一种区块链系统的管理方法,所述方法应用于上述区块链系统,所述方法包括:
所述区块链系统中的第一节点确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送所述M个子节点中被所述第一节点管理的P个子节点的证书;所述第一至第N节点中的每个节点可以管理所述M个子节点的 至少一个子节点;所述第一节点接收所述第二至第N节点发送的M-P个子节点的证书,若确定所述M-P个子节点的证书为合法证书,则生成所述P个子节点的群组配置文件,并根据所述P个子节点的群组配置文件激活所述P个子节点;所述第一节点若确定所述第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定所述第二群组建立成功。
本发明实施例中,区块链系统中的每个节点均可以通过管理多个子节点来建立群组,从而使得该群组中的多个子节点共同维护该群组的账本;在实际操作中,通过节点管理子节点的方式来建立群组,可以使得节点将具有相同需求的子节点划归到一个群组中,或者可以根据实际情况将多个子节点划归到一个群组中,从而可以针对于不同的群组分别进行管理,即本发明实施例中的管理方式可以更加灵活地管理区块链系统。
在一种可能的实现方式中,所述第一节点确定所述第二群组建立成功之后,还包括:所述第一节点确定待加入所述第二群组的子节点为所述第一节点管理的第M+1子节点后,生成所述第M+1子节点的群组配置文件;所述第一节点确定所述M个子节点中允许所述第M+1子节点接入所述第二群组的子节点的数量大于或等于第二预设阈值后,根据所述第M+1子节点的群组配置文件激活所述第M+1子节点。
在上述实现方式中,区块链系统中的每个节点可以向群组中添加子节点(即对群组扩容),从而使得在有新的机构加入区块链系统时,可以采用将新的机构添加到已有的群组中的方式,而无需根据区块链系统中原有的机构和新的机构生成一条新的区块链,从而使得对区块链系统的管理效率更高。
在一种可能的实现方式中,所述第一节点若确定将第Q子节点从所述第二群组中剔除,则向所述第二至第N节点发送群组变更请求;所述第Q子节点为所述第一节点管理的子节点;所述第一节点若确定所述M个子节点中同意所述群组变更请求的子节点的数量大于或等于第三预设阈值,则生成交易记录,并将所述交易记录写入所述第二群组中的M个子节点共同维护的第二账本中。
在上述实现方式中,区块链系统中的每个节点可以从群组中剔除子节点, 一方面,通过节点来管理子节点所在的群组,可以使得节点针对于不同的群组进行不同的操作(比如添加子节点、剔除子节点等),使得区块链系统的管理过程更为灵活;另一方面,通过一个群组维护一个账本的方式,可以将群组中产生的交易记录(比如剔除子节点)写入群组的账本中,从而使得多个子节点可以维护与群组相关的账本,可以保证群组的隐私和安全。
本发明实施例提供的一种区块链系统的群组管理装置,所述装置包括:
收发模块,用于确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送所述M个子节点中被所述第一节点管理的P个子节点的证书;所述第一至第N节点中的每个节点管理所述M个子节点的至少一个子节点;以及,接收所述第二至第N节点发送的所述M个子节点中被所述第二至第N节点管理的M-P个子节点的证书;
处理模块,用于若确定所述M-P个子节点的证书为合法证书,则生成所述P个子节点的群组配置文件,并根据所述P个子节点的群组配置文件激活所述P个子节点;以及,若确定所述第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定所述第二群组建立成功。
可选地,所述处理模块还用于:确定待加入所述第二群组的子节点为所述第一节点管理的第M+1子节点后,生成所述第M+1子节点的群组配置文件;确定所述M个子节点中允许所述第M+1子节点接入所述第二群组的子节点的数量大于或等于第二预设阈值后,根据所述第M+1子节点的群组配置文件激活所述第M+1子节点。
可选地,所述收发模块还用于,若确定将第Q子节点从所述第二群组中剔除,则向所述第二至第N节点发送群组变更请求;所述第Q子节点为所述第一节点管理的子节点;
所述处理模块还用于,若确定所述M个子节点中同意所述群组变更请求的子节点的数量大于或等于第三预设阈值,则生成交易记录,并将所述交易记录写入所述第二群组中的M个子节点共同维护的第二账本中。
本发明实施例提供的一种计算设备,所述计算设备包括:
处理器、存储器、收发器、总线接口;其中,处理器、存储器与收发器之间通过总线连接;
所述处理器,用于读取所述存储器中的程序,执行上述群组管理方法;
所述存储器,用于存储一个或多个可执行程序,以及存储所述处理器在执行操作时所使用的数据。
本发明实施例提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述群组管理方法。
本发明实施例提供的一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述群组管理方法。
本申请的这些实现方式或其他实现方式在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种基于群组的区块链系统的系统架构示意图;
图2为本发明实施例提供的一种区块链系统的群组管理方法对应的流程示意图;
图3为本发明实施例中提供的一种区块链系统的群组管理装置对应的结构示意图;
图4为本发明实施例中提供的一种计算设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本 发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
本发明实施例中,机构(或节点)可以是指服务器或者服务器中运行的软件程序,即节点可以以软件或硬件的形式存在;子节点也可以是指服务器或者服务器中运行的软件程序,即子节点也可以以软件或硬件的形式存在;具体不做限定。本发明实施例中主要以节点为运维服务器中运行的软件程序、子节点为运维服务器管理的后台服务器中运行的软件程序为例进行描述。
具体实施中,节点可以生成多个子节点安装包,并将多个子节点安装包分别发送给至少一个子节点。此时,第一子节点若接收到子节点安装包,则可以通过解析子节点安装包得到运行信息,并在运行成功后存储子节点的信息(比如群组配置信息、子节点配置信息、子节点证书等);相应地,节点在生成子节点安装包时,也可以存储子节点的信息。若节点对某一群组进行操作,则节点可以根据内部存储的子节点的信息确定并管理该群组中的子节点,比如节点可以根据通过群组标识与子节点的群组配置信息的对应关系,确定群组中包括的子节点,进而可以向群组中的子节点发送管理指令。进一步地,子节点可以根据节点的管理指令维护子节点所在的群组。
图1为本发明实施例提供的一种基于群组的区块链系统的系统架构示意图,如图1所示,区块链系统中可以包括一个或多个节点,比如图1所示意出的第一节点101、第二节点102和第三节点103,其中,一个或多个节点中的每个节点可以管理一个或多个子节点。如图1所示,第一节点101可以管理子节点A、子节点B、子节点C和子节点D,第二节点102可以管理子节点E、子节点F、子节点G和子节点H,第二节点102可以管理子节点I和子节点J。
本发明实施例中,区块链系统中还可以包括一个或多个群组(比如图1所是示意出的群组1~群组5),一个或多个群组中的每个群组可以包括至少一个子节点。具体实施中,一个或多个群组中的每个群组均可以为第一节点101、 第二节点102和第三节点103通过管理对应的子节点生成的。如图1所示,群组1可以为通过第一节点101管理子节点A和子节点B、以及第二节点102管理子节点E生成的,群组1中可以包括子节点A、子节点B和子节点E;群组2可以为通过第一节点101管理子节点B、以及第二节点102管理子节点E和子节点H生成的,群组2中可以包括子节点B、子节点E和子节点H;群组3可以为通过第一节点101管理子节点A和子节点D生成的,群组3中可以包括子节点A和子节点D;群组4可以为通过第一节点101管理子节点B、以及第三节点103管理子节点H和子节点I生成的,群组4中可以包括子节点B、子节点H和子节点I;群组5可以为通过第二节点102管理子节点F、子节点G和子节点H、以及第三节点103管理子节点J生成的。
以群组1为例,在一种可能的实现方式中,群组1包括的子节点(即子节点A、子节点B和子节点E)可以共同维护第一账本。其中,第一账本可以用于记录群组1包括的子节点产生的交易记录,即子节点A、子节点B和子节点E在群组1中进行交易时生成的交易记录。进一步地,第一账本所包括的交易记录可以被群组1中的子节点A、子节点B和子节点E中的任一子节点获取,和/或,群组1中的子节点A、子节点B和子节点E在群组1中生成的交易记录可以记录在第一账本中。相应地,第一账本所包括的交易记录无法被群组2~群组5中包括的子节点获取,且,群组2~群组5中包括的子节点在群组2~群组5中生成的交易记录可以分别记录在群组2~群组5对应的账本中。
本发明实施例中,第一节点101、第二节点102和第三节点103可以通过管理子节点实现对区块链系统的管理,具体地说,管理某一群组包括的子节点的节点可以用于向该群组中添加该群组包括的子节点以外的子节点,或者可以从该群组中删除该群组包括的任一子节点。以群组1为例,群组1中包括第一节点101管理的子节点A和子节点B、以及第二节点102管理的子节点E,在一个示例中,第一节点101可以向群组1中添加子节点C和/或子节点D,或者也可以在新生成子节点W后,向群组1中添加子节点W。在另一个示例中,第一节点101可以从群组1中删除群组1所包括的任一子节点,比如子节点A、子节 点B或子节点E。此处,第二节点102对群组1的管理过程可以参照第一节点101进行实现,具体不再赘述。
需要说明的是,本发明的上述实施例描述了一个群组可以被多个节点共同管理,比如群组1可以被第一节点101和第二节点102共同管理。可以理解的,在其它可能的实施例中,一个群组也可以仅被一个节点管理,具体管理群组的节点可以由本领域技术人员进行设置,具体不作限定。
本发明实施例提供的区块链系统中可以包括多个群组,每个群组包括的多个子节点可以共同维护每个群组中的账本。通过设置多个群组以及构成每个群组的子节点,可以使得多个子节点在所属的群组内产生的交易记录存储在群组的账本中,避免交易记录被不属于该群组的子节点所获取,从而可以保证交易记录的隐私和安全。也就是说,本发明实施例中通过设置多个群组,可以提高区块链系统管理的灵活性。
基于图1所示意的系统架构,图2为本发明实施例提供的一种区块链系统的群组管理方法对应的流程示意图,如图2所示,该方法包括:
步骤201,区块链系统中的第一节点确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送M个子节点中被第一节点管理的P个子节点的证书。
本发明实施例以第一节点为例,描述通过第一节点对本发明实施例中的区块链系统进行管理的方法,通过其它节点对区块链系统进行管理的方法可以参照第一节点进行实现,具体不再赘述。
在一种可能的实现方式中,若待建立的第二群组所包括的子节点为子节点A、子节点H和子节点I,则第一节点可以向第二节点和第三节点分别发送子节点A的证书;相应地,第二节点可以向第一节点和第三节点分别发送子节点H的证书,第三节点可以向第一节点和第二节点分别发送子节点I的证书。本发明实施例中,第一节点、第二节点和第三节点中的每个节点既可以作为发送节点,也可以作为接收节点,相应地,子节点A、子节点H和子节点I的证书被管理该子节点的节点获取并发送。如此,以第一节点为例,若第一节点作 为发送节点,则第一节点可以获取并发送第一节点所管理的子节点A的证书,若第一节点作为接收节点,则第一节点可以接收第二节点发送的子节点H的证书和/或第三节点发送的子节点I的证书。
以第一节点向第二节点发送证书为例,具体实施中,证书的发送方式可以有多种,在一个示例中,第一节点可以通过有线方式(比如网线、光纤等)或无线方式(比如微波、卫星等)与第二节点连接,此时,第一节点可以通过网络方式向第二节点发送证书,比如广播、网盘发送等。在另一个示例中,第一节点可以通过线下方式向第二节点发送证书,比如可以通过存储设备拷贝第一节点上的证书,并粘贴在第二节点中。在其它示例中,第一节点还可以通过其它方式向第二节点发送证书,第一节点、第二节点和第三节点之间发送证书的方式可以相同,或者也可以不同,具体不作限定。
步骤202,第一节点接收第二至第N节点发送的M-P个子节点的证书,若确定M-P个子节点的证书为合法证书,则生成P个子节点的群组配置文件,并根据P个子节点的群组配置文件激活P个子节点。
本发明实施例中,第一节点在接收到第二节点和第三节点分别发送的子节点H和子节点I的证书后,可以对子节点H和子节点I的证书分别进行验证。其中,对证书进行验证的内容可以包括以下任意一项或任意多项:证书的颁发者、证书的使用者、证书的有效期、证书的密钥用法和证书中包括的公钥信息。其中,第一节点对子节点H和子节点I的证书进行验证的内容可以相同,或者也可以不同,比如验证子节点H的证书的使用者以及子节点I的证书的使用者,或者验证子节点H的证书的使用者以及子节点I的证书的公钥信息,具体不作限定。
若第一节点确定子节点H和子节点I的证书中存在非法证书,则第一节点可以生成并发送响应消息,该响应消息用于标识建立第二群组失败。其中,子节点H和子节点I的证书中存在非法证书可以是指子节点H的证书和子节点I的证书中至少存在一个证书为非法证书,比如:子节点H的证书为非法证书、子节点I的证书为合法证书;或者,子节点H的证书为合法证书、子节点I的证 书为非法证书;或者,子节点H的证书和子节点I的证书均为非法证书。
若第一节点确定子节点H和子节点I的证书均为合法证书,则第一节点可以根据子节点A、子节点H和子节点I的证书中分别包括的公钥信息和证书指纹信息,生成第二群组的序列号。其中,第二群组的序列号可以用于标识第二群组,并可以在第二群组建立成功后根据相关区块(比如创世区块)的调用请求启动第二群组。进一步地,第一节点可以在生成第二群组的序列号后,通过区块链系统中的创世区块生成启动第二群组的群组配置文件;比如,第一节点可以将第二群组的序列号发送给创世区块,以使创世区块根据第二群组的序列号生成启动第二群组的群组配置文件。其中,第二群组的群组配置文件中至少可以包括启动第二群组所需的数据量信息、第二群组中包括的子节点A、子节点H和子节点I的标识信息和启动第二群组的配置程序。
进一步地,第一节点可以根据第二群组的群组配置文件与子节点A的配置文件,生成子节点A的群组配置文件;其中,子节点A的群组配置文件可以用于在第二群组中启动子节点A。在一种可能的实现方式中,第一节点可以在子节点A的节点安装包中添加第二群组的群组配置文件,比如在子节点A的启动程序中添加第二群组的标识信息、网络连接方式等;此时,若第一节点启动子节点A,则子节点A可以获取子节点A所在群组的标识信息(即第二群组),并在第二群组中执行启动过程。相应地,在该步骤中,第二节点和第三节点可以执行与第一节点相同的操作,即第二节点可以生成子节点H的群组配置文件并启动子节点H,第三节点可以生成子节点I的群组配置文件并启动子节点I。
步骤203,第一节点若确定第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定第二群组建立成功。
此处,已激活的子节点可以理解为已加入第二群组的子节点。本发明实施例中,若子节点已加入第二群组,则子节点可以与第二群组中的其它子节点进行通信;因此,若子节点可以与第二群组中的其它子节点进行通信,则可以确定子节点已加入第二群组,即子节点已激活。
具体实施中,第二群组中的多个子节点进行通信的方式可以有多种。在 一个示例中,多个子节点可以通过同一网络进行通信,比如,第二群组设置有第一网络,第二群组中的每个子节点(以及管理子节点的节点)可以在第一网络上发送信息,并可以从第一网络上获取信息。以确定子节点A是否已激活为例,第一节点可以启动子节点A后,若子节点A可以在第一网络上发送信息和/或获取信息,则可以确定子节点A已激活。具体实施的过程可以为:第一节点启动子节点A时,子节点A可以从子节点A的群组配置文件中获取第二群组的网络连接方式(即第一网络的连接方式),此时,子节点A可以尝试在第一网络上发布信息,若信息发布成功,则第一节点可以确定子节点A已加入第二群组,即子节点A已在第二群组中激活。相应地,若第一节点确定子节点H和子节点I在第一网络上发布信息成功,则可以确定子节点H和子节点I已在第二群组中激活。
在另一个示例中,多个子节点可以通过两个或两个以上的网络进行通信,比如,第二群组设置有第二网络、第三网络和第四网络,子节点A和子节点H通过第二网络进行通信,子节点H和子节点I通过第三网络进行通信,子节点A和子节点I通过第四网络进行通信。以确定子节点A是否已激活为例,第一节点启动子节点A后,节点A可以分别向子节点H和子节点I发送子节点A已加入第二群组的消息,并可以接收子节点H发送的子节点H已加入第二群组的消息和子节点I发送的子节点I已加入第二群组的消息。若第一节点可以通过子节点A接收到子节点H或子节点I发送的消息,则可以确定子节点A已激活。
需要说明的是,上述示例中的网络(比如第一网络~第四网络)可以通过载体来实现,即多个子节点之间可以通过有线方式实现通信,或者也可以为无线方式实现通信,具体不作限定。且,子节点A、子节点H和子节点I中任意两个子节点通信的方式可以相同,或者也可以不同,具体不作限定。
本发明实施中,第一节点可以获取在第二群组中激活的子节点的数量(即共识子节点的数量),若确定共识子节点的数量大于或等于第一预设阈值,则可以确定第二群组建立成功;若确定共识子节点的数量小于第一预设阈值,则可以确定第二群组建立失败,此时,第一节点可以生成并发送建立第二群 组失败的消息。此处,第一预设阈值可以由本领域技术人员根据经验进行设置,或者也可以根据实验确定,具体不作限定。举个例子,第一预设阈值可以设置为2M/3+1,若待建立的第二群组中包括的子节点为子节点A、子节点H和子节点I,则第一预设阈值可以为3;若第一节点确定共识子节点的数量为2,此时,由于共识子节点的数量小于第一预设阈值,因此第一节点可以确定第二群组建立失败,并可以向用户反馈第二群组建立失败的消息。需要说明的是,上述仅是一种示例性的简单说明,其所列举的共识子节点的数量仅是为了便于说明方案,并不构成对方案的限定,在具体实施中,共识子节点的数量可以大于3个,比如可以为4个或4个以上。
本发明实施例中,区块链系统中的每个节点均可以通过管理多个子节点来建立群组,从而使得该群组中的多个子节点共同维护该群组的账本;在实际操作中,通过节点管理子节点的方式来建立群组,可以使得节点将具有相同需求的子节点划归到一个群组中,或者可以根据实际情况将多个子节点划归到一个群组中,从而可以针对于不同的群组分别进行管理,即本发明实施例中的管理方式可以更加灵活地管理区块链系统。
本发明实施例中,第一节点确定第二群组建立成功之后,还可以向第二群组中添加子节点(为便于描述,简称为待加入第二群组的子节点),即可以对第二群组进行扩容。其中,待加入第二群组的子节点可以为第一节点已管理的多个子节点中的任意一个或任意多个(需要说明的是,待加入第二群组的子节点为第二群组中不包括的子节点),或者也可以为新的子节点。
下面分别从示例一和示例二来描述向第二群组中添加子节点的实现过程;其中,示例一为第一节点向第二群组中添加第一节点已管理的子节点D的实现过程,示例二为第一节点向第二群组中添加第一节点新生成的子节点X的实现过程。
示例一
具体实施中,第二群组中包括子节点A、子节点H和子节点I,若第一节点确定将第一节点管理的子节点D添加至第二群组中,则第一节点可以向管理子 节点H的第二节点和管理子节点I的第三节点分别发送第一请求消息,该第一请求消息用于请求子节点H的群组配置文件和子节点I的群组配置文件。以子节点H为例,子节点H的群组配置文件可以包括子节点H所在群组的标识信息以及子节点的网络连接信息。相应地,第二节点在接收到第一请求消息后,可以将子节点H的群组配置文件发送给第一节点,第三节点在接收到第一请求消息后,可以将子节点I的群组配置文件发送给第一节点。
本发明实施例中,第一节点接收到子节点H和子节点I的群组配置文件后,还可以获取第一节点内部存储的子节点A的群组配置文件,并分别从子节点A、子节点H和子节点I的群组配置文件中解析出子节点A、子节点H和子节点I所在群组的标识信息、子节点A、子节点H和子节点I的网络连接信息。进一步地,第一节点可以根据子节点A、子节点H和子节点I所在群组的标识信息确定子节点A、子节点H和子节点I所在的群组,若确定子节点A、子节点H和子节点I中存在一个子节点所在的群组不是第二群组,则第一节点可以向管理所述不在第二群组的子节点的节点发送第二请求消息,第二请求消息用于重新请求子节点的群组配置文件。比如,若子节点H所在群组的标识信息为群组5,则第一节点可以向第二节点发送第二请求消息,此时,第二节点可以重新获取子节点H的群组配置文件,并发送给第一节点。
若确定子节点A、子节点H和子节点I所在的群组均为第二群组,则第一节点可以生成子节点D的群组配置文件,其中,子节点D的群组配置文件中可以包括子节点D所在群组的标识信息以及子节点D的网络连接信息。进一步地,第一节点根据子节点D的群组配置文件启动子节点D后,可以根据子节点D的网络连接信息和子节点A、子节点H、子节点I的网络连接信息,确定允许子节点D加入第二群组的子节点的数量。
具体实施中,确定允许子节点D加入第二群组的子节点的数量的方式可以有多种,在一种可能的实现方式中,第一节点可以控制子节点D分别连接子节点A、子节点H和子节点I。以子节点D连接子节点H为例,若子节点D可以与子节点H连接,则说明子节点H允许子节点D加入第二群组(此处,子节点H 即为一个共识子节点)。如此,若子节点D可以连接子节点A和子节点H,则说明子节点A和子节点H允许子节点D加入第二群组;此时,第一节点可以确定允许子节点D加入第二群组的子节点的数量为2。在另一种可能的实现方式中,若第二群组中设置有第一网络,则子节点D可以向第二群组包括的多个子节点中的任一子节点(比如子节点H)发送入群请求。子节点H在接收到入群请求后,可以在第一网络上广播子节点D的入网请求信息,相应地,子节点A和子节点I可以获取第一网络上子节点H发送的该入网请求信息;进一步地,子节点A、子节点H和子节点I可以在网络上发送允许子节点D入群的信息或不允许子节点D入群的信息。此时,第一节点可以通过第一网络上允许的子节点D入群的信息的数量,确定允许子节点D加入第二群组的子节点的数量。
进一步地,第一节点若确定允许子节点D加入第二群组的共识子节点的数量小于第二预设阈值,则可以确定子节点D未能加入第二群组,此时,第一节点可以生成并发送子节点D入群失败的消息。其中,第二预设阈值可以由本领域技术人员根据经验进行设置,或者也可以根据实验确定,第二预设阈值可以与第一预设阈值相同,或者也可以与第一预设阈值不同,具体不作限定。
第一节点若确定允许子节点D加入第二群组的共识子节点的数量大于或等于第二预设阈值,则可以根据子节点D的群组配置文件激活子节点D。其中,子节点D被激活后,子节点D可以在第二群组中启动,即子节点D可以与第二群组中的子节点A、子节点H和子节点I通信,且子节点D在第二群组中产生的交易记录(比如子节点D与子节点A在第二群组中产生的交易对应的交易记录)可以存储在第二群组的第二账本中,子节点D、子节点A、子节点H和子节点I可以共同维护第二群组的第二账本。
本发明实施例中,区块链系统中的每个节点可以向群组中添加子节点,从而使得在有新的机构加入区块链系统时,可以采用将新的机构添加到已有的群组中的方式,而无需根据区块链系统中原有的机构和新的机构生成一条新的区块链,从而使得对区块链系统的管理效率更高。
示例二
若第一节点确定待加入第二群组的子节点X为新的子节点,则第一节点还可以生成子节点X的证书和私钥。其中,子节点X的证书和私钥的生成方式可以有多种,在一种可能的实现方式中,第一节点可以在向第二节点和第三节点发送第一请求消息之前生成子节点X的证书和私钥。如此,第一节点在生成子节点X的证书和私钥后,子节点X即成为第一节点已管理的一个子节点;此时,第一节点将子节点X加入第二群组的方式可以参照示例一进行实现。
在另一种可能的实现方式中,第一节点可以在生成子节点X的群组配置文件之前,生成子节点X的证书,并对子节点X的证书进行检测,比如检测子节点X的证书格式。若确定子节点X的证书为合法证书,则可以生成子节点X的群组配置文件;若确定子节点X的证书为非法证书,则可以重新生成子节点X的证书。相应地,第一节点还可以在生成子节点X的群组配置文件之后,生成子节点X的私钥,并根据子节点X的私钥启动子节点X。
需要说明的是,在其它可能的实现方式中,子节点X的证书和私钥也可以根据其它方式来生成,具体不作限定。
本发明实施例中,第一节点还可以将第二群组中包括的子节点从第二群组中剔除。其中,被剔除的子节点可以为第二群组中的任意一个或任意多个子节点(如图1所示意出的子节点A、子节点H和子节点I),或者也可以为第二群组包括的多个子节点中被第一节点管理的任意一个或任意多个子节点(如图1所示意出的子节点A),具体可以由本领域技术人员根据实际情况进行设置,本发明实施例对此不作限定。
下面以第一节点将子节点A从第二群组中剔除为例描述本发明实施例中的方案。
具体实施中,第二群组中包括子节点A、子节点H和子节点I,若第一节点确定将子节点A从第二群组中剔除,则第一节点可以发起成员变更请求,并确定成员变更请求是否合法。具体地说,若成员变更请求满足如下要求,则第一节点可以确定成员变更请求合法:待剔除的子节点A为第二群组包括的子节点、第二群组包括的子节点A、子节点H和子节点I已完成区块同步、将子节点 A从第二群组中剔除后,第二群组包括的子节点(即子节点H和子节点I)可以满足实现业务执行的第四阈值(比如,若区块链系统中设置第二群组内的交易记录至少需要Y个共识子节点方可被写入第二群组的账本中,则第四阈值为Y)等。
若第一节点确定成员变更请求不合法,则第一节点可以确定成员变更失败,并可以生成告警信息。比如,第一节点确定子节点A不是第二群组包括的子节点,或者第四预设阈值为3,将子节点A从第二群组中剔除后,第一节点可以确定第二群组中的子节点的数量小于第四预设阈值,此时,第一节点均可以生成告警信息。
若第一节点确定成员变更请求合法,则第一节点可以根据子节点A的群组配置信息生成群组变更交易请求。在一个示例中,第一节点可以通过子节点A将群组变更交易请求发送至第一网络上,以使子节点A、子节点H和子节点I针对于群组变更交易请求进行共识,若确定同意群组变更交易请求的子节点的数量小于第三阈值,则第一节点可以确定群组变更失败,并生成告警信息。其中,第三预设阈值可以由本领域技术人员根据经验进行设置,或者也可以根据实验确定,第三预设阈值可以与第一预设阈值和/或第二预设阈值相同,或者也可以与第一预设阈值和第二预设阈值不同,具体不作限定。
若确定同意群组变更交易请求的子节点的数量大于或等于第三预设阈值,则第一节点可以生成交易记录,并将该交易记录存储至第二群组的账本中。其中,交易记录中可以包括子节点A的标识信息、交易签名和/或交易的哈希值,当子节点A从第二群组中剔除后,第二群组的账本可以由第二群组包括的子节点H和子节点I共同维护。
在本发明实施例中,区块链系统中的每个节点可以从群组中剔除子节点,一方面,通过节点来管理子节点所在的群组,可以使得节点针对于不同的群组进行不同的操作(比如添加子节点、剔除子节点等),使得区块链系统的管理过程更为灵活;另一方面,通过一个群组维护一个账本的方式,可以将群组中产生的交易记录(比如剔除子节点)写入群组的账本中,从而使得多个 子节点可以维护与群组相关的账本,可以保证群组的隐私和安全。
针对上述方法流程,本发明实施例还提供一种区块链系统的群组管理装置,该装置的具体内容可以参照上述方法实施。
图3为本发明实施例提供的一种区块链系统的群组管理装置的结构示意图,如图3所示,该装置包括:
收发模块301,用于确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送M个子节点中被第一节点管理的P个子节点的证书;第一至第N节点中的每个节点管理M个子节点的至少一个子节点;以及,接收第二至第N节点发送的M个子节点中被第二至第N节点管理的M-P个子节点的证书;
处理模块302,用于若确定M-P个子节点的证书为合法证书,则生成P个子节点的群组配置文件,并根据P个子节点的群组配置文件激活P个子节点;以及,若确定第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定第二群组建立成功。
可选地,处理模块302还用于:确定待加入第二群组的子节点为第一节点管理的第M+1子节点后,生成第M+1子节点的群组配置文件;确定M个子节点中允许第M+1子节点接入第二群组的子节点的数量大于或等于第二预设阈值后,根据第M+1子节点的群组配置文件激活第M+1子节点。
可选地,收发模块301还用于,若确定将第Q子节点从第二群组中剔除,则向第二至第N节点发送成员变更请求;第Q子节点为第一节点管理的子节点;
处理模块302还用于,若确定M个子节点中同意成员变更请求的子节点的数量大于或等于第三预设阈值,则生成交易记录,并将交易记录写入第二群组中的M个子节点共同维护的第二账本中。
从上述内容可以看出:本发明的上述实施例中,区块链系统中的第一节点确定待建立的第二群组中所包括的M个子节点后,可以向第二至第N节点发送M个子节点中被第一节点管理的P个子节点的证书,并接收第二至第N节点发送的M-P个子节点的证书,若确定M-P个子节点的证书为合法证书,则生成P个子节点的群组配置文件,并根据P个子节点的群组配置文件激活P个子节点; 进一步地,第一节点若确定第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定第二群组建立成功。本发明实施例中,区块链系统中的每个节点均可以通过管理多个子节点来建立群组,从而使得该群组中的多个子节点共同维护该群组的账本;在实际操作中,通过节点管理子节点的方式来建立群组,可以使得节点将具有相同需求的子节点划归到一个群组中,或者可以根据实际情况将多个子节点划归到一个群组中,从而可以针对于不同的群组分别进行管理,即本发明实施例中的管理方式可以更加灵活地管理区块链系统。
基于与上述图4所示的方法相同的构思,本申请还提供一种计算设备,如图4所示,该计算设备包括:
处理器401、存储器402、收发器403、总线接口404;其中,处理器401、存储器402与收发器403之间通过总线405连接;
所述处理器401,用于读取所述存储器402中的程序,执行上述群组管理方法;
处理器401可以是中央处理器(central processing unit,简称CPU),网络处理器(network processor,简称NP)或者CPU和NP的组合。还可以是硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,简称ASIC),可编程逻辑器件(programmable logic device,简称PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,简称CPLD),现场可编程逻辑门阵列(field-programmable gate array,简称FPGA),通用阵列逻辑(generic array logic,简称GAL)或其任意组合。
所述存储器402,用于存储一个或多个可执行程序,可以存储所述处理器401在执行操作时所使用的数据。
具体地,程序可以包括程序代码,程序代码包括计算机操作指令。存储器402可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,简称RAM);存储器402也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk  drive,简称HDD)或固态硬盘(solid-state drive,简称SSD);存储器402还可以包括上述种类的存储器的组合。
存储器402存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集:
操作指令:包括各种操作指令,用于实现各种操作。
操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。
总线405可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
总线接口404可以为有线通信接入口,无线总线接口或其组合,其中,有线总线接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线总线接口可以为WLAN接口。
基于同一发明构思,本申请实施例还提供了一种计算机可读存储介质,计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述群组管理方法。
基于同一发明构思,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述群组管理方法。
本领域内的技术人员应明白,本发明的实施例可提供为方法、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图 和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (10)

  1. 一种基于群组的区块链系统,其特征在于,所述区块链系统包括一个或多个节点,所述一个或多个节点中的每个节点管理一个或多个子节点;
    所述区块链系统还包括一个或多个群组,所述一个或多个群组中的每个群组包括至少一个子节点;第一群组包括的子节点共同维护第一账本,所述第一账本用于记录所述第一群组包括的子节点产生的交易记录;所述第一群组为所述一个或多个群组中的任一群组;
    管理所述第一群组包括的子节点的节点用于向所述第一群组中添加所述第一群组包括的子节点以外的子节点或者从所述第一群组中删除所述第一群组包括的任一子节点。
  2. 一种区块链系统的群组管理方法,其特征在于,所述方法包括:
    所述区块链系统中的第一节点确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送所述M个子节点中被所述第一节点管理的P个子节点的证书;所述第一至第N节点中的每个节点管理所述M个子节点的至少一个子节点;
    所述第一节点接收所述第二至第N节点发送的M-P个子节点的证书,若确定所述M-P个子节点的证书为合法证书,则生成所述P个子节点的群组配置文件,并根据所述P个子节点的群组配置文件激活所述P个子节点;
    所述第一节点若确定所述第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定所述第二群组建立成功。
  3. 根据权利要求2所述的方法,其特征在于,所述第一节点确定所述第二群组建立成功之后,还包括:
    所述第一节点确定待加入所述第二群组的子节点为所述第一节点管理的第M+1子节点后,生成所述第M+1子节点的群组配置文件;
    所述第一节点确定所述M个子节点中允许所述第M+1子节点接入所述第二群组的子节点的数量大于或等于第二预设阈值后,根据所述第M+1子节点 的群组配置文件激活所述第M+1子节点。
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:
    所述第一节点若确定将第Q子节点从所述第二群组中剔除,则向所述第二至第N节点发送群组变更请求;所述第Q子节点为所述第一节点管理的子节点;
    所述第一节点若确定所述M个子节点中同意所述群组变更请求的子节点的数量大于或等于第三预设阈值,则生成交易记录,并将所述交易记录写入所述第二群组中的M个子节点共同维护的第二账本中。
  5. 一种区块链系统的群组管理装置,其特征在于,所述装置包括:
    收发模块,用于确定待建立的第二群组中所包括的M个子节点后,向第二至第N节点发送所述M个子节点中被所述第一节点管理的P个子节点的证书;所述第一至第N节点中的每个节点管理所述M个子节点的至少一个子节点;以及,接收所述第二至第N节点发送的所述M个子节点中被所述第二至第N节点管理的M-P个子节点的证书;
    处理模块,用于若确定所述M-P个子节点的证书为合法证书,则生成所述P个子节点的群组配置文件,并根据所述P个子节点的群组配置文件激活所述P个子节点;以及,若确定所述第二群组中已激活的子节点的数量大于或等于第一预设阈值,则确定所述第二群组建立成功。
  6. 根据权利要求5所述的装置,其特征在于,所述处理模块还用于:
    确定待加入所述第二群组的子节点为所述第一节点管理的第M+1子节点后,生成所述第M+1子节点的群组配置文件;
    确定所述M个子节点中允许所述第M+1子节点接入所述第二群组的子节点的数量大于或等于第二预设阈值后,根据所述第M+1子节点的群组配置文件激活所述第M+1子节点。
  7. 根据权利要求5或6所述的装置,其特征在于,所述收发模块还用于,若确定将第Q子节点从所述第二群组中剔除,则向所述第二至第N节点发送群组变更请求;所述第Q子节点为所述第一节点管理的子节点;
    所述处理模块还用于,若确定所述M个子节点中同意所述群组变更请求的 子节点的数量大于或等于第三预设阈值,则生成交易记录,并将所述交易记录写入所述第二群组中的M个子节点共同维护的第二账本中。
  8. 一种计算机可读存储介质,其特征在于,包括指令,当其在计算机上运行时,使得计算机执行如权利要求2至4任一项所述的方法。
  9. 一种计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行如权利要求2至4任一项所述的方法。
  10. 一种计算设备,其特征在于,包括处理器、存储器、收发器、总线接口,其中处理器、存储器与收发器之间通过总线连接;
    所述处理器,用于读取所述存储器中的程序,执行权利要求2至4任一项所述方法;
    所述存储器,用于存储一个或多个可执行程序,以及存储所述处理器在执行操作时所使用的数据。
PCT/CN2020/076843 2019-03-05 2020-02-26 一种基于群组的区块链系统、群组管理方法及装置 WO2020177601A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910163295.7 2019-03-05
CN201910163295.7A CN110008739B (zh) 2019-03-05 2019-03-05 一种基于群组的区块链系统、群组管理方法及装置

Publications (1)

Publication Number Publication Date
WO2020177601A1 true WO2020177601A1 (zh) 2020-09-10

Family

ID=67166435

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076843 WO2020177601A1 (zh) 2019-03-05 2020-02-26 一种基于群组的区块链系统、群组管理方法及装置

Country Status (2)

Country Link
CN (1) CN110008739B (zh)
WO (1) WO2020177601A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008739B (zh) * 2019-03-05 2023-10-03 深圳前海微众银行股份有限公司 一种基于群组的区块链系统、群组管理方法及装置
CN111383018B (zh) * 2020-05-28 2020-09-25 支付宝(杭州)信息技术有限公司 在联盟链网络中创建节点组、基于节点组的交易方法
CN115334026B (zh) * 2022-10-12 2023-03-24 北京百度网讯科技有限公司 基于区块链的即时通信处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147735A (zh) * 2017-05-12 2017-09-08 北京博晨技术有限公司 一种基于分层结构的分布式账本系统
CN107592292A (zh) * 2017-07-26 2018-01-16 阿里巴巴集团控股有限公司 一种区块链节点间通信方法及装置
CN108256859A (zh) * 2018-01-02 2018-07-06 中国工商银行股份有限公司 基于区块链的金融产品交易共识方法、节点及系统
CN109242467A (zh) * 2018-09-17 2019-01-18 金蝶软件(中国)有限公司 基于区块链的组网方法、装置、计算机设备和存储介质
CN110008739A (zh) * 2019-03-05 2019-07-12 深圳前海微众银行股份有限公司 一种基于群组的区块链系统、群组管理方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9430649B2 (en) * 2013-12-17 2016-08-30 Microsoft Technology Licensing, Llc Automatic strong identity generation for cluster nodes
CN106101242B (zh) * 2016-06-24 2019-08-06 深圳前海微众银行股份有限公司 区块链云服务平台的构建方法和装置
US11030331B2 (en) * 2017-06-01 2021-06-08 Schvey, Inc. Distributed privately subspaced blockchain data structures with secure access restriction management
CN109040279B (zh) * 2018-08-21 2020-06-23 京东数字科技控股有限公司 区块链网络组网方法、装置、设备及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147735A (zh) * 2017-05-12 2017-09-08 北京博晨技术有限公司 一种基于分层结构的分布式账本系统
CN107592292A (zh) * 2017-07-26 2018-01-16 阿里巴巴集团控股有限公司 一种区块链节点间通信方法及装置
CN108256859A (zh) * 2018-01-02 2018-07-06 中国工商银行股份有限公司 基于区块链的金融产品交易共识方法、节点及系统
CN109242467A (zh) * 2018-09-17 2019-01-18 金蝶软件(中国)有限公司 基于区块链的组网方法、装置、计算机设备和存储介质
CN110008739A (zh) * 2019-03-05 2019-07-12 深圳前海微众银行股份有限公司 一种基于群组的区块链系统、群组管理方法及装置

Also Published As

Publication number Publication date
CN110008739B (zh) 2023-10-03
CN110008739A (zh) 2019-07-12

Similar Documents

Publication Publication Date Title
WO2020177601A1 (zh) 一种基于群组的区块链系统、群组管理方法及装置
WO2020216065A1 (zh) 一种区块链中的投票方法及装置
US20220051240A1 (en) Transferring cryptocurrency from a remote limited access wallet
CN112491847B (zh) 区块链一体机及其自动建链方法、装置
WO2020258912A1 (zh) 一种区块链共识方法、装置和系统
WO2018076759A1 (zh) 基于区块链的多链管理方法、系统、电子装置及存储介质
CN111541724B (zh) 区块链一体机及其节点自动加入方法、装置
WO2019138128A1 (en) Method and system for providing secure access to artifacts in a cloud computing environment
CN110324399B (zh) 将集群意识纳入设施管理门户
CN110855777B (zh) 一种基于区块链的节点管理方法及装置
WO2020119536A1 (zh) 联盟链信息发布控制方法及终端设备
CN112153085A (zh) 一种数据处理方法、节点及区块链系统
EP3726774A1 (en) Transparent blockchain sidechains to support blockchain processing heterogeneity
CN110944046B (zh) 一种共识机制的控制方法及相关设备
CN110569251A (zh) 一种数据处理方法、相关设备及计算机可读存储介质
CN111786812B (zh) 节点管理方法、装置、计算机设备和存储介质
KR101976787B1 (ko) 블록체인에서 스마트 컨트랙트를 이용한 전자 문서 유통 방법
CN112970020A (zh) 使用分布式账本监视设备部件
JP6920442B2 (ja) ブロックチェーンシステムのノード間の通信を確立するための方法及びデバイス
CN113570479B (zh) 一种房产交易数据的区块链传输方法、系统及存储介质
CN112671881B (zh) 节点组织管理方法、装置、电子设备及可读存储介质
JP2022525551A (ja) データレコードのコピーの分散型台帳システムへの誤伝送の防止
WO2023040453A1 (zh) 一种交易信息处理方法及装置
CN113259454B (zh) 跨链交互方法及装置
CN113886495A (zh) 验证区块链数据的方法、装置、电子设备和存储介质

Legal Events

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

Ref document number: 20765722

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20765722

Country of ref document: EP

Kind code of ref document: A1