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

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

Info

Publication number
CN112488834A
CN112488834A CN202011341927.3A CN202011341927A CN112488834A CN 112488834 A CN112488834 A CN 112488834A CN 202011341927 A CN202011341927 A CN 202011341927A CN 112488834 A CN112488834 A CN 112488834A
Authority
CN
China
Prior art keywords
node
organization
transaction
network
new
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.)
Granted
Application number
CN202011341927.3A
Other languages
Chinese (zh)
Other versions
CN112488834B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Marketing (AREA)
  • Computer Hardware Design (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

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 block chain network in a network system, a node organization table is maintained in the node, and the node organization table is used for recording organization information organized by each node; the network system also comprises a plurality of exclusive block chain networks; the method comprises the following steps: obtaining a node join transaction, wherein the node join transaction comprises: preparing an organization ID of a node organization to which a new node added into a target exclusive block chain network belongs; inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node adding transaction, and verifying the validity of the new node according to the inquired organization information; and confirming that the new node can be added into the target exclusive block chain network under the condition that the new node is legal.

Description

Node management method and 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 and apparatus, 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, finally realizes a tamper-proof mechanism of the data, and provides a safe and reliable new technical idea for business development.
The block chain technology can be applied to various service scenes, such as the financial field, the electronic commerce field, the commodity or raw material tracing field, the electronic evidence storage field and the like.
In the related art, as the diversity of business development increases, a need arises for performing a cross-chain transaction between two federation chains or a cross-chain transaction between two private chains. To this end, the skilled person develops a blockchain network system that supports cross-chain transactions, comprising two or more federation 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, and therefore, it is necessary to provide a technical solution for managing nodes. Especially when a new node is ready to join, how to ensure that the security of the network system is not affected is a technical problem to be solved.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a node management method, an apparatus, an electronic device, and a readable storage medium, and a specific technical solution is as follows:
in a first aspect of the embodiments of the present invention, a node management method is provided, which is applied to any node in a public block chain 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 block chain networks; the method comprises the following steps:
obtaining a node join transaction, wherein the node join transaction comprises: preparing an organization ID of a node organization to which a new node joining a target-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific blockchain networks;
inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node adding transaction, and verifying the validity of the new node according to the inquired organization information;
and confirming that the new node can be added into the target exclusive block chain network under the condition that the new node is legal.
In a second aspect of the embodiments of the present invention, a node management apparatus is provided, which is applied to any node in a public block chain 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 block chain networks; the device comprises:
a transaction obtaining module, 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-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific 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 adding transaction and verifying the validity of the new node according to the inquired organization information;
a new node confirmation module, configured to confirm that the new node may join the target dedicated block link network when the new node is legal.
In a third aspect of the embodiments of the present invention, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete 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 in any embodiment of the present invention when executing the program stored in the memory.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the node management method provided in any of the embodiments of the present invention.
In the invention, the public block chain network has centralized control capability on the nodes of each exclusive block chain network, and when a new node is ready to join any exclusive block chain network, the public block chain network can control the new node joining events, thereby being beneficial to preventing illegal new nodes from joining the exclusive block chain network and further ensuring that the security of the network system is not influenced.
In addition, the invention introduces a concept of node organization, a node organization table is stored in the node of the public block chain network, and organization information of each node organization is recorded in the node organization table. When a new node is ready to join a special 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, organization information corresponding to the organization ID is inquired from a node organization table, the legality of the new node is verified according to the inquired organization information, and then under the condition that the new node is determined to be legal, the fact that the new node can join the special blockchain network is confirmed. Therefore, the validity of the new node can be verified from the node organization level, and the new node is allowed to be added under the condition that the new node is determined to be legal. Therefore, the method can prevent the illegal new node from adding into the exclusive block chain network, and reduce the malicious opportunity of the illegal new node, thereby ensuring that the network security is not influenced.
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 obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1(a) is a schematic diagram of a first stage of a node management method according to an embodiment of the present invention;
fig. 1(b) is a schematic diagram of a second stage of a node management method according to an embodiment of the present invention;
fig. 1(c) is a third-stage schematic diagram of a node management method according to an embodiment of the present invention;
fig. 1(d) is a schematic diagram of a fourth stage of a node management method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a node organization deletion phase in the node management method according to an embodiment of the present invention;
fig. 3 is a flowchart 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 solution 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 is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The block chain technology is realized on a block chain network, distributed node equipment (hereinafter referred to as nodes) in the block chain network realizes generation and consensus of block data by operating a block chain program, finally realizes a tamper-proof mechanism of the data, and provides a safe and reliable new technical idea for business development.
In the related art, as the diversity of business development increases, a need arises for performing a cross-chain transaction between two federation chains or a cross-chain transaction between two private chains. To this end, the skilled person develops a blockchain network system that supports cross-chain transactions, comprising two or more federation 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, and therefore, it is necessary to provide a technical solution for managing nodes. Especially when a new node is ready to join, how to ensure that the security of the network system is not affected is a technical problem to be solved.
In view of this, the present invention provides a node management method, an apparatus, an electronic device and a readable storage medium through the following embodiments, which are intended to ensure that 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 of a first stage of a node management method according to an embodiment of the present invention, the node management method is applied to the blockchain network system (hereinafter, referred to as a network system) shown in fig. 1 (a). It should be noted that, in order to simplify the drawing, all the steps that each node needs to participate in are only schematically shown in fig. 1(a), and not completely shown.
As shown in fig. 1(a), the network system includes a common blockchain network and a plurality of dedicated blockchain networks, each blockchain network includes a plurality of distributed node devices (hereinafter, referred to as nodes), and a plurality of nodes of one blockchain network implement a blockchain technique by running a blockchain program.
Note that the term "public blockchain network" does not necessarily mean that the blockchain network is a public-chain network, and actually, the public blockchain network may be a public-chain network, a alliance-chain network, or a private-chain network, and preferably an alliance-chain network or a private-chain network. One of the roles of the public block chain network is: chain-crossing transactions between different proprietary blockchain networks are witnessed. The so-called private blockchain network is typically a federation chain network or a private chain network. Transactions performed within a proprietary blockchain network are generally private.
A plurality of nodes of the whole network system form a plurality of node organizations, all nodes contained by some node organizations are distributed in the same exclusive block chain network, all nodes contained by some node organizations are distributed in two or more exclusive block chain networks, all nodes contained by some node organizations are distributed in a public block chain network, and all nodes contained by some node organizations are distributed in the exclusive block chain network and the public block chain network. It should be noted that "some" is a broad concept, and specifically, zero, one or more "some" may be used.
For the sake of understanding, 10 nodes of the operation and maintenance of the bank a, 25 nodes of the operation and maintenance of the bank B, and 5 nodes of the operation and maintenance of the bank C, for example, collectively form the private block chain network PN _ 01. The bank a, the bank B and the bank C can mutually develop private services in the chain through nodes in the private block chain network PN _ 01. In addition, another 12 nodes of the operation and maintenance of the bank a, another 8 nodes of the operation and maintenance of the bank C, and 15 nodes of the operation and maintenance of the bank D together form a private block chain network PN _ 02. The bank a, the bank C and the bank D can mutually develop private services in the chain through respective nodes in the private block chain network PN _ 02.
22 nodes of the bank a, which are total operation and maintenance, are organized as one node, and the 22 nodes organized by the node are distributed in the private block chain network PN _01 and the private block chain network PN _ 02. The 25 nodes of the operation and maintenance of the bank B are organized as one node, and the 25 nodes organized by the node are distributed in the private block chain network PN _ 01.
A node organization table is maintained in each node of the public block chain network and used for recording organization information organized by each node. In addition, the node organization table may also be maintained in each node of each exclusive 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 an example, and any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the example should be included in the protection scope of the present invention.
Table 1 node organization table
Figure BDA0002796975470000051
In table 1, a node organization includes 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 exclusive blockchain network to which the node belongs, and the state of the node. For the convenience of understanding, taking the node information of the node a1 as an example for specific explanation, as shown in table 1, the public key of the node a1 is AAAAB3Nz … BAQDSOrtrbB, the network ID of the dedicated 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 the dedicated blockchain network, the common blockchain network needs to add pre-registered node information in the node organization table in advance. Specifically, as shown in fig. 1(a), when a new node a23 is ready to join the private blockchain network, any node (e.g., node 1) of the public blockchain network 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 addition transaction tx1, the node 1 sends the node information addition transaction tx1 to a plurality of designated nodes for voting according to the convention of the preset voting rule.
For ease of understanding, assume, by way of example, that the voting rule convention: a transaction tx1 is added for node information and needs to be voted on by node 2 and node 4. Node 1 sends node information add transaction tx1 to node 2 and node 4 for voting.
Optionally, in some specific embodiments, when the node performs the voting, the node information may be read, and the service parameters (e.g., the node public key, the organization ID, etc.) carried by the transaction tx1 may be added. And then judging whether the read service parameters meet the preset service requirements, if so, casting a vote which agrees to add the node information by the node, and if not, casting a vote which does not agree 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 two voting methods are merely examples, and other methods different from the two voting methods may be adopted in the specific implementation of the present invention.
As shown in fig. 1(a), the node 1 receives the voting data returned by each designated node, and fills the voting data of each designated node into the node information addition transaction tx 1. Node 1 sends the node information addition transaction tx1, populated with voting data, to the master node of the public blockchain network.
As shown in fig. 1(a), after receiving the node information addition transaction tx1, the master node of the public blockchain network sorts the node information addition transaction tx1 with other transactions received at the same time, thereby generating a transaction package including 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. 1(a), after each node of the public block link network receives a transaction packet, it reads out transactions from the transaction packet, and executes the transactions in sequence according to the sequence relationship of the transactions. When the node executes the node information adding transaction tx1, the voting data of each designated node is read from the node information adding transaction tx1, 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, the first determination rule is, for example: and if the number of votes agreeing to add the node information in all the votes exceeds a preset proportion (for example, 60%) of the total number of the specified nodes, determining that the node information needs to be added. Assuming that the total number of designated nodes of the public block chain network is 20, and the number of votes agreeing to add node information among all votes of each designated node is 18 votes, it is determined that 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 block link network determines that node information needs to be added through the above determination, the node reads an organization ID and a public key from the node information addition transaction tx1, and then adds a piece of pre-registered node information under a corresponding node organization entry of the node organization table, where the pre-registered node information includes: unoccupied public keys, network ID, and node status. The unoccupied public key is the public key included in the node information addition transaction tx1, the network ID is temporarily null, and the node state is temporarily not enabled.
For convenience of understanding, it is assumed by way of example that the node to which the new node a23 belongs is organized as node organization a, and the public key of the new node a23 is HGPKaujha … myHXyFaA5y3 o. 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 … myHXyFaA5y3 o. After the node of the public block chain network adds the pre-registered node information in the node organization table, the new node organization table is shown in table 2.
TABLE 2 New node organization table
Figure BDA0002796975470000071
Figure BDA0002796975470000081
In table 2, the node a23 in the node organization a entry is the added pre-registered node information, the public key in the pre-registered node information is equal to HGPKaujha … myHXyFaA5y3o, the network ID is null, and the status is not enabled.
As shown in fig. 1(a), the node of the public blockchain network adds the node information to the transaction tx1 and the transaction execution success flag "yes" as the tile data, thereby generating a new tile. In order to distinguish the blocks generated by the common blockchain network from the blocks generated by the dedicated blockchain network, the blocks generated by the common blockchain network are hereinafter referred to as common blocks.
As shown in fig. 1(a), each node of each dedicated blockchain network synchronizes common blocks generated by the common blockchain network. Specifically, the node of the public block chain network transfers the generated public block to the node of the exclusive block chain 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 successfully executed identifier "yes", the node of the exclusive blockchain network adds the transaction tx1 by executing the node information, so that a piece of pre-registered node information is added under the corresponding node organization entry of the node organization table maintained by the node of the exclusive blockchain network, and the pre-registered node information comprises: unoccupied public keys, network ID, and node status. The unoccupied public key is the public key included in the node information addition transaction tx1, the network ID is temporarily null, and the node state is temporarily not enabled.
Referring to fig. 1(b), fig. 1(b) is a second stage schematic diagram of a node management method according to an embodiment of the invention. It should be noted that, in order to simplify the figure, all the steps that each node needs to participate in are shown only schematically in fig. 1(b), and not all the nodes are shown to participate in the steps.
As shown in fig. 1(b), the new node a23 sends a node join transaction tx2 to the dedicated blockchain network PN _01 to be joined, and the node join transaction tx2 includes: the node ID of the new node a23 (i.e., a23), 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 dedicated blockchain network to which the new node a23 is to join (i.e., PN _01), and the signature data obtained by the new node a23 signing the transaction data with its private key. Wherein the transaction data includes but is not limited to the following of the node joining transaction tx 2: node ID, organization ID, and network ID, etc.
Illustratively, the transaction structure of the node join transaction tx2 is shown in table 3. It should be noted that the transaction structure shown in table 3 is only an example, and any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the example should be included in the protection scope of the present invention.
Table 3 transaction structure table for node joining transaction tx2
Figure BDA0002796975470000091
It should be added that, in table 3, the transaction ID is a unique identifier 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 intra-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 dedicated blockchain network PN _01 receives the node submitted by the new node a23 to join the transaction tx2, the transaction type is read from the transaction structure, and the transaction type is identified as a cross-chain transaction type. In response, the node 7 sends the node join 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-link transaction types.
As shown in fig. 1(b), the node 7 of the dedicated blockchain network PN _01 receives the voting data returned by each designated node, and fills the voting data of each designated node into the node join transaction tx2, and broadcasts the node join transaction tx2 filled with the voting data to each node of the dedicated blockchain network PN _ 01.
As shown in fig. 1(b), the master node of the dedicated blockchain network PN _01 modifies the node join transaction tx2 to obtain a node join transaction tx3, and submits the node join transaction tx3 to the common blockchain network.
In specific implementation, after each node receives the node join transaction tx2 broadcast by the node 7, the node join transaction tx2 is stored, and the node join transaction tx2 is marked as information to be sent. And, each node periodically (e.g., every 5 seconds) determines whether it is the master node. And if the node is the main node, transforming the node joining transaction tx2 to be sent into a node joining transaction tx3, and sending the node joining transaction tx3 to the public block chain network. Further, after the master node submits the node join transaction tx3 to the public blockchain network, the master node may send a hint message to each node so that each node marks the node join transaction tx2 as sent.
In the invention, each node of the exclusive blockchain network stores the node joining transaction tx2, after any node is elected to be a main node, the node joining transaction tx2 to be sent can be obtained from the local, and the node joining transaction tx2 is transformed into the node joining transaction tx3 and then is submitted to the public blockchain network. Therefore, submitting the node join transaction tx3 to the public blockchain network in the above manner can make the node join transaction tx3 more reliably submitted to the public blockchain network, and is not easy to cause the loss of the node join transaction tx 3.
When the master node joins the transaction tx2 in the modified node, specifically, the master node changes the transaction ID that the node joins the transaction tx2, and the modified node joins the transaction tx2, that is, the node joins the transaction tx 3.
Illustratively, the transaction structure of the node join transaction tx3 is shown in table 4.
Table 4 transaction structure table for node joining transaction tx3
Figure BDA0002796975470000101
Figure BDA0002796975470000111
As can be seen by comparison with table 3, the voting data is added to the node join transaction tx3, and the transaction ID of the node join transaction tx3 is different from the transaction ID of the node join transaction tx 2. In some embodiments, to obtain the transaction ID for the node join transaction tx3, the master node may modify the first character of the node ID for the node join transaction tx2, such as modifying the first character "0" to the first character "1".
As shown in fig. 1(b), after any node of the public blockchain network (e.g., node 1) receives the node join transaction tx3, the node join transaction tx3 may be submitted to the master node of the public blockchain network. The master node generates a transaction package containing the node join transaction tx3 in response to the node join transaction tx 3. 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 join transaction tx3 is read from the transaction packet, and the node join transaction tx3 is executed. When each node executes the node joining transaction tx3, specifically, the voting data is read from the node joining transaction tx3, and according to a preset second judgment rule, whether the exclusive block chain network PN _01 agrees to join a new node is judged, so that a judgment result is generated. Each node adds the judgment result generated by the node and the node to the transaction tx3 as block data, thereby generating a new common block.
For ease of understanding, the second determination rule is, for example: if the number of votes agreeing to be added by the new node in all votes of one exclusive blockchain network exceeds a preset proportion (for example, 60%) of the number of all voting nodes of the exclusive blockchain network, determining that the exclusive blockchain network agrees to be added by the new node. Assuming that the number of all voting nodes of the dedicated block chain network PN _01 is 15, and the number of votes granted to a new node in all votes of the dedicated block chain network a is 13, it is determined that the dedicated block chain network PN _01 grants the new node since the number of votes 13 exceeds 60% of 15.
The second judgment rule is only an example, and should not be construed as limiting the present invention. In the implementation of the present invention, other determination rules different from the second determination rule may be adopted.
Referring to fig. 1(c), fig. 1(c) is a third stage schematic diagram of a node management method according to an embodiment of the present invention. It should be noted that, in order to simplify the figure, all the steps that each node needs to participate in are shown only schematically in fig. 1(c), and not all the nodes are shown to participate in the step.
As previously described, and as shown in fig. 1(c), each node of each dedicated blockchain network synchronizes common blocks generated by the common blockchain network. For example, in fig. 1(c), each node of the private blockchain network PN _01 continuously synchronizes to a common block. Similarly, each node of the private blockchain network PN _02 continuously synchronizes to the common block.
As shown in fig. 1(c), after each node of the dedicated blockchain network PN _01 reads the determination result from the synchronized common block and the node join transaction tx3, the node reads the network ID from the node join transaction tx3 and determines whether the network ID is equal to the network ID of the dedicated blockchain network PN _ 01. If yes, it indicates that the dedicated blockchain network to which the new node is ready to join is the dedicated blockchain network PN _01, so that the node needs to continue to perform the subsequent node joining process. If not, the dedicated blockchain network to which the new node is ready to join is not the dedicated blockchain network PN _01, so that the node does not need to perform a subsequent node joining process.
Since the network ID of the node join transaction tx3 is equal to the network ID of the dedicated blockchain network PN _01, each node of the dedicated blockchain network PN _01 needs to continue the following process.
For the dedicated blockchain network PN _02, since the network ID of the node joining transaction tx3 is not equal to the network ID of the dedicated blockchain network PN _02, each node of the dedicated blockchain network PN _02 does not need to continue the following process.
As shown in fig. 1(c), after each node of the dedicated blockchain network PN _01 determines that the network ID of the node join transaction tx3 is equal to the network ID of the dedicated blockchain network PN _01, each node of the dedicated blockchain network PN _01 identifies a determination result in the common block, and if the determination result is characterized: and if the public block link network determines that the exclusive block link network PN _01 agrees to add a new node, the node of the exclusive block link network PN _01 carries out pre-execution operation on the node adding transaction tx3 to obtain a pre-execution result.
Furthermore, if the determination characterizes: and the public block link network determines that the special block link network PN _01 does not agree with the addition of a new node, so that the node of the special block link network PN _01 does not need to continuously execute a subsequent node addition process, thereby terminating the node addition process.
In the invention, pre-execution operation is implemented on the node joining transaction tx3, specifically: the executing node joins 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 saved by the uplink.
In specific implementation, each node of the exclusive block chain network PN _01 reads the organization ID from the node join transaction tx3, and uses the organization ID as an index to query the organization information corresponding to the organization ID from the node organization table. Then, the node ID is read from the node joining transaction tx3, and the node ID is used as an index to further query the pre-registered node information corresponding to the node ID from the queried organization information. And then acquiring the unoccupied public key from the inquired pre-registered node information. And finally, checking the signature data added into the transaction tx3 by the node by using the obtained unoccupied public key to obtain a signature checking result. The signature verification result can be used as a pre-execution result.
In addition, if the organization ID added into the transaction tx3 by the node is used as an index, the organization information corresponding to the organization ID cannot be inquired from the node organization table, the signature verification failure is determined, and the result of the signature verification failure is used as a pre-execution result.
In addition, if the organization information corresponding to the organization ID is inquired from the node organization table by using the organization ID added into the transaction tx3 as an index, but the pre-registered node information corresponding to the node ID cannot be further inquired from the inquired organization information by using the node ID added into the transaction tx3 as an index, the signature verification failure is determined, and the result of the signature verification failure is used as the pre-execution result.
Following the example above, since the organization ID in the node join transaction tx3 is a, the organization information under the node organization a entry is looked up from the node organization table. And because the node ID of the node joining transaction tx3 is a23, the pre-registered node information corresponding to the node a23 is further inquired from the inquired organization information. And then acquiring the unoccupied public key from the inquired pre-registered node information. And finally, checking the signature data 9CTbeldjcIAbXNGYV … ZNtyQeSQVQrkKn added into the transaction tx3 by using the obtained unoccupied public key to obtain a signature checking result, and taking the signature checking result as a pre-execution result.
It should be noted that the unoccupied public key refers to: and pre-registering the public key in the node information. For the convenience 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, since the node information of the node a22 includes the network ID and the node status is enabled, the public key in the node information of the node a22 is not an 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 dedicated blockchain network PN _01 submits a pre-execution result to the master node of the dedicated blockchain network PN _ 01. After receiving the pre-execution result of each node, the master node modifies the node joining transaction tx3 to obtain a modified node joining transaction tx3, and the modified node joining transaction tx3 is referred to as "node joining transaction tx 4".
Illustratively, the transaction structure of the node join transaction tx4 is shown in table 5.
Table 5 transaction structure table for node joining transaction tx4
Figure BDA0002796975470000131
Figure BDA0002796975470000141
As can be seen by comparing with table 4, the node join transaction tx4 further adds the pre-execution result of each node of the dedicated blockchain network PN _ 01. The transaction ID of the node join transaction tx4 is different from the transaction ID of the node join transaction tx3, but equal to the transaction ID of the node join transaction tx 2.
As shown in fig. 1(c), the master node of the dedicated blockchain network PN _01 submits the node join transaction tx4 to the common 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 the master node of the public blockchain network. The master node generates a transaction package containing the node join transaction tx4 in response to the node join transaction tx 4. 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 block chain network receives the transaction packet, the node join transaction tx4 is read from the transaction packet, and the node join transaction tx4 is executed, thereby generating a new public block.
When a node of the public block link network executes a node join transaction tx4, specifically:
1. and reading a 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 judgment rule. Illustratively, for example, the third judgment rule is specifically: and if the number of the pre-execution results which represent the passing of the verification is more than a preset proportion in all the pre-execution results, determining that the exclusive block chain network PN _01 successfully pre-executes the node joining transaction tx 3.
2. If the exclusive blockchain network PN _01 is determined to successfully pre-execute the node joining transaction tx3, reading the organization ID from the node joining transaction tx4, and using the organization ID as an index to inquire organization information corresponding to the organization ID from the node organization table. Then, the node ID is read from the node joining transaction tx4, and the node ID is used as an index to further query the pre-registered node information corresponding to the node ID from the queried organization information. And then acquiring the unoccupied public key from the inquired pre-registered node information. And finally, verifying the signature data added into the transaction tx4 by the node by using the acquired unoccupied public key.
3. And if the signature verification is passed, determining that the new node is legal, and accordingly confirming that the new node can be added into the exclusive block chain network PN _ 01. In this way, the network ID of the node joining 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 enabled, so that the node organization table local to the node is updated. In addition, the update identification and node are added to transaction tx4 as tile data and recorded into the newly created common tile. The update identifier is used for representing the node of the public block chain network, the node organization table is successfully updated, and the update identifier is in the shape of "yes".
4. And if the check label is not passed, determining that the new node is illegal, and confirming that the new node cannot join the exclusive block chain network PN _ 01. Thus, the update flag and node are added to transaction tx4 as tile data and recorded into the newly created common tile. The update identifier is used for representing that the node of the public block chain network does not update the node organization table, and the update identifier is in a shape of 'no'.
5. And if the organization ID added into the transaction tx4 by the node is taken as an index, and the organization information corresponding to the organization ID cannot be inquired from the node organization table, determining that the signature verification fails, thereby determining that the new node is illegal and further determining that the new node cannot be added into the exclusive blockchain network PN _ 01. Thus, the update flag and node are added to transaction tx4 as tile data and recorded into the newly created common tile. The update identifier is used for representing that the node of the public block chain network does not update the node organization table, and the update identifier is in a shape of 'no'.
6. If the organization ID added into the transaction tx4 by the node is used as an index, the organization information corresponding to the organization ID is inquired from the node organization table, but the node ID added into the transaction tx4 by the node is used as an index, and the pre-registered node information corresponding to the node ID cannot be further inquired from the inquired organization information, the signature verification is determined to be failed, so that the new node is determined to be illegal, and the new node is further determined not to be capable of being added into the exclusive block chain network PN _ 01. Thus, the update flag and node are added to transaction tx4 as tile data and recorded into the newly created common tile. The update identifier is used for representing that the node of the public block chain network does not update the node organization table, and the update identifier is in a shape of 'no'.
Referring to fig. 1(d), fig. 1(d) is a schematic diagram of a fourth stage of a node management method according to an embodiment of the invention. It should be noted that, in order to simplify the figure, all the steps that each node needs to participate in are shown only schematically in fig. 1(d), and not all the nodes are shown to participate in the steps.
As previously described, and as shown in fig. 1(d), each node of each dedicated blockchain network synchronizes common blocks generated by the common blockchain network. For example, in fig. 1(d), each node of the private blockchain network PN _01 continuously synchronizes the common blocks. Similarly, each node of the private blockchain network PN _02 continuously synchronizes to the common block.
As shown in fig. 1(d), when each node of the private blockchain network PN _01 reads the update flag from the synchronized public block and the node join transaction tx4, the node recognizes the update flag. If the update identifier indicates that the public blockchain network successfully updates the node organization table, the node indicates that the public blockchain network already acknowledges and witnesses the addition of the new node, and therefore the node needs to continue to execute a subsequent node addition process. If the update identifier indicates that the public block chain network does not update the node organization table, the public block chain network does not admit or witness the addition of the new node, so that the node does not need to execute a subsequent node addition process.
As shown in fig. 1(d), when a node of the dedicated blockchain network PN _01 needs to continue to perform a subsequent node joining process, the slave node joining transaction tx4 reads the organization ID, and uses the organization ID as an index to query the organization information corresponding to the organization ID from the node organization table. Then, the node ID is read from the node joining transaction tx4, and the node ID is used as an index to further query the pre-registered node information corresponding to the node ID from the queried organization information. And then acquiring the unoccupied public key from the inquired pre-registered node information. And finally, checking the signature data added into the transaction tx4 by the node by using the obtained unoccupied public key to obtain a signature checking result.
And under the condition that the signature passes, recording the network ID added into the transaction by the node into the organization information corresponding to the organization ID (namely 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 enabled, so that the node organization table local to the node is updated.
As shown in fig. 1(d), similarly, for the node of the dedicated blockchain network PN _02, the network ID of the node joining 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 enabled, so that the node organization table local to the node is updated.
Optionally, in some embodiments, each node of each private blockchain network also maintains a local node table. A local node table maintained by a node is used to record: the node information of all nodes contained in the exclusive block chain 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 exclusive blockchain network also reads the network ID from the public block and judges whether the network ID of the exclusive blockchain network to which the node belongs is equal to the network ID. This process is not shown in fig. 1(d) to simplify the drawing.
If so, the dedicated blockchain network to which the node belongs is described, and the dedicated blockchain network to which the new node is ready to join is the new node. In this case, the node adds the node information of the new node to the local node table it maintains, thereby acknowledging that the new node can join the dedicated blockchain network. When the node executes the task in the chain, the identity of the new node can be confirmed by inquiring the local node table of the operation and maintenance of the node.
If not, the exclusive block chain network to which the node belongs is indicated, and the exclusive block chain network to which the new node is ready to join is not indicated. In this case, the node will not add the node information of the new node to the local node table it maintains.
Referring to fig. 2, fig. 2 is a schematic diagram of a node organization deletion phase in a node management method according to an embodiment of the present invention. It should be noted that, in order to simplify the drawing, all the steps that each node needs to participate in are only schematically shown in fig. 2, and not completely shown, that all the nodes participate in the step.
As shown in fig. 2, when a certain node organization needs to be deleted (for example, when it is determined that there is illegal operation in a certain node organization and deletion is needed), any node (for example, node 1) of the public block link network may receive an organization deletion transaction tx5 sent by an administrator, where the organization deletion transaction tx5 includes: 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 rule for voting according to the preset voting rule corresponding to the organization deletion transaction. Wherein, the nodes participating in voting are only limited to the nodes in the public block chain 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. The node organization a includes a plurality of nodes, some of which are distributed in the dedicated block chain network PN _01 and the dedicated block chain network PN _02 in addition to the common block chain network.
Further, assume that the node organization participating in the voting agreed by the preset voting rule includes: node organization A, node organization F, and node organization G. Node 1 sends the organization deletion transaction tx5 only to the following nodes for voting: a node belonging to node organization a and located within the public block-chain network, a node belonging to node organization F and located within the public block-chain network, and a node belonging to node organization G and located within the public block-chain network.
As shown in fig. 2, the node 1 receives the voting data returned by each node, and the voting data of each node is used to characterize: whether the designated node agrees to delete the target node organization. Node 1 populates the voting data of each node into the organizational deletion transaction tx5 and submits the organizational deletion transaction tx5 populated with the voting data to the master node of the common blockchain network.
As shown in fig. 2, after receiving the organization deletion transaction tx5, the master node of the public blockchain network orders the organization deletion transaction tx5 with other transactions received in the same time slot, thereby generating a transaction package including 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 block link network receives the transaction packet, the transaction is read from the transaction packet, and the transactions are executed in sequence according to the sequence relationship of the transactions. 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 as to determine whether the target node organization is deleted.
For convenience of understanding, the fourth judgment rule is, for example: and if the number of votes representing the organization of the target node agreeing to delete in all the voting data of the node organization reaches a first preset proportion (for example, 60%), determining that the node organization agrees to delete the target node organization. And if the number of the node organizations which agree to delete the target node organization reaches a second preset proportion (for example, 50%) in all the node organizations participating in the voting, determining to delete the target node organization.
In the invention, by taking the node organization as a unit to vote, the voting is equivalent to collecting all votes of each node in the node organization as a vote representing the node organization, so that different voting influences caused by different node numbers of each node organization can be eliminated, and the situation that whether a target node organization is deleted or not is arbitrarily controlled by a minority of node organizations due to excessive node numbers is prevented, thereby being beneficial to improving the fairness and the safety of the whole network system.
As shown in fig. 2, if a node of the public block link network determines that a target node organization needs to be deleted by the above determination, the node reads an organization ID from the organization deletion transaction tx5 and deletes organization information under a corresponding organization ID entry in the node organization table.
For ease of understanding, assume for example that the organization ID in the organization delete transaction tx5 is a. In other words, node organization a is the target node organization that needs to be deleted. After the node deletes the organization information of the node organization a, the updated node organization table is shown in table 6.
Table 6 node organization table
Figure BDA0002796975470000181
Figure BDA0002796975470000191
As is clear from comparison with tables 1 and 2, the organization information of the node organization a is deleted from the updated node organization table.
As shown in fig. 2, the nodes of the public blockchain network will organize the delete transaction tx5 and the transaction execution success flag "yes" as the tile data, thereby generating a new public tile.
As shown in fig. 2, each node of each dedicated blockchain network synchronizes common blocks generated by the common blockchain network. When the node of the exclusive blockchain network reads the organization deletion transaction tx5 from the synchronized common block and reads the execution success identifier "yes", the node of the exclusive blockchain network reads the organization ID from the organization deletion transaction tx5 in response to 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 block chain network has centralized control capability on the nodes of each exclusive block chain network, and when a new node is ready to join any exclusive block chain network, the public block chain network can control the new node joining events, thereby being beneficial to preventing illegal new nodes from joining the exclusive block chain network and further ensuring that the security of the network system is not influenced.
In addition, the invention introduces a concept of node organization, a node organization table is stored in the node of the public block chain network, and organization information of each node organization is recorded in the node organization table. When a new node is ready to join a special 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, organization information corresponding to the organization ID is inquired from a node organization table, the legality of the new node is verified according to the inquired organization information, and then under the condition that the new node is determined to be legal, the fact that the new node can join the special blockchain network is confirmed. Therefore, the validity of the new node can be verified from the node organization level, and the new node is allowed to be added under the condition that the new node is determined to be legal. Therefore, the method can prevent the illegal new node from adding into the exclusive block chain network, and reduce the malicious opportunity of the illegal new node, thereby ensuring that the network security is not influenced.
In addition, the public block chain network can obtain the voting data of the exclusive block chain network, judge whether the exclusive block chain network agrees to add a new node according to the voting data, and record the judgment result as block data to the block chain. Thus, the public blockchain network witnesses whether a new node can join this event. In addition, after the node of the exclusive blockchain network reads the judgment result from the synchronized common block, the subsequent node joining process is continuously executed only under the condition that the judgment result represents that the common blockchain network determines that the exclusive blockchain network agrees to join the new node. As such, the following can be prevented from occurring: when the whole exclusive blockchain network does not agree with the addition of a new node, a few nodes in the exclusive blockchain network continue to execute the node addition process.
In addition, in the invention, the public block chain network executes the node joining transaction only under the condition that the exclusive block chain network successfully pre-executes the node joining transaction. After obtaining the execution result of the node joining transaction by the public blockchain network, the exclusive blockchain network continues to execute the subsequent node joining process. Thus, the following situations can be effectively avoided: the exclusive blockchain network successfully executes the node joining transaction (i.e., admits the joining of the new node), the public blockchain network does not successfully execute the node joining transaction (i.e., does not admit the joining of the new node), 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 admit the joining of the new node), so that the blockchain networks do not achieve consensus on the event of the joining of the new node.
In the foregoing, the present invention provides a node management method according to a preferred embodiment. The present invention provides 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 noted that the node management method proposed in the following embodiments is not necessarily dependent on the network system shown in the above-mentioned figures during implementation.
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 block chain network in a network system, and the node maintains a node organization table, and 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 block chain networks.
As shown in fig. 3, the node management method includes the steps of:
step S31: obtaining a node join transaction, wherein the node join transaction comprises: preparing an organization ID of a node organization to which a new node joining a target-specific blockchain network is to belong, the target-specific blockchain network being any one of the plurality of dedicated blockchain networks.
For ease of understanding, assuming that new node a23 belongs to node organization a, the node join transaction includes the organization ID of node organization a.
Optionally, in some embodiments, referring to the foregoing preferred embodiment, the node join transaction is submitted by the master node of the target dedicated blockchain network to the common blockchain network, and the master node of the common blockchain network generates a transaction package for the node join transaction and distributes the transaction package to each node of the common blockchain network. In this manner, each node of the public blockchain network obtains a node join transaction. To correspond to the above preferred embodiment, it should be noted that the node joining transaction described herein corresponds to the node joining transaction tx4 in the above 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, besides the above-mentioned specific embodiment, a person skilled in the art may also adopt other ways to enable the node of the public block chain network to obtain the node joining transaction, and the other ways are also included in the scope of the present invention.
Step S32: and inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node adding transaction, and verifying the validity of the new node according to the inquired organization information.
Optionally, in some specific embodiments, the node joining the transaction further includes signature data and a node ID of the new node, where the signature data is obtained by signing the transaction data with a private key of the new node. In order to verify the validity of the new node, with reference to the aforementioned preferred embodiment, the following sub-steps may be performed:
substep S32-1: reading a pre-registered unoccupied public key from the inquired organization information;
substep S32-2: verifying the signature data added into the transaction by the node by using the read unoccupied public key;
substep S32-3: determining that the new node is legal under the condition that the signature verification is passed;
substep S32-4: and in the case that the signature verification fails, determining that the new node is illegal.
For the explanation of the unoccupied public key, refer to the foregoing preferred embodiment.
In order to read the pre-registered unoccupied public key from the queried organization information, the pre-registered node information corresponding to the node ID may be queried from the queried organization information by using the node ID included in the node joining transaction as an index, 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 pre-registered node information corresponding to the node ID cannot be inquired from the inquired organization information, it is determined that the new node is illegal.
Further, even when the organization ID included in the node join transaction is used as an index and the organization information corresponding to the organization ID cannot be searched from the node organization table, it is determined that the new node is not legitimate.
It can be seen that in the foregoing embodiment, in order to add 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 will be determined to be illegal. Therefore, the malicious nodes can be prevented from randomly adding into any node organization and exclusive block chain network, and the safety of the network system is further improved.
Note that, in order to add the pre-registered node information to the node organization table in advance, other technical solutions may be implemented in addition to the steps shown in fig. 1(a) described above. For example, when the node organization table is constructed, a plurality of pieces of pre-registered node information are reserved for each node organization.
Optionally, in some embodiments, in order to verify the validity of the new node, the following sub-steps may also be performed:
substep S32-A: after the organization information corresponding to the organization ID is inquired, 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 node is legal;
substep S32-C: and if the counted number of the nodes reaches a preset threshold value, determining that the new node is illegal.
Step S33: and confirming that the new node can be added into the target exclusive block chain network under the condition that the new node is legal.
By executing the steps S31 to S33, the public block chain network has a centralized control capability on the nodes of each dedicated block chain network, and when a new node is ready to join any dedicated block chain network, the public block chain network can control the new node joining such events, thereby being beneficial to preventing an illegal new node from joining the dedicated block chain network, and further ensuring that the security of the network system is not affected.
In addition, the invention introduces a concept of node organization, a node organization table is stored in the node of the public block chain network, and organization information of each node organization is recorded in the node organization table. When a new node is ready to join a special 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, organization information corresponding to the organization ID is inquired from a node organization table, the legality of the new node is verified according to the inquired organization information, and then under the condition that the new node is determined to be legal, the fact that the new node can join the special blockchain network is confirmed. Therefore, the validity of the new node can be verified from the node organization level, and the new node is allowed to be added under the condition that the new node is determined to be legal. Therefore, the method can prevent the illegal new node from adding into the exclusive block chain network, and reduce the malicious opportunity of the illegal new node, thereby ensuring that the network security is not influenced.
Optionally, in some embodiments, with reference to the foregoing preferred embodiment, one node organization includes one or more nodes; the node organization comprises a plurality of nodes distributed in the same exclusive blockchain network, or distributed in a plurality of exclusive blockchain networks, or distributed in the exclusive blockchain network and the public blockchain network.
Optionally, in some embodiments, with reference to the foregoing preferred embodiment, the node join 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 be further executed:
recording the network ID added into the transaction by the node into organization information corresponding to the organization ID so as to update the node organization table; and an update identifier and the node joining transaction are used as block data and recorded in a newly generated public block, wherein the update identifier is used for representing that the public block chain network successfully updates the node organization table; and then sending the public block to each exclusive block chain network, so that each node of each exclusive block chain network identifies an update identifier contained in the public block after obtaining the public block, and under the condition that the update identifier represents that the public block chain network successfully updates the node organization table, responding to the node to join the transaction, and recording a network ID in the node joining transaction into 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 after being identified by the public block chain network, so that the method has uniformity and high credibility. When each node of each exclusive block chain network synchronizes to the common block, each node can acquire uniform data from the common block. In this way, when each node finishes processing the node joining transaction in the common block, each node updates the node organization table maintained by each node, so that the node organization tables maintained by each node have uniformity.
Optionally, in some embodiments, with reference to the foregoing preferred embodiment, the method may further include the following steps: obtaining an organization deletion transaction, wherein the organization deletion transaction comprises: an organization ID of a target node organization to be deleted, and votes for the organization deletion transaction by a plurality of node organizations; determining whether to delete the target node organization according to votes of a plurality of node organizations on the organization deletion transaction; and if so, deleting the organization information corresponding to the organization ID of the target node organization from the node organization table.
In this embodiment, by implementing deletion management on the node organization, the capability of the public blockchain network to manage the node organization can be further improved, so that the node organization which does not meet the service requirement or the supervision requirement in the whole network system can be cleared back 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 block chain network in a network system, and 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 dedicated block chain networks. As shown in fig. 4, the node management apparatus includes:
a transaction obtaining module 41, configured to obtain a node join transaction, where the node join transaction includes: preparing an organization ID of a node organization to which a new node joining a target-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific blockchain networks;
a validity verification module 42, configured to query, according to an organization ID included in the node joining transaction, organization information corresponding to the organization ID from the node organization table, and verify validity of the new node according to the queried organization information;
a new node confirmation module 43, configured to confirm that the new node may join the target dedicated block link network when the new node is legal.
Optionally, in some embodiments, a node organization includes one or more nodes; the node organization comprises a plurality of nodes distributed in the same exclusive blockchain network, or distributed in a plurality of exclusive blockchain networks, or distributed in the exclusive blockchain network and the public blockchain network.
Optionally, in some specific embodiments, the node joining the transaction further includes signature data, where the signature data is obtained by signing the transaction data with the 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 data added into the transaction by the node by using the read unoccupied public key;
the legality confirming unit is used for confirming that the new node is legal under the condition that the signature verification passes; and in the case that the signature verification fails, 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 query 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 adding transaction as an index, and reading the unoccupied public key from the inquired pre-registered node information.
Optionally, in some specific embodiments, the validity confirming unit is further configured to: and determining that the new node is illegal when the node ID contained in the node joining transaction is used as an index and the pre-registered node information corresponding to the node ID cannot be inquired from the inquired organization information.
Optionally, in some embodiments, the node joining transaction further includes a network ID of the target-specific blockchain network; the device 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 dedicated block link network, a network ID for the node to join in a transaction to organization information corresponding to the organization ID, so as to update the node organization table;
the block generation module is used for taking an update identifier and the node joining transaction as block data and recording the block data into a newly generated public block, wherein the update identifier 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 block chain network, so that each node of each exclusive block chain network identifies an update identifier contained in the public block after obtaining the public block, and under the condition that the update identifier represents that the public block chain network successfully updates the node organization table, the node is responded to join the transaction, and the network ID added into the transaction by the node is recorded into the organization information corresponding to the organization ID so as to update the node organization table.
Optionally, in some embodiments, the transaction obtaining 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 for the organization deletion transaction by a plurality of node organizations;
the device further comprises:
the voting processing module is used for determining whether the target node organization is deleted according to the voting of the plurality of node organizations on 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 embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504, where 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 computer programs;
the processor 501 is configured to implement the following steps when executing the program stored in the memory 503:
obtaining a node join transaction, wherein the node join transaction comprises: preparing an organization ID of a node organization to which a new node joining a target-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific blockchain networks;
inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node adding transaction, and verifying the validity of the new node according to the inquired organization information;
and confirming that the new node can be added into the target exclusive block chain network under the condition that the new node is legal.
Alternatively, the processor 501 is configured to implement the steps of the node management method provided by the above other method embodiments of the present invention when executing the program stored in the memory 503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the node management method in any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A node management method is characterized in that the node management method is applied to any node in a public block chain network in a network system, a node organization table is maintained by the node, and the node organization table is used for recording organization information organized by each node; the network system also comprises a plurality of exclusive block chain networks; the method comprises the following steps:
obtaining a node join transaction, wherein the node join transaction comprises: preparing an organization ID of a node organization to which a new node joining a target-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific blockchain networks;
inquiring organization information corresponding to the organization ID from the node organization table according to the organization ID contained in the node adding transaction, and verifying the validity of the new node according to the inquired organization information;
and confirming that the new node can be added into the target exclusive block chain network under the condition that the new node is legal.
2. The method of claim 1, wherein a node organization includes one or more nodes; the node organization comprises a plurality of nodes distributed in the same exclusive blockchain network, or distributed in a plurality of exclusive blockchain networks, or distributed in the exclusive blockchain network and the public blockchain network.
3. The method according to claim 1, wherein the node joining the transaction further comprises signature data, wherein the signature data is obtained by signing the transaction data with the private key of the new node; the verifying the validity of the new node according to the inquired organization information comprises the following steps:
reading a pre-registered unoccupied public key from the inquired organization information;
verifying the signature data added into the transaction by the node by using the read unoccupied public key;
determining that the new node is legal under the condition that the signature verification is passed;
and in the case that the signature verification fails, determining that the new node is illegal.
4. The method of claim 3, wherein the node join transaction further includes a node ID of the new node; the reading of the pre-registered unoccupied public key from the queried organization information includes:
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 adding transaction as an index, and reading the unoccupied public key from the inquired pre-registered node information.
5. The method of claim 4, further comprising:
and determining that the new node is illegal when the node ID contained in the node joining transaction is used as an index and the pre-registered node information corresponding to the node ID cannot be inquired from the inquired organization information.
6. The method of claim 1, wherein the node join transaction further includes a network ID of the target-specific blockchain network; after confirming that the new node may join the target-specific blockchain network, the method further comprises:
recording the network ID added into the transaction by the node 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 newly generated public block, wherein the update identifier is used for representing that the public block chain network successfully updates the node organization table;
and sending the public block to each exclusive block chain network, so that each node of each exclusive block chain network identifies an update identifier contained in the public block after obtaining the public block, and under the condition that the update identifier represents that the public block chain network successfully updates the node organization table, responding to the node to join the transaction, and recording a network ID in the node joining transaction into organization information corresponding to the organization ID so as to update the node organization table.
7. The method of any of claims 1 to 6, 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 for the organization deletion transaction by a plurality of node organizations;
determining whether to delete the target node organization according to votes of a plurality of node organizations on the organization deletion transaction;
and if so, deleting the organization information corresponding to the organization ID of the target node organization from the node organization table.
8. A node management device is applied to any node in a public block chain network in a network system, and is characterized in that a node organization table is maintained by the node and used for recording organization information organized by each node; the network system also comprises a plurality of exclusive block chain networks; the device comprises:
a transaction obtaining module, 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-specific blockchain network belongs, the target-specific blockchain network being any one of the plurality of specific 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 adding transaction and verifying the validity of the new node according to the inquired organization information;
a new node confirmation module, configured to confirm that the new node may join the target dedicated block link network when the new node is legal.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored in the memory, is adapted to perform the method steps of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
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 true CN112488834A (en) 2021-03-12
CN112488834B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255003A (en) * 2021-06-15 2021-08-13 中国电子科技网络信息安全有限公司 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 (12)

* 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
US20200169402A1 (en) * 2019-05-31 2020-05-28 Alibaba Group Holding Limited Data storage on tree nodes
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

Patent Citations (12)

* 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
US20200169402A1 (en) * 2019-05-31 2020-05-28 Alibaba Group Holding Limited Data storage on tree nodes
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
张曼等: "基于区块链的网络空间标识服务", 《数据与计算发展前沿》, vol. 2, no. 5, 15 October 2020 (2020-10-15), pages 52 - 64 *
洪学海等: "区块链安全监管技术研究综述", 《中国科学基金》, 14 March 2020 (2020-03-14), pages 18 - 24 *
禹忠;郭畅;谢永斌;薛栋;: "基于区块链的医药防伪溯源系统研究", 计算机工程与应用, no. 03, 13 November 2019 (2019-11-13), pages 35 - 41 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255003A (en) * 2021-06-15 2021-08-13 中国电子科技网络信息安全有限公司 Block chain system safety management and control method
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

Also Published As

Publication number Publication date
CN112488834B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN110990408B (en) Business information collaboration method based on block chain, business system and alliance 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
CN112671881B (en) Node organization management method and device, electronic equipment and readable storage medium
CN112488834B (en) Node management method, node management device, electronic equipment and readable storage medium
CN112422341B (en) Fault detection method of block chain network and related equipment
CN112671908B (en) Network management method and device, electronic equipment and readable storage medium
CN112800129A (en) Block state updating method, device and system and electronic equipment
CN111953754B (en) Cross-chain transaction method, electronic device and readable storage medium
CN111447069B (en) Low-frequency access data processing method based on block chain
CN111010282B (en) Block chain-based information processing method, related device and storage medium
CN114726554A (en) Copyright authentication system and method based on alliance chain and NFT
CN114925391A (en) Method and device for monitoring circulation of private information, electronic equipment and storage medium
CN112037055B (en) Transaction processing method, device, electronic equipment and readable storage medium
Guo et al. Antitampering scheme of evidence transfer information in judicial system based on blockchain
CN116467026A (en) Cloud desktop data secure sharing and tracing method and system based on blockchain
CN112966049B (en) Asset management system based on block chain
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
CN117118640A (en) Data processing method, device, computer equipment and readable storage medium
CN115392927A (en) Data tracing system and data tracing method based on block chain
CN112600874B (en) Node joining 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
CN117040929B (en) Access processing method, device, equipment, medium and program product
CN112597512B (en) Temperature data control method and device based on block chain and storage medium

Legal Events

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