CN112488834B - Node management method, node management device, electronic equipment and readable storage medium - Google Patents

Node management method, node management device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112488834B
CN112488834B CN202011341927.3A CN202011341927A CN112488834B CN 112488834 B CN112488834 B CN 112488834B CN 202011341927 A CN202011341927 A CN 202011341927A CN 112488834 B CN112488834 B CN 112488834B
Authority
CN
China
Prior art keywords
node
organization
transaction
blockchain network
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011341927.3A
Other languages
Chinese (zh)
Other versions
CN112488834A (en
Inventor
雷罡
李成才
邓柯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202011341927.3A priority Critical patent/CN112488834B/en
Publication of CN112488834A publication Critical patent/CN112488834A/en
Application granted granted Critical
Publication of CN112488834B publication Critical patent/CN112488834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed 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/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The embodiment of the invention provides a node management method, a node management device, electronic equipment and a readable storage medium. The node management method is applied to any node in a public blockchain network in a network system, and the node is maintained with a node organization table which is used for recording organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks; the method comprises the following steps: obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining the target exclusive blockchain network belongs; inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, and verifying the validity of the new node according to the inquired organization information; and under the condition that the new node is legal, confirming that the new node can join the target exclusive blockchain network.

Description

Node management method, node management device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a node management method, a node management device, an electronic device, and a readable storage medium.
Background
The block chain technology is realized on a block chain network, and distributed node equipment in the block chain network realizes generation and consensus of block data by running a block chain program, so that a tamper-proof mechanism of the data is finally realized, and a safe and credible technical new idea is provided for service development.
The blockchain technology can be applied to various business scenes, such as financial field, electronic commerce field, commodity or raw material tracing field, electronic certificate storing field and the like, and can be used for developing business due to the fact that the blockchain technology realizes a data tamper-proof mechanism, so that the trust crisis among parties involved in the business can be solved.
In the related art, as the diversity of business development increases, there is a need to conduct a cross-link transaction between two federation links, or a need to conduct a cross-link transaction between two private links. To this end, technicians develop blockchain network systems that support cross-chain transactions that include two or more federated chain networks, or two or more private chain networks. However, since the blockchain network system includes a plurality of blockchain networks, the blockchain network system is more complex than a single blockchain network, so that a technical solution for managing nodes is needed. Particularly, when a new node is ready to be added, how to ensure the security of the network system is not affected is a technical problem to be solved.
Disclosure of Invention
The embodiment of the invention aims to provide a node management method, a node management device, electronic equipment and a readable storage medium, and the specific technical scheme is as follows:
in a first aspect of the embodiment of the present invention, a node management method is provided, which is applied to any node in a public blockchain network in a network system, where the node maintains a node organization table, and the node organization table is used to record organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks; the method comprises the following steps:
obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, the target proprietary blockchain network being any one of the plurality of proprietary blockchain networks;
inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, and verifying the validity of the new node according to the inquired organization information;
and under the condition that the new node is legal, confirming that the new node can join the target exclusive blockchain network.
In a second aspect of the embodiment of the present invention, a node management apparatus is provided, which is applied to any node in a public blockchain network in a network system, where the node maintains a node organization table, and the node organization table is used to record organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks; the device comprises:
The transaction obtaining module is used for obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, the target proprietary blockchain network being any one of the plurality of proprietary blockchain networks;
the validity verification module is used for inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, and verifying the validity of the new node according to the inquired organization information;
and the new node confirmation module is used for confirming that the new node can join the target exclusive block chain network under the condition that the new node is legal.
In a third aspect of the embodiments of the present invention, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the node management method provided by any embodiment of the present invention when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the node management method provided by any of the embodiments of the present invention.
In the invention, the public blockchain network has centralized control capability on the nodes of each proprietary blockchain network, and when a new node is ready to join any proprietary blockchain network, the public blockchain network can control the joining of the new node to the event, thereby being beneficial to preventing the joining of illegal new nodes to the proprietary blockchain network and further ensuring that the security of the network system is not influenced.
In addition, the invention introduces the concept of node organization, the nodes of the public blockchain network are stored with node organization tables, and the node organization tables are recorded with the organization information of each node organization. When a new node is ready to join a proprietary blockchain network, the node of the public blockchain network can acquire a node joining transaction, then according to an organization ID contained in the node joining transaction, the organization information corresponding to the organization ID is queried from a node organization table, the validity of the new node is verified according to the queried organization information, and then under the condition that the new node is determined to be legal, the new node can be confirmed to join the proprietary blockchain network. In the invention, the validity of the new node can be verified from the node organization level, and the new node is allowed to join under the condition that the new node is determined to be legal. Therefore, the illegal new node can be prevented from joining the exclusive blockchain network, and the bad chance of the illegal new node is reduced, so that the network security is ensured not to be affected.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 (a) is a schematic diagram illustrating a first stage of a node management method according to an embodiment of the present invention;
FIG. 1 (b) is a schematic diagram illustrating a second stage of a node management method according to an embodiment of the present invention;
FIG. 1 (c) is a schematic diagram illustrating a third stage of a node management method according to an embodiment of the present invention;
FIG. 1 (d) is a schematic diagram illustrating a fourth stage of a node management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a node organization deletion stage in a node management method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a node management method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a node management apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The block chain technology is realized on a block chain network, distributed node equipment (hereinafter referred to as nodes for short) in the block chain network realizes generation and consensus of block data by running a block chain program, finally realizes a tamper-proof mechanism of the data, and provides a safe and reliable technical new idea for service development.
In the related art, as the diversity of business development increases, there is a need to conduct a cross-link transaction between two federation links, or a need to conduct a cross-link transaction between two private links. To this end, technicians develop blockchain network systems that support cross-chain transactions that include two or more federated chain networks, or two or more private chain networks. However, since the blockchain network system includes a plurality of blockchain networks, the blockchain network system is more complex than a single blockchain network, so that a technical solution for managing nodes is needed. Particularly, when a new node is ready to be added, how to ensure the security of the network system is not affected is a technical problem to be solved.
In view of this, the present invention proposes a node management method, apparatus, electronic device, and readable storage medium by the following embodiments, which aim to ensure that the security of a network system is not affected when a new node is ready to join.
Referring to fig. 1 (a), fig. 1 (a) is a schematic diagram illustrating a first stage of a node management method according to an embodiment of the present invention, where the node management method is applied to the blockchain network system shown in fig. 1 (a) (hereinafter, simply referred to as a network system). It should be noted that, to simplify the drawing, where each node needs to participate in a step, only one or several nodes are schematically shown in fig. 1 (a), and not all nodes are completely shown to participate in the step.
As shown in fig. 1 (a), the network system includes a common blockchain network and a plurality of proprietary blockchain networks, each of which includes a plurality of distributed node devices (hereinafter, simply referred to as nodes), and a plurality of nodes of one blockchain network implement a blockchain technique by running a blockchain program.
It should be noted that, by public blockchain network, it is not meant that the blockchain network must be a public chain network, and in fact, the public blockchain network may be a public chain network, a federated chain network, or a private chain network, and is preferably a federated chain network or a private chain network. One of the roles of the public blockchain network is: witnessing cross-chain transactions between different proprietary blockchain networks. The exclusive blockchain network is usually a federated chain network or a private chain network. Transactions performed within a proprietary blockchain network typically have some privacy.
The plurality of nodes of the whole network system form a plurality of node organizations, all nodes contained in some node organizations are distributed in the same exclusive blockchain network, all nodes contained in some node organizations are distributed in two or more exclusive blockchain networks, all nodes contained in some node organizations are distributed in a public blockchain network, and all nodes contained in some node organizations are distributed in the exclusive blockchain network and the public blockchain network. It should be noted that the term "some" is a broad concept, and the term "some" may specifically be zero, one, or a plurality of.
For ease of understanding, illustratively, 10 nodes of the bank a dimension, 25 nodes of the bank B dimension, and 5 nodes of the bank C dimension together comprise a proprietary blockchain network pn—01. Bank A, bank B and Bank C may develop private business in-chain with each other through the nodes each in the proprietary blockchain network PN_01. In addition, the other 12 nodes of the bank a operation and maintenance, the other 8 nodes of the bank C operation and maintenance, and the 15 nodes of the bank D operation and maintenance together constitute a proprietary blockchain network pn_02. Bank a, bank C and bank D can develop private business in-chain with each other through the nodes in the proprietary blockchain network pn_02.
The 22 nodes of the bank a are organized as one node, and the 22 nodes of the node organization are distributed in the exclusive blockchain network pn_01 and the exclusive blockchain network pn_02. The bank B has a total of 25 nodes of operation and maintenance as a node organization, and the 25 nodes of the node organization are distributed in the exclusive blockchain network pn_01.
A node organization table is maintained in each node of the common blockchain network for recording organization information of each node organization. In addition, the node organization table may also be maintained in each node of each proprietary blockchain network.
Illustratively, the specific form of the node organization table is shown in Table 1. It should be noted that the node organization table shown in table 1 is only used as an example, and any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the example should be included in the scope of the present invention.
TABLE 1 node organization table
In table 1, a node organization contains node information of a plurality of nodes, and the node information constitutes organization information of the node organization. The node information of one node includes: the public key of the node, the network ID of the proprietary blockchain network to which the node belongs, and the state of the node. For ease of understanding, taking node information of the node a1 as an example, as shown in table 1, the public key of the node a1 is AAAAB3Nz … baqds ortrbb, the network ID of the proprietary blockchain network to which the node a1 belongs is pn_01, and the current state of the node a1 is enabled.
In the invention, each node can read the organization information recorded in the node organization table by inquiring the node organization table maintained by the node.
When a new node a23 is ready to join a proprietary blockchain network, the public blockchain network needs to add pre-registered node information in the node organization table in advance. Specifically, as shown in fig. 1 (a), when the new node a23 is ready to join the proprietary blockchain network, any node of the public blockchain network (e.g., node 1) receives a node information addition transaction tx1 submitted by an administrator, where the node information addition transaction tx1 includes: the public key of the new node a23, and the organization ID of the node organization to which the new node a23 belongs.
As shown in fig. 1 (a), after receiving the node information adding transaction tx1, the node 1 transmits the node information adding transaction tx1 to a plurality of designated nodes to vote according to the convention of the preset voting rule.
For ease of understanding, assume, by way of example, a voting rule convention: adding transaction tx1 for node information requires voting by nodes 2 and 4. Node 1 therefore sends node information add transaction tx1 to nodes 2 and 4 for voting.
Optionally, in some embodiments, the node may read the service parameters (e.g., node public key, organization ID, etc.) carried by the node information add transaction tx1 when voting. And judging whether the read service parameters meet the preset service requirements, if so, casting votes which agree to add the node information by the node, and if not, casting votes which disagree to add the node information by the node.
Alternatively, in other embodiments, the node may display the node information addition transaction tx1 to an administrator of the node when voting, and receive the administrator's vote for the node information addition transaction tx 1. The administrator's vote is used to characterize: whether the node agrees to add node information.
It should be noted that the above two voting methods are merely examples, and the present invention may be implemented in a manner different from the above two voting methods.
As shown in fig. 1 (a), the node 1 receives the voting data returned from each designated node, and fills the voting data of each designated node into the node information addition transaction tx 1. Node 1 transmits the node information addition transaction tx1 filled with voting data to the master node of the public blockchain network.
As shown in fig. 1 (a), after receiving the node information adding transaction tx1, the master node of the public blockchain network sorts the node information adding transaction tx1 with other transactions received in the same time period, thereby generating a transaction package, wherein the transaction package comprises a plurality of transactions with sequential relationship. The master node distributes the transaction package to each node of the common blockchain network.
As shown in fig. 1 (a), after each node of the public blockchain network receives the transaction package, the transaction is read from the transaction package, and each transaction is sequentially executed according to the sequential relationship of each transaction. When the node executes the transaction tx1 for adding the node information, the voting data of each designated node is read from the transaction tx1 for adding the node information, and whether the node information needs to be added is determined according to the voting data of each designated node and a preset first judgment rule.
For ease of understanding, for example, the first judgment rule is: if the number of votes agreeing to add node information in all votes exceeds a preset proportion (e.g., 60%) of the total number of designated nodes, it is determined that node information needs to be added. Assuming that the total number of designated nodes of the common blockchain network is 20, and that the number of votes agreeing to add node information is 18 among all votes for each designated node, it is determined that the node information needs to be added because the number of votes 18 exceeds 60% of 20.
As shown in fig. 1 (a), if a node of the public blockchain network determines that node information needs to be added through the above determination, the node reads an organization ID and a public key from a node information adding transaction tx1, and then adds a piece of pre-registered node information under a corresponding node organization entry of a node organization table, where the pre-registered node information includes: unoccupied public key, network ID, and node status. The unoccupied public key is a public key included in the node information addition transaction tx1, the network ID is temporarily null, and the node status is temporarily inactive.
For ease of understanding, it is assumed by way of example that the node organization to which the new node a23 belongs is node organization a, and the public key of the new node a23 is HGPKaujha … myHXyFaA5y3o. The organization ID included in the node information addition transaction tx1 is equal to the organization ID of the node organization a and the public key included in the node information addition transaction tx1 is equal to HGPKaujha … myHXyFaA5y3o. After adding pre-registered node information in the node organization table, the nodes of the public blockchain network have a new node organization table as shown in table 2.
TABLE 2 New node organization table
In table 2, node a23 under the node organization a is the added preregistered node information, the public key in the preregistered node information is equal to HGPKaujha … myHXyFaA5y3o, the network ID is null, and the state is not enabled.
As shown in fig. 1 (a), the node of the public blockchain network adds node information to transaction tx1 and transaction execution success identification "yes" as the blockdata, thereby generating a new blocklet. In order to distinguish a common blockchain network generated block from a proprietary blockchain network generated block, the common blockchain network generated block is hereinafter referred to as a common block.
As shown in fig. 1 (a), each node of each proprietary blockchain network synchronizes the common blockchain network generated common blocks. Specifically, the nodes of the public blockchain network communicate the generated public blocks to the nodes of the proprietary blockchain network through the network.
When the node of the exclusive blockchain network reads the node information adding transaction tx1 from the synchronized public block and reads the execution success identifier "yes", the node of the exclusive blockchain network adds a piece of pre-registered node information under the corresponding node organization entry of the node organization table maintained by the node adding transaction tx1 through executing the node information, and the pre-registered node information comprises: unoccupied public key, network ID, and node status. The unoccupied public key is a public key included in the node information addition transaction tx1, the network ID is temporarily null, and the node status is temporarily inactive.
Referring to fig. 1 (b), fig. 1 (b) is a schematic diagram illustrating a second stage of a node management method according to an embodiment of the invention. It should be noted that, to simplify the drawing, where each node needs to participate in a step, only one or several nodes are schematically shown in fig. 1 (b) to participate in the step, and not all nodes are completely shown to participate in the step.
As shown in fig. 1 (b), the new node a23 sends a node joining transaction tx2 to the proprietary blockchain network pn_01 to be joined, and the node joining transaction tx2 includes: the node ID of the new node a23 (i.e., a 23), the organization ID of the node organization to which the new node a23 belongs (i.e., the organization ID of the node organization a), the network ID of the proprietary blockchain network to which the new node a23 is to be added (i.e., pn_01), and signature data obtained by signing the transaction data with its private key by the new node a 23. Wherein the transaction data includes, but is not limited to, nodes joining transaction tx 2: node ID, organization ID, network ID, etc.
Illustratively, the transaction structure for node join transaction tx2 is shown in table 3. It should be noted that the transaction structure shown in table 3 is only used as an example, and any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the example are included in the scope of the present invention.
Table 3 node joins the transaction structure table of transaction tx2
It should be noted that, in table 3, the transaction ID is a unique identification of the node joining the transaction tx 2. The transaction type is used for representing whether the transaction is a cross-chain transaction or an in-chain transaction, and in the invention, the node joining transaction tx2 belongs to the cross-chain transaction type. The voting data and the pre-execution result are temporarily empty and are sequentially supplemented in the subsequent process of node joining.
As shown in fig. 1 (b), after the node 7 of the proprietary blockchain network pn_01 receives the node joining transaction tx2 submitted by the new node a23, the transaction type is read from the transaction structure, and the transaction type is identified as the cross-chain transaction type. In response thereto, the node 7 sends the node joining transaction tx2 to a plurality of designated nodes agreed by the preset voting rules for voting according to the preset voting rules corresponding to the cross-chain transaction types.
As shown in fig. 1 (b), the node 7 of the proprietary blockchain network pn_01 receives the voting data returned by each designated node, fills the voting data of each designated node into the node joining transaction tx2, and broadcasts the node joining transaction tx2 filled with the voting data to each node of the proprietary blockchain network pn_01.
As shown in fig. 1 (b), the master node of the proprietary blockchain network pn_01 reforms the node join transaction tx2 to obtain a node join transaction tx3, and submits the node join transaction tx3 to the public blockchain network.
In particular, when each node receives the node joining transaction tx2 broadcast by the node 7, the node joining transaction tx2 is stored, and the node joining transaction tx2 is marked as information to be sent. And each node periodically (e.g., every 5 seconds) determines whether itself is the master node. If the node is the master node, the node joining transaction tx2 to be sent is modified to be the node joining transaction tx3, and the node joining transaction tx3 is sent to the public blockchain network. In addition, after the master node submits node-joining transaction tx3 to the public blockchain network, the master node may send hint information to each node so that each node marks node-joining transaction tx2 as sent information.
In the invention, because each node of the exclusive blockchain network stores the node joining transaction tx2, after any node is elected as a master node, the node joining transaction tx2 to be sent can be obtained locally, the node joining transaction tx2 is transformed into the node joining transaction tx3, and then submitted to the public blockchain network. Therefore, the node joining transaction tx3 is submitted to the public blockchain network in the mode, so that the node joining transaction tx3 is more reliably submitted to the public blockchain network, and the loss of the node joining transaction tx3 is not easy to cause.
When the master node reforms the node to join the transaction tx2, specifically, the master node alters the transaction ID of the node joining the transaction tx2, so as to obtain the reformed node joining the transaction tx2, that is, the node joining the transaction tx3.
Illustratively, the transaction structure for node join transaction tx3 is shown in table 4.
Table 4 node joins the transaction structure table of transaction tx3
As can be seen by comparing with Table 3, voting data is added to the node-joining transaction tx3, and the transaction ID of the node-joining transaction tx3 is different from the transaction ID of the node-joining transaction tx 2. In some embodiments, to obtain the transaction ID of the node join transaction tx3, the master node may modify the first character of the node ID of the node join transaction tx2, e.g., modify the first character "0" to the first character "1".
As shown in fig. 1 (b), any node of the public blockchain network (e.g., node 1) may submit a node join transaction tx3 to a master node of the public blockchain network upon receiving the node join transaction tx3. The master node generates a transaction package in response to the node joining transaction tx3, the transaction package including the node joining transaction tx3. The master node distributes the transaction package to each node of the common blockchain network.
As shown in fig. 1 (b), after each node of the public blockchain network receives the transaction packet, the node joining transaction tx3 is read out from the transaction packet, and the node joining transaction tx3 is performed. When executing the node joining transaction tx3, each node specifically reads voting data from the node joining transaction tx3, and determines whether the exclusive blockchain network pn_01 agrees to join with the new node according to a preset second determination rule, thereby generating a determination result. Each node adds the generated judging result and the node into the transaction tx3 as block data, thereby generating a new public block.
For ease of understanding, for example, the second judgment rule is: if the number of votes to be added by a new node in all votes of a proprietary blockchain network exceeds a predetermined proportion (e.g., 60%) of the total number of votes nodes of the proprietary blockchain network, then the proprietary blockchain network is determined to agree to be added by the new node. Assuming that the number of all voting nodes of the proprietary blockchain network pn_01 is 15, and the number of votes which are agreed to be added by the new node is 13 votes in all votes of the proprietary blockchain network a, since the number of votes 13 exceeds 60% of 15, it is determined that the proprietary blockchain network pn_01 agrees to be added by the new node.
It should be noted that the above-mentioned second determination rule is only an example, and should not be construed as limiting the present invention. In the implementation of the present invention, other judgment rules different from the second judgment rule may be adopted.
Referring to fig. 1 (c), fig. 1 (c) is a schematic diagram illustrating a third stage of a node management method according to an embodiment of the present invention. It should be noted that, to simplify the drawing, where each node needs to participate in a step, only one or several nodes are schematically shown in fig. 1 (c), and not all nodes are completely shown to participate in the step.
As previously described, and as shown in fig. 1 (c), each node of each proprietary blockchain network synchronizes the common blockchain network generated common blocks. For example, in fig. 1 (c), nodes of the proprietary blockchain network pn_01 continuously synchronize common blocks. Likewise, nodes of the proprietary blockchain network pn_02 also continuously synchronize common blocks.
As shown in fig. 1 (c), after each node of the proprietary blockchain network pn_01 reads the determination result from the synchronized common block and the node joins the transaction tx3, the node reads the network ID from the node joining transaction tx3 and determines whether the network ID is equal to the network ID of the proprietary blockchain network pn_01. If so, it is indicated that the proprietary blockchain network to which the new node is ready to join is proprietary blockchain network PN_01, so that the node needs to continue to execute the subsequent node joining flow. If not, it is indicated that the proprietary blockchain network to which the new node is ready to join is not proprietary blockchain network PN_01, so that the node does not need to perform a subsequent node joining procedure.
Since the network ID of the node joining transaction tx3 is equal to the network ID of the proprietary blockchain network pn_01, each node of the proprietary blockchain network pn_01 needs to continue the following procedure.
For the proprietary blockchain network pn_02, since the network ID of the node joining transaction tx3 is not equal to the network ID of the proprietary blockchain network pn_02, each node of the proprietary blockchain network pn_02 does not need to continue the following procedure.
As shown in fig. 1 (c), after determining that the network ID of the node joining transaction tx3 is equal to the network ID of the proprietary blockchain network pn_01, each node of the proprietary blockchain network pn_01 identifies a determination result in the common block, and if the determination result characterizes: and if the public block chain network determines that the exclusive block chain network PN_01 agrees to join the new node, the node of the exclusive block chain network PN_01 performs pre-execution operation on the node joining transaction tx3 to obtain a pre-execution result.
Furthermore, if the determination result characterizes: if the public blockchain network determines that the proprietary blockchain network PN_01 does not agree to join the new node, the node of the proprietary blockchain network PN_01 does not need to continue to execute the subsequent node joining process, thereby terminating the node joining process.
In the invention, pre-execution operation is implemented on node joining transaction tx3, specifically: the executing node joins the transaction tx3, but the resulting execution result is not saved to the ledger database. In other words, although the executing node joins the transaction tx3, the resulting execution result is not preserved by the uplink.
In specific implementation, each node of the proprietary blockchain network pn_01 reads an organization ID from the node joining transaction tx3, and queries organization information corresponding to the organization ID from the node organization table by using the organization ID as an index. And then reading the node ID from the node joining transaction tx3, taking the node ID as an index, and further inquiring pre-registered node information corresponding to the node ID from the inquired organization information. And then acquiring the unoccupied public key from the queried preregistered node information. And finally, utilizing the obtained unoccupied public key to carry out signature verification on signature data added into the transaction tx3 by the node, and obtaining a signature verification result. The signature verification result can be used as a pre-execution result.
In addition, if the organization ID of the node joining transaction tx3 is taken as an index and the organization information corresponding to the organization ID cannot be queried from the node organization table, the verification failure is determined, and the result of the verification failure is taken as a pre-execution result.
In addition, if the organization ID in the node joining transaction tx3 is used as an index, the organization information corresponding to the organization ID is queried from the node organization table, but the node ID in the node joining transaction tx3 is used as an index, the preregistered node information corresponding to the node ID cannot be further queried from the queried organization information, the verification failure is determined, and the result of the verification failure is used as a prerexecuted result.
With the above example, since the organization ID of the node joining transaction tx3 is a, the organization information under the node organization a entry is queried from the node organization table. And because the node ID of the node joining transaction tx3 is a23, the preregistered node information corresponding to the node a23 is further queried from the queried organization information. And then acquiring the unoccupied public key from the queried pre-registered node information. And finally, utilizing the obtained unoccupied public key to check signature of signature data 9 CTbeldjcacIAbXNGYV … ZNtyQePSQVrqrkKn added to the node in the transaction tx3, obtaining a signature checking result, and taking the signature checking result as a pre-execution result.
It should be noted that, the unoccupied public key means: the public key in the node information is preregistered. For ease of understanding, as shown in table 2, the node information of the node a1 includes the network ID, and the node status is enabled, so the public key in the node information of the node a1 is not an unoccupied public key. Similarly, the node information of the node a22 includes the network ID, and the node status is enabled, so that the public key in the node information of the node a22 is not the unoccupied public key. The network ID in the node information of the node a23 is null and the node status is not enabled, so the public key in the node information of the node a23 is an unoccupied public key.
As shown in fig. 1 (c), each node of the proprietary blockchain network pn_01 submits the pre-execution result to the master node of the proprietary blockchain network pn_01. After receiving the pre-execution results of each node, the master node reforms the node joining transaction tx3 to obtain a reformed node joining transaction tx3, and the reformed node joining transaction tx3 is simply referred to as a node joining transaction tx4.
Illustratively, the transaction structure for node join transaction tx4 is shown in table 5.
Table 5 node joins the transaction structure table of transaction tx4
As can be seen by comparing with table 4, the pre-execution result of each node of the proprietary blockchain network pn_01 is further added to the node joining transaction tx4. The transaction ID of node-join transaction tx4 is different from the transaction ID of node-join transaction tx3, but is equal to the transaction ID of node-join transaction tx 2.
As shown in fig. 1 (c), the master node of the proprietary blockchain network pn_01 submits a node joining transaction tx4 to the public blockchain network.
As shown in fig. 1 (c), after any node of the public blockchain network (e.g., node 1) receives the node-join transaction tx4, the node-join transaction tx4 may be submitted to a master node of the public blockchain network. The master node generates a transaction package in response to the node joining transaction tx4, the transaction package including the node joining transaction tx4. The master node distributes the transaction package to each node of the common blockchain network.
As shown in fig. 1 (c), after each node of the public blockchain network receives the transaction packet, reads the node joining transaction tx4 from the transaction packet, and executes the node joining transaction tx4, thereby generating a new public block.
Wherein, when executing node joining transaction tx4, the node of the public blockchain network specifically:
1. and reading the pre-execution result from the node joining transaction tx4, and judging whether the exclusive blockchain network PN_01 successfully pre-executes the node joining transaction tx3 according to the read pre-execution result and a preset third judging rule. For example, the third determination rule is specifically: if the number of the pre-execution results representing the pass of the verification signature exceeds a preset proportion in all the pre-execution results, the fact that the exclusive blockchain network PN_01 successfully pre-executes the node joining transaction tx3 is determined.
2. If the proprietary blockchain network PN_01 is determined to be successful in executing the node joining transaction tx3, reading the organization ID from the node joining transaction tx4, taking the organization ID as an index, and inquiring organization information corresponding to the organization ID from a node organization table. And then reading the node ID from the node joining transaction tx4, taking the node ID as an index, and further inquiring pre-registered node information corresponding to the node ID from the inquired organization information. And then acquiring the unoccupied public key from the queried preregistered node information. And finally, checking signature of signature data added into the transaction tx4 by the node by using the acquired unoccupied public key.
3. If the verification sign passes, the new node is determined to be legal, so that the new node can be confirmed to be added into the exclusive blockchain network PN_01. Thus, the network ID of the node in the transaction is recorded in the organization information corresponding to the organization ID (i.e., the organization information of the node organization a). Specifically, the network ID is recorded in the pre-registered node information corresponding to the node a23, and the node state in the pre-registered node information is changed to be enabled, so that the node organization table of the local node is updated. In addition, the update identification and node are added to the transaction tx4 as tile data and recorded into the newly generated common tile. Wherein the update identifier, which characterizes nodes of the public blockchain network, successfully updates the node organization table, the update identifier being in the form of "yes".
4. If the verification signature does not pass, the new node is determined to be illegal, so that the new node is confirmed to be incapable of joining the exclusive blockchain network PN_01. Thus, the update identification and node are added to the transaction tx4 as tile data and recorded into the newly generated common tile. Wherein the nodes of the update identity used to characterize the public blockchain network do not update the node organization table, the update identity is shaped as "no".
5. If the organization ID of the node joining transaction tx4 is taken as an index, and the organization information corresponding to the organization ID cannot be queried from the node organization table, the verification failure is determined, so that the new node is determined to be illegal, and the new node is further determined to be unable to join the exclusive blockchain network PN_01. Thus, the update identification and node are added to the transaction tx4 as tile data and recorded into the newly generated common tile. Wherein the nodes of the update identity used to characterize the public blockchain network do not update the node organization table, the update identity is shaped as "no".
6. If the organization ID of the node joining transaction tx4 is used as an index, the organization information corresponding to the organization ID is queried from the node organization table, but the node ID of the node joining transaction tx4 is used as an index, and the preregistered node information corresponding to the node ID cannot be further queried from the queried organization information, the signature verification failure is determined, so that the new node is determined to be illegal, and the fact that the new node cannot join the exclusive blockchain network PN_01 is further determined. Thus, the update identification and node are added to the transaction tx4 as tile data and recorded into the newly generated common tile. Wherein the nodes of the update identity used to characterize the public blockchain network do not update the node organization table, the update identity is shaped as "no".
Referring to fig. 1 (d), fig. 1 (d) is a schematic diagram illustrating a fourth stage of a node management method according to an embodiment of the present invention. It should be noted that, to simplify the drawing, where each node needs to participate in a step, only one or several nodes are schematically shown in fig. 1 (d) to participate in the step, and not all nodes are completely shown to participate in the step.
As previously described, and as shown in fig. 1 (d), each node of each proprietary blockchain network synchronizes the common blockchain network generated common blocks. For example, in fig. 1 (d), nodes of the proprietary blockchain network pn_01 continuously synchronize common blocks. Likewise, nodes of the proprietary blockchain network pn_02 also continuously synchronize common blocks.
As shown in fig. 1 (d), after each node of the proprietary blockchain network pn_01 reads the update identification from the synchronized common block and the node joins the transaction tx4, the node recognizes the update identification. If the update identification characterizes that the public blockchain network successfully updates the node organization table, it is stated that the public blockchain network has acknowledged and witnessed the joining of the new node, so that the node needs to continue to perform the subsequent node joining flow. If the update identification characterizes that the public blockchain network has not updated the node organization table, it is stated that the public blockchain network does not acknowledge or witnessed the joining of new nodes, and therefore the nodes do not need to perform subsequent node joining flows.
As shown in fig. 1 (d), when the node of the proprietary blockchain network pn_01 needs to continue to execute the subsequent node joining process, the organization ID is read from the node joining transaction tx4, and the organization information corresponding to the organization ID is queried from the node organization table by taking the organization ID as an index. And then reading the node ID from the node joining transaction tx4, taking the node ID as an index, and further inquiring pre-registered node information corresponding to the node ID from the inquired organization information. And then acquiring the unoccupied public key from the queried preregistered node information. And finally, utilizing the obtained unoccupied public key to carry out signature verification on signature data added into the transaction tx4 by the node, and obtaining a signature verification result.
When the verification passes, the network ID of the node added to the transaction is recorded in the organization information corresponding to the organization ID (i.e., the organization information of the node organization a). Specifically, the network ID is recorded in the pre-registered node information corresponding to the node a23, and the node state in the pre-registered node information is changed to be enabled, so that the node organization table of the local node is updated.
As shown in fig. 1 (d), similarly, for the node of the proprietary blockchain network pn_02, the network ID of the node in the transaction is recorded in the organization information corresponding to the organization ID (i.e., the organization information of the node organization a). Specifically, the network ID is recorded in the pre-registered node information corresponding to the node a23, and the node state in the pre-registered node information is changed to be enabled, so that the node organization table of the local node is updated.
Optionally, in some embodiments, each node of each proprietary blockchain network also maintains a local node table. A local node table maintained by a node is used to record: node information of all nodes contained in the exclusive blockchain network to which the node belongs. Illustratively, the node information includes, but is not limited to: node ID, node public key, etc.
Each node of each proprietary blockchain network also reads the network ID from the common block and determines whether the network ID of the proprietary blockchain network to which it belongs is equal to the network ID. This process is not shown in fig. 1 (d) for simplicity of the drawing.
If so, the proprietary blockchain network to which the node belongs is described, and the proprietary blockchain network to which the new node is ready to join is the proprietary blockchain network. In this case, the node adds the node information of the new node to its maintained local node table, acknowledging that the new node may join the proprietary blockchain network. When the node executes the in-chain task subsequently, the identity of the new node can be confirmed by querying the local node table of the operation and maintenance of the node.
If not, the exclusive blockchain network to which the node belongs is indicated, and the exclusive blockchain network to which the new node is to be added is not indicated. In this case, the node does not add node information of the new node to the local node table it maintains.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a node organization deletion stage in a node management method according to an embodiment of the present invention. It should be noted that, to simplify the drawing, where each node needs to participate in a step, only one or a few nodes are schematically shown in fig. 2 to participate in the step, and not all nodes are completely shown to participate in the step.
As shown in fig. 2, when a node organization needs to be deleted (for example, when it is determined that an illegal operation exists in a node organization and deletion is needed), any node (for example, node 1) of the public blockchain network receives an organization deletion transaction tx5 sent by an administrator, where the organization deletion transaction tx5 includes: the organization ID of the target node organization to be deleted.
As shown in fig. 2, in response to the organization deletion transaction tx5, the node 1 sends the organization deletion transaction tx5 to nodes in a plurality of node organizations agreed by the preset voting rules to vote according to the preset voting rules corresponding to the organization deletion transaction. Wherein nodes participating in the voting are limited to nodes within the public blockchain network.
For ease of understanding, it is assumed by way of example that a plurality of nodes within a common blockchain network respectively belong to: node organization A, node organization E, node organization F, node organization G, and node organization H. Among the plurality of nodes included in the node organization a, in addition to a part of the nodes distributed in the common blockchain network, a part of the nodes are distributed in the exclusive blockchain network pn_01 and the exclusive blockchain network pn_02.
Also, assume that the node organization involved in voting, which is agreed by the preset voting rule, includes: node organization a, node organization F, and node organization G. Node 1 sends only the tissue deletion transaction tx5 to the following nodes for voting: a node belonging to node organization A and located within the public blockchain network, a node belonging to node organization F and located within the public blockchain network, and a node belonging to node organization G and located within the public blockchain network.
As shown in fig. 2, the node 1 receives voting data returned by each node, and the voting data of each node is used for representing: whether the designated node agrees to delete the target node organization. Node 1 populates the voting data of each node into the organization deletion transaction tx5 and submits the organization deletion transaction tx5 populated with the voting data to the master node of the public blockchain network.
As shown in fig. 2, after receiving the organization deletion transaction tx5, the master node of the public blockchain network sorts the organization deletion transaction tx5 with other transactions received in the same time period, so as to generate a transaction package, where the transaction package includes a plurality of transactions having a sequential relationship. The master node distributes the transaction package to each node of the common blockchain network.
As shown in fig. 2, after each node of the public blockchain network receives the transaction package, the transaction is read from the transaction package, and each transaction is sequentially executed according to the sequence relation of each transaction. When the node executes the organization deletion transaction tx5, the voting data of each node is read from the organization deletion transaction tx5, and whether each node organization agrees to delete the target node organization is judged according to the voting data of each node and a preset fourth judgment rule, so that whether the target node organization is deleted is determined.
For ease of understanding, for example, the fourth judgment rule is: if the number of votes characterizing the consent to delete the target node organization reaches a first predetermined proportion (e.g., 60%) in all voting data of one node organization, it is determined that the node organization agrees to delete the target node organization. If the number of node organizations that agree to delete the target node organization among all the node organizations participating in the voting reaches a second preset proportion (e.g., 50%), it is determined to delete the target node organization.
In the invention, the voting is carried out by taking the node organization as a unit, which is equivalent to collecting all votes of all nodes in one node organization as a vote representing the node organization, thus the voting influence difference caused by different node numbers of all node organizations can be eliminated, the deletion or not of a target node organization can be arbitrarily controlled by a few node organizations due to excessive node numbers, and the fairness and the safety of the whole network system can be improved.
As shown in fig. 2, if the node of the public blockchain network determines that the target node organization needs to be deleted through the above determination, the node reads the organization ID from the organization deletion transaction tx5, and deletes the organization information under the corresponding organization ID entry in the node organization table.
For ease of understanding, assume, by way of example, that the organization ID in organization delete transaction tx5 is a. In other words, node organization a is the target node organization that needs to be deleted. After deleting the organization information of the node organization A, the updated node organization table is shown in table 6.
TABLE 6 node organization table
As can be seen from comparison between the above tables 1 and 2, the updated node organization table deletes the organization information of the node organization a.
As shown in fig. 2, the nodes of the public blockchain network will organize the delete transaction tx5 and the transaction execution success identification "yes" as blockdata to generate a new public blocklet.
As shown in fig. 2, each node of each proprietary blockchain network synchronizes the common blockchain network generated common blocks. When the node of the exclusive blockchain network reads the organization deletion transaction tx5 from the synchronized public block and reads the successful execution identification 'yes', the node of the exclusive blockchain network responds to the organization deletion transaction tx5, reads the organization ID from the organization deletion transaction tx5, and deletes the organization information corresponding to the organization ID from the node organization table locally maintained by the node.
By implementing the invention, the following beneficial effects can be achieved:
in the invention, the public blockchain network has centralized control capability on the nodes of each proprietary blockchain network, and when a new node is ready to join any proprietary blockchain network, the public blockchain network can control the joining of the new node to the event, thereby being beneficial to preventing the joining of illegal new nodes to the proprietary blockchain network and further ensuring that the security of the network system is not influenced.
In addition, the invention introduces the concept of node organization, the nodes of the public blockchain network are stored with node organization tables, and the node organization tables are recorded with the organization information of each node organization. When a new node is ready to join a proprietary blockchain network, the node of the public blockchain network can acquire a node joining transaction, then according to an organization ID contained in the node joining transaction, the organization information corresponding to the organization ID is queried from a node organization table, the validity of the new node is verified according to the queried organization information, and then under the condition that the new node is determined to be legal, the new node can be confirmed to join the proprietary blockchain network. In the invention, the validity of the new node can be verified from the node organization level, and the new node is allowed to join under the condition that the new node is determined to be legal. Therefore, the illegal new node can be prevented from joining the exclusive blockchain network, and the bad chance of the illegal new node is reduced, so that the network security is ensured not to be affected.
In addition, in the invention, the public blockchain network can obtain the voting data of the exclusive blockchain network, judge whether the exclusive blockchain network agrees to join with a new node according to the voting data, and record the judging result as the blockdata to the blockchain. Thus, the public blockchain network witnessed this event as to whether a new node can join. In addition, after the node of the exclusive blockchain network reads the judging result from the synchronized public block, the subsequent node joining process is continuously executed only when the judging result characterizes that the public blockchain network determines that the exclusive blockchain network agrees to join the new node. In this way, the following can be prevented from occurring: when the whole exclusive blockchain network does not agree to the new node to be added, a few nodes in the exclusive blockchain network continue to execute the node adding flow.
In addition, in the invention, under the condition that the exclusive blockchain network successfully pre-executes the node joining transaction, the public blockchain network executes the node joining transaction. The exclusive blockchain network continues to execute the subsequent node joining flow after obtaining the executing result of the public blockchain network to the node joining transaction. In this way, the following situations can be effectively avoided: the exclusive blockchain network successfully performs node joining transaction (i.e. acknowledges joining of new nodes), while the public blockchain network does not successfully perform node joining transaction (i.e. does not acknowledge joining of new nodes), and after other exclusive blockchain networks obtain the execution result of the execution failure of the public blockchain network, the node organization table is not updated (i.e. does not acknowledge joining of new nodes), so that each blockchain network does not agree on the joining of new nodes.
In the above, the present invention provides a node management method through a preferred embodiment. In the following, the present invention proposes other node management methods according to other embodiments. It should be noted that the following embodiments may be referred to with the above embodiments. It should be further noted that, during implementation, the node management method set forth in the following embodiments does not necessarily depend on the network system shown in the foregoing drawings.
Referring to fig. 3, fig. 3 is a flowchart of a node management method according to an embodiment of the present invention, where the node management method is applied to any node in a public blockchain network in a network system, and the node maintains a node organization table, where the node organization table is used to record organization information of each node organization. In addition, the network system also comprises a plurality of exclusive blockchain networks.
As shown in fig. 3, the node management method includes the steps of:
step S31: obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: an organization ID of a node organization to which a new node joining a target proprietary blockchain network is belongs is prepared, the target proprietary blockchain network being any one of the plurality of proprietary blockchain networks.
For ease of understanding, assume that new node a23 belongs to node organization A, and that the node joins the transaction to include the organization ID for node organization A.
Optionally, in some embodiments, and with reference to the foregoing preferred embodiments, the node-joining transaction is submitted to the public blockchain network by a master node of the target-specific blockchain network, the master node of the public blockchain network generating a transaction package for the node-joining transaction and distributing the transaction package to each node of the public blockchain network. In this manner, each node of the public blockchain network obtains a node-join transaction. In order to correspond to the foregoing preferred embodiment, it should be noted that the node joining transaction described herein corresponds to the node joining transaction tx4 in the foregoing preferred embodiment.
Alternatively, in other embodiments, the new node may send the node join transaction directly to a node of the public blockchain network, which in turn broadcasts the node join transaction to other nodes in the public blockchain network. In this manner, each node of the public blockchain network obtains a node-join transaction.
It should be noted that, in addition to the above specific embodiments, those skilled in the art may also use other ways to enable the nodes of the public blockchain network to obtain the node joining transaction, and such other ways are also included in the protection scope of the present invention.
Step S32: inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, and verifying the validity of the new node according to the inquired organization information.
Optionally, in some embodiments, the node joining transaction further includes signature data and a node ID of the new node, where the signature data is data obtained by signing the transaction data with a private key of the new node. In order to verify the legitimacy of the new node, with reference to the preferred embodiment described above, the following sub-steps may be performed:
substep S32-1: reading a pre-registered unoccupied public key from the queried organization information;
substep S32-2: signature verification is carried out on signature data added into the transaction by the node by using the read unoccupied public key;
substep S32-3: under the condition that the verification sign passes, determining that the new node is legal;
substep S32-4: and under the condition that the verification signature does not pass, determining that the new node is illegal.
For an explanation of the unoccupied public key, reference should be made to the preferred embodiment.
In order to read the pre-registered unoccupied public key from the queried organization information, the node ID included in the node joining transaction may be used as an index, the pre-registered node information corresponding to the node ID may be queried from the queried organization information, and the unoccupied public key may be read from the queried pre-registered node information.
In addition, when the node ID included in the node joining transaction is used as an index, and the preregistered node information corresponding to the node ID cannot be queried from the queried organization information, the new node is determined to be illegal.
In addition, when the organization ID included in the node joining transaction is used as an index and the organization information corresponding to the organization ID cannot be queried from the node organization table, it is determined that the new node is not legal.
It can be seen that in the above embodiment, in order to join a new node, the node organization table needs to have pre-registered node information, and the pre-registered node information needs to include a public key of the new node, otherwise, the new node is confirmed as illegal. Therefore, the wrought nodes can be prevented from being randomly added into any node organization and exclusive blockchain network, and the security of the network system is further improved.
In order to add pre-registered node information to the node organization table in advance, other technical means may be implemented in addition to the steps shown in fig. 1 (a) described above. For example, when constructing a node organization table, a plurality of pieces of preregistered node information are reserved for each node organization.
Optionally, in some embodiments, to verify the legitimacy of the new node, the following sub-steps may also be performed:
substep S32-A: after inquiring the organization information corresponding to the organization ID, counting the number of nodes contained in the organization information;
substep S32-B: if the counted number of the nodes does not reach a preset threshold (for example, 50), determining that the new nodes are legal;
substep S32-C: if the counted number of the nodes reaches a preset threshold value, determining that the new node is illegal.
Step S33: and under the condition that the new node is legal, confirming that the new node can join the target exclusive blockchain network.
By executing the steps S31 to S33, the public blockchain network has centralized control capability on the nodes of each proprietary blockchain network, and when a new node is ready to join any proprietary blockchain network, the public blockchain network can control the joining of the new node to such events, thereby being beneficial to preventing the joining of the illegal new node to the proprietary blockchain network and further ensuring that the security of the network system is not affected.
In addition, the invention introduces the concept of node organization, the nodes of the public blockchain network are stored with node organization tables, and the node organization tables are recorded with the organization information of each node organization. When a new node is ready to join a proprietary blockchain network, the node of the public blockchain network can acquire a node joining transaction, then according to an organization ID contained in the node joining transaction, the organization information corresponding to the organization ID is queried from a node organization table, the validity of the new node is verified according to the queried organization information, and then under the condition that the new node is determined to be legal, the new node can be confirmed to join the proprietary blockchain network. In the invention, the validity of the new node can be verified from the node organization level, and the new node is allowed to join under the condition that the new node is determined to be legal. Therefore, the illegal new node can be prevented from joining the exclusive blockchain network, and the bad chance of the illegal new node is reduced, so that the network security is ensured not to be affected.
Optionally, in some embodiments, referring to the foregoing preferred embodiment, one node organization includes one or more nodes; a node organization includes multiple nodes distributed in the same proprietary blockchain network, or in multiple proprietary blockchain networks, or in proprietary blockchain networks and common blockchain networks.
Optionally, in some embodiments, referring to the foregoing preferred embodiment, the node joining transaction further includes a network ID of the target-specific blockchain network. After confirming that the new node can join the target-specific blockchain network, the following steps can also be performed:
recording the network ID of the node added into the transaction into the organization information corresponding to the organization ID so as to update the node organization table; adding the update identification and the node into a transaction as block data, and recording the block data into a new public block, wherein the update identification is used for representing that the public block chain network successfully updates the node organization table; and sending the public block to each exclusive blockchain network, so that each node of each exclusive blockchain network recognizes an update identifier contained in the public block after obtaining the public block, and responds to the node joining transaction under the condition that the update identifier represents that the public blockchain network successfully updates the node organization table, thereby recording the network ID of the node joining transaction into the organization information corresponding to the organization ID so as to update the node organization table.
In the invention, the data recorded in the public block is the data which is commonly recognized by the public block chain network, so that the data has uniformity and high credibility. When nodes of each proprietary blockchain network are synchronized to a common block, the nodes can acquire unified data from the common block. Thus, when each node finishes processing the node joining transaction in the public block, each node performs the same update on the node organization table maintained by each node, so that the node organization table maintained by each node has uniformity.
Optionally, in some specific embodiments, referring to the foregoing preferred embodiments, the method may further include the steps of: obtaining an organization deletion transaction, wherein the organization deletion transaction comprises: an organization ID of a target node organization to be deleted, and votes of a plurality of node organizations for the organization deletion transaction; determining whether to delete the target node organization according to votes of a plurality of node organizations for the organization deletion transaction; if yes, deleting the organization information corresponding to the organization ID of the target node organization from the node organization table.
In the specific embodiment, the deletion management is implemented on the node organization, so that the management and control capability of the public blockchain network on the node organization can be further improved, and the node organization which does not meet the service requirement or the supervision requirement in the whole network system can be cleared in time.
Based on the same inventive concept, the embodiment of the invention also provides a node management device. Referring to fig. 4, fig. 4 is a schematic diagram of a node management apparatus according to an embodiment of the present invention, where the node management apparatus is applied to any node in a public blockchain network in a network system, and the node maintains a node organization table for recording organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks. As shown in fig. 4, the node management apparatus includes:
the transaction obtaining module 41 is configured to obtain a node joining transaction, where the node joining transaction includes: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, the target proprietary blockchain network being any one of the plurality of proprietary blockchain networks;
the validity verification module 42 is configured to query organization information corresponding to the organization ID from the node organization table according to the organization ID included in the node joining transaction, and verify the validity of the new node according to the queried organization information;
a new node confirmation module 43, configured to confirm that the new node can join the target-specific blockchain network if the new node is legal.
Optionally, in some embodiments, one node organization includes one or more nodes; a node organization includes multiple nodes distributed in the same proprietary blockchain network, or in multiple proprietary blockchain networks, or in proprietary blockchain networks and common blockchain networks.
Optionally, in some specific embodiments, the node further includes signature data in the joining transaction, where the signature data is data obtained by signing transaction data with a private key of the new node; the validity verification module comprises:
the public key inquiry unit is used for reading the pre-registered unoccupied public key from the inquired organization information;
the signature verification unit is used for verifying signature of signature data added into the transaction by the node by using the read unoccupied public key;
the validity confirming unit is used for confirming that the new node is legal under the condition that the verification sign passes; and under the condition that the verification signature does not pass, determining that the new node is illegal.
Optionally, in some embodiments, the node joining transaction further includes a node ID of the new node; the public key inquiry unit is specifically configured to: and inquiring pre-registered node information corresponding to the node ID from the inquired organization information by taking the node ID contained in the node joining transaction as an index, and reading an unoccupied public key from the inquired pre-registered node information.
Optionally, in some specific embodiments, the validity confirming unit is further configured to: and under the condition that the node ID contained in the node joining transaction is taken as an index, and the preregistered node information corresponding to the node ID cannot be inquired from the inquired organization information, determining that the new node is illegal.
Optionally, in some embodiments, the node joining transaction further includes a network ID of the target-specific blockchain network; the apparatus further comprises:
a node organization table updating module, configured to record, after the new node confirmation module confirms that the new node can join the target-specific blockchain network, a network ID of the node in a transaction into organization information corresponding to the organization ID, so as to update the node organization table;
the block generation module adds the update identification and the nodes into the transaction as block data and records the block data into a new public block, wherein the update identification is used for representing whether the public block chain network successfully updates the node organization table;
and the block sending module is used for sending the public block to each exclusive blockchain network, so that each node of each exclusive blockchain network recognizes an update identifier contained in the public block after obtaining the public block, and responds to the node joining transaction under the condition that the update identifier represents that the public blockchain network successfully updates the node organization table, thereby recording the network ID of the node joining transaction into the organization information corresponding to the organization ID so as to update the node organization table.
Optionally, in some embodiments, the transaction acquisition module is further configured to: obtaining an organization deletion transaction, wherein the organization deletion transaction comprises: an organization ID of a target node organization to be deleted, and votes of a plurality of node organizations for the organization deletion transaction;
the apparatus further comprises:
the voting processing module is used for determining whether to delete the target node organization according to votes of a plurality of node organizations for the organization deletion transaction;
and the organization information deleting module is used for deleting the organization information corresponding to the organization ID of the target node organization from the node organization table under the condition that the voting processing module determines to delete the target node organization.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Based on the same inventive concept, the embodiment of the invention also provides an electronic device, as shown in fig. 5, which comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete communication with each other through the communication bus 504.
The memory 503 is used for storing a computer program;
the processor 501 is configured to implement the following steps when executing a program stored on the memory 503:
obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, the target proprietary blockchain network being any one of the plurality of proprietary blockchain networks;
inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, and verifying the validity of the new node according to the inquired organization information;
and under the condition that the new node is legal, confirming that the new node can join the target exclusive blockchain network.
Alternatively, the processor 501 is configured to implement the steps of the node management method provided in the other method embodiments of the present invention when executing the program stored in the memory 503.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the node management method according to any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (6)

1. A node management method, which is characterized in that the node management method is applied to any node in a public blockchain network in a network system, the node maintains a node organization table, and the node organization table is used for recording organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks; the method comprises the following steps:
obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, a node ID of the new node, and a network ID of the target proprietary blockchain network, wherein the target proprietary blockchain network is any one of the plurality of proprietary blockchain networks; the node organization comprises node information of a plurality of nodes, and the node information forms organization information of the node organization; the node information of one node includes: the public key of the node, the network ID of the exclusive blockchain network to which the node belongs, and the state of the node;
Inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node joining transaction, verifying the validity of the new node according to the inquired organization information, and firstly reading a pre-registered unoccupied public key from the inquired organization information, wherein the method comprises the following steps: the node ID contained in the node joining transaction is used as an index, pre-registered node information corresponding to the node ID is queried from queried organization information, and an unoccupied public key is read from the queried pre-registered node information; under the condition that the node ID contained in the node joining transaction is taken as an index and the pre-registered node information corresponding to the node ID cannot be queried from the queried organization information, determining that the new node is illegal;
under the condition that the new node is legal, confirming that the new node can join the target exclusive blockchain network, and then recording the network ID of the node in the transaction to the organization information corresponding to the organization ID so as to update the node organization table; adding an update identifier and the node into a transaction as block data, and recording the block data into a new public block, wherein the update identifier is used for representing that the public block chain network successfully updates the node organization table; sending the public block to each exclusive blockchain network, so that after each node of each exclusive blockchain network obtains the public block, identifying an update identifier contained in the public block, and under the condition that the update identifier represents that the public blockchain network successfully updates the node organization table, responding to the node joining transaction, thereby recording a network ID in the node joining transaction into organization information corresponding to the organization ID to update the node organization table;
Wherein a plurality of nodes of the network system form a plurality of node organizations;
one node organization comprises one or more nodes; a node organization includes multiple nodes distributed in the same proprietary blockchain network, or in multiple proprietary blockchain networks, or in proprietary blockchain networks and common blockchain networks.
2. The method of claim 1, wherein the node further includes signature data in the transaction, the signature data being obtained by signing the transaction data with a private key of the new node; the verifying the validity of the new node according to the queried organization information comprises the following steps:
reading a pre-registered unoccupied public key from the queried organization information;
signature verification is carried out on signature data added into the transaction by the node by using the read unoccupied public key;
under the condition that the verification sign passes, determining that the new node is legal;
and under the condition that the verification signature does not pass, determining that the new node is illegal.
3. The method according to any one of claims 1 to 2, further comprising:
obtaining an organization deletion transaction, wherein the organization deletion transaction comprises: an organization ID of a target node organization to be deleted, and votes of a plurality of node organizations for the organization deletion transaction;
Determining whether to delete the target node organization according to votes of a plurality of node organizations for the organization deletion transaction;
if yes, deleting the organization information corresponding to the organization ID of the target node organization from the node organization table.
4. A node management device, which is applied to any node in a public blockchain network in a network system, wherein the node maintains a node organization table, and the node organization table is used for recording organization information of each node organization; the network system also comprises a plurality of exclusive blockchain networks; the device comprises:
the transaction obtaining module is used for obtaining a node joining transaction, wherein the node joining transaction comprises the following steps: preparing an organization ID of a node organization to which a new node joining a target proprietary blockchain network belongs, a node ID of the new node, and a network ID of the target proprietary blockchain network, wherein the target proprietary blockchain network is any one of the plurality of proprietary blockchain networks; the node organization comprises node information of a plurality of nodes, and the node information forms organization information of the node organization; the node information of one node includes: the public key of the node, the network ID of the exclusive blockchain network to which the node belongs, and the state of the node;
The validity verification module is configured to query organization information corresponding to the organization ID from the node organization table according to the organization ID included in the node joining transaction, and verify validity of the new node according to the queried organization information, and first read a pre-registered unoccupied public key from the queried organization information, where the method includes: the node ID contained in the node joining transaction is used as an index, pre-registered node information corresponding to the node ID is queried from queried organization information, and an unoccupied public key is read from the queried pre-registered node information; under the condition that the node ID contained in the node joining transaction is taken as an index and the pre-registered node information corresponding to the node ID cannot be queried from the queried organization information, determining that the new node is illegal;
a new node confirmation module, configured to confirm that, in case that the new node is legal, the new node may join the target-specific blockchain network, and then record a network ID of the node in the transaction into organization information corresponding to the organization ID, so as to update the node organization table; adding an update identifier and the node into a transaction as block data, and recording the block data into a new public block, wherein the update identifier is used for representing that the public block chain network successfully updates the node organization table; sending the public block to each exclusive blockchain network, so that after each node of each exclusive blockchain network obtains the public block, identifying an update identifier contained in the public block, and under the condition that the update identifier represents that the public blockchain network successfully updates the node organization table, responding to the node joining transaction, thereby recording a network ID in the node joining transaction into organization information corresponding to the organization ID to update the node organization table;
Wherein a plurality of nodes of the network system form a plurality of node organizations;
one node organization comprises one or more nodes; a node organization includes multiple nodes distributed in the same proprietary blockchain network, or in multiple proprietary blockchain networks, or in proprietary blockchain networks and common blockchain networks.
5. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method steps of any of claims 1-3 when executing a program stored on a memory.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method steps of any of claims 1-3.
CN202011341927.3A 2020-11-24 2020-11-24 Node management method, node management device, electronic equipment and readable storage medium Active CN112488834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011341927.3A CN112488834B (en) 2020-11-24 2020-11-24 Node management method, node management device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011341927.3A CN112488834B (en) 2020-11-24 2020-11-24 Node management method, node management device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112488834A CN112488834A (en) 2021-03-12
CN112488834B true CN112488834B (en) 2024-03-19

Family

ID=74934401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011341927.3A Active CN112488834B (en) 2020-11-24 2020-11-24 Node management method, node management device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112488834B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255003B (en) * 2021-06-15 2022-03-18 中国电子科技网络信息安全有限公司 Block chain system safety management and control method
CN113726758A (en) * 2021-08-25 2021-11-30 百保(上海)科技有限公司 Data privacy calculation method and system based on block chain

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572450A (en) * 2019-09-05 2019-12-13 腾讯科技(深圳)有限公司 Data synchronization method and device, computer readable storage medium and computer equipment
CN110599384A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Organization relation transfer method, device, equipment and storage medium
CN110690999A (en) * 2019-10-11 2020-01-14 腾讯科技(深圳)有限公司 Bandwidth allocation method, device and equipment based on block chain and storage medium
CN111163182A (en) * 2020-03-20 2020-05-15 杭州海康威视数字技术股份有限公司 Block chain-based device registration method and apparatus, electronic device, and storage medium
CN111310945A (en) * 2020-02-25 2020-06-19 北京阿尔山金融科技有限公司 Operation and maintenance management method and device and electronic equipment
WO2020186726A1 (en) * 2019-03-18 2020-09-24 苏宁云计算有限公司 Block chain-based blacklist data sharing method and system
CN111782630A (en) * 2020-06-24 2020-10-16 上海对外经贸大学 Block chain application design based on double-chain structure
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium
CN111913833A (en) * 2020-06-28 2020-11-10 华南理工大学 Medical Internet of things transaction system based on block chain
CN111935251A (en) * 2020-07-28 2020-11-13 成都质数斯达克科技有限公司 Block chain network management method, network, device, equipment and storage medium
CN111953754A (en) * 2020-07-31 2020-11-17 成都质数斯达克科技有限公司 Cross-chain transaction method, electronic device and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11294875B2 (en) * 2019-05-31 2022-04-05 Advanced New Technologies Co., Ltd. Data storage on tree nodes

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020186726A1 (en) * 2019-03-18 2020-09-24 苏宁云计算有限公司 Block chain-based blacklist data sharing method and system
CN110572450A (en) * 2019-09-05 2019-12-13 腾讯科技(深圳)有限公司 Data synchronization method and device, computer readable storage medium and computer equipment
CN110599384A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Organization relation transfer method, device, equipment and storage medium
CN110690999A (en) * 2019-10-11 2020-01-14 腾讯科技(深圳)有限公司 Bandwidth allocation method, device and equipment based on block chain and storage medium
CN111310945A (en) * 2020-02-25 2020-06-19 北京阿尔山金融科技有限公司 Operation and maintenance management method and device and electronic equipment
CN111163182A (en) * 2020-03-20 2020-05-15 杭州海康威视数字技术股份有限公司 Block chain-based device registration method and apparatus, electronic device, and storage medium
CN111782630A (en) * 2020-06-24 2020-10-16 上海对外经贸大学 Block chain application design based on double-chain structure
CN111913833A (en) * 2020-06-28 2020-11-10 华南理工大学 Medical Internet of things transaction system based on block chain
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium
CN111935251A (en) * 2020-07-28 2020-11-13 成都质数斯达克科技有限公司 Block chain network management method, network, device, equipment and storage medium
CN111953754A (en) * 2020-07-31 2020-11-17 成都质数斯达克科技有限公司 Cross-chain transaction method, electronic device and readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
区块链安全监管技术研究综述;洪学海等;《中国科学基金》;20200314;第18-24页 *
基于区块链的医药防伪溯源系统研究;禹忠;郭畅;谢永斌;薛栋;;计算机工程与应用;20191113(第03期);第35-41页 *
基于区块链的网络空间标识服务;张曼等;《数据与计算发展前沿》;20201015;第2卷(第5期);第52-64页 *

Also Published As

Publication number Publication date
CN112488834A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN110958117B (en) Block chain interoperability with support for zero knowledge proof
CN109189962B (en) License service implementation system based on block chain
KR102002509B1 (en) Privite blockchain system including notarizing center and notarial method thereof
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN112488834B (en) Node management method, node management device, electronic equipment and readable storage medium
CN112671881B (en) Node organization management method and device, electronic equipment and readable storage medium
CN111953754B (en) Cross-chain transaction method, electronic device and readable storage medium
CN112671908B (en) Network management method and device, electronic equipment and readable storage medium
US11403281B2 (en) Parallel blockchain processing
CN112422341B (en) Fault detection method of block chain network and related equipment
CN112800129A (en) Block state updating method, device and system and electronic equipment
CN114726554B (en) Copyright authentication system and method based on alliance chain and NFT
CN111221914A (en) Data exchange sharing tracing method based on block chain
CN112612856A (en) Data processing method and device based on block chain
CN110990879A (en) Data evidence storing method based on block chain
CN111010282B (en) Block chain-based information processing method, related device and storage medium
CN110334484B (en) Copyright verification method and device, computer equipment and storage medium
CN112037055B (en) Transaction processing method, device, electronic equipment and readable storage medium
CN112272114A (en) Method, device, equipment and storage medium for sending information across block chain network
CN111680282A (en) Node management method, device, equipment and medium based on block chain network
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
CN113364592A (en) Engineering system file management system and method based on credit value union chain
CN112202581A (en) Group joining method and device and electronic equipment
CN112600874B (en) Node joining method and device, electronic equipment and readable storage medium
WO2023098327A1 (en) Blockchain-based block processing method and apparatus, device, storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant