CN109995848B - System configuration data management method based on block chain and intelligent contract - Google Patents
System configuration data management method based on block chain and intelligent contract Download PDFInfo
- Publication number
- CN109995848B CN109995848B CN201910128889.4A CN201910128889A CN109995848B CN 109995848 B CN109995848 B CN 109995848B CN 201910128889 A CN201910128889 A CN 201910128889A CN 109995848 B CN109995848 B CN 109995848B
- Authority
- CN
- China
- Prior art keywords
- configuration data
- node
- account book
- network
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A system configuration data management method based on a block chain and an intelligent contract relates to the field of block chain systems. The method comprises the following steps: writing configuration data into an account book: the configuration data is written into the blocks of the block chain network to form a decentralized configuration data book. (II) network node synchronizes the account book data: all informational nodes acquire and maintain a copy of the ledger from nearby nodes via the P2P protocol. (III) the network node reads the configuration data in the account book: each inode directly reads a copy of the ledger to obtain configuration data. And (IV) updating the configuration data in batch through the intelligent contracts. The invention can effectively avoid the occurrence of the error of the configuration data of the information nodes caused by network communication and malicious tampering, and can greatly simplify the operation of updating the configuration data of a large batch of information nodes.
Description
Technical Field
The invention relates to the field of a block chain system, in particular to a system configuration data management method based on a block chain and an intelligent contract.
Background
In an information system or an internet of things system based on a large-scale multi-node distributed network environment, different information nodes have different required configuration data due to different realized functions, and therefore different types of information nodes need to be configured with different configuration data respectively.
In the prior art, a solution is mainly to establish a centralized configuration data management center system, and in the configuration data management center system, classification management, configuration data item management, and synchronization and update management of configuration data need to be performed on each information node.
There are problems with the centralized configuration data management center described above. Mainly expressed in the following aspects.
1. As the network scale is enlarged, the network structure becomes more and more complex, and the complex network structure may affect the quality of network communication and even cause network communication interruption. Because each information node needs to communicate with the configuration data management center to synchronize configuration information, if network communication is not smooth or the network is interrupted, updating and synchronization of configuration data can be failed, and operation of related information nodes is affected.
2. After each information node successfully synchronizes configuration data from the configuration data management center, the updated configuration data is generally stored in the file system of the information node, on one hand, frequent network communication with the configuration data management center is avoided, and on the other hand, the efficiency of reading the configuration data is improved. But then there is a risk that the configuration data of a certain information node is tampered with by external malicious intent.
3. Because the configuration data of all the nodes need to be synchronized with the configuration data management center, once the data of the configuration data management center is maliciously tampered, a large-area system fault can be caused, and the consequences are extremely serious.
4. When the configuration data of a large amount of information nodes needs to be updated, the whole process is long and complicated, and whether each node successfully synchronizes new configuration data needs to be continuously monitored, so that the complexity of the system is increased.
Disclosure of Invention
In view of the above problems in the prior art, it is an object of the present invention to provide a method for managing configuration data based on a blockchain and an intelligent contract. The method can effectively avoid the occurrence of information node configuration data errors caused by network communication and malicious tampering, can also greatly simplify the operation of updating configuration data of a large batch of information nodes, and has the characteristics of simple method and safe, stable and accurate whole system flow.
In order to achieve the above purpose, the technical solution of the present invention is implemented as follows:
a system configuration data management method based on block chains and intelligent contracts comprises the following steps:
writing configuration data into an account book:
networking each information node together via P2P protocol requires that each network node be capable of connecting to at least one and two neighboring network nodes to form a point-to-point blockchain network. And then writing the configuration data into the block of the block chain network to form a decentralized configuration data book, which comprises the following specific steps:
1) the administrator submits new configuration data to any node of the blockchain network;
2) a certain node in the block chain network generates the configuration data into a block, and after all other nodes verify and confirm the block according to a workload certification mechanism, the system adds the block into the existing account book, otherwise, the configuration data fails to be submitted;
3) the system broadcasts the updated information of the account book to the whole network;
4) and the node where the administrator is located receives the broadcast information and completes the task of submitting the configuration data.
(II) network node synchronizes the account book data:
all the information nodes acquire and store one copy of the ledger from a nearby node through a P2P protocol, and the specific steps are as follows:
1) the network node receives a broadcast message for updating the account book information;
2) the node initiates a request for updating the ledger to a neighboring node, if the neighboring node has no new ledger data, the node continues to initiate requests to other nodes until a node with new ledger data is found;
3) and synchronizing the new account book data and updating and storing the new account book data to the node.
(III) the network node reads the configuration data in the account book:
each information node directly reads the copy of the account book to obtain configuration data, and the specific steps are as follows:
1) the network node opens the account book copy of the node, and searches the node type corresponding to the node from the account book according to the node ID of the network node;
2) searching the configuration item set corresponding to the node type from the account book again according to the node type;
3) reading and analyzing the configuration item set to obtain the specific configuration data content of each item;
4) the information nodes load and apply each configuration data content one by one;
5) and judging whether all the data in the complete set are read, if so, finishing the loading of the current configuration data, and otherwise, returning to the step 3).
(IV) updating the configuration data in batch through intelligent contracts:
when the configuration data items of the large-scale information nodes are updated in batch, all the new configuration data items are put into the intelligent contract of the block chain network. When the triggering condition of the intelligent contract is reached, the intelligent contract can automatically update the ledger of the configuration data in batches, and can automatically broadcast the update to the whole network. Each node of the whole network automatically synchronizes an updated configuration data account book from an adjacent node through a P2P protocol after receiving the broadcast message; the method comprises the following specific steps:
1) creating an intelligent contract containing all configuration items to be updated;
2) when the triggering condition of the intelligent contract is reached, the intelligent contract starts to run, and a configuration data account book is updated;
3) the system broadcasts a message for updating the configuration data account book to the whole network;
4) each node automatically synchronizes a new copy of the ledger through a P2P protocol after receiving the broadcast message;
5) after the node successfully synchronizes the new copy of the ledger, the system continues to synchronize ledger data of the subsequent nodes and read configuration data in the ledger according to the methods in the step (two) and the step (three).
Compared with the prior art, the method has the following obvious advantages:
1) the configuration data is stored in a block chain account book form, and the risk of malicious tampering of the data can be effectively avoided by using a tamper-proof mechanism of the block chain. Each network node can effectively avoid serious consequences caused by malicious tampering of the node or malicious tampering of data in the central configuration database by directly reading the configuration data on the block chain account book, thereby enhancing the safety and the accuracy of the operation of the whole network system.
2) The data synchronization mode is that data transmission is carried out in a point-to-point mode through a P2P protocol, and the mode is superior to the traditional data transmission mode of a centralized network, so that on one hand, data synchronization failure caused by the problem of network communication between each branch node and the central node can be effectively avoided, on the other hand, the data synchronization efficiency can be greatly improved, and larger data transmission quantity can be obtained through smaller network bandwidth. Therefore, when the configuration data is synchronized, not only can each node be ensured to be synchronized to the data, but also the efficiency of data synchronization can be increased.
3) By utilizing a data synchronization mechanism of the block chain network, all nodes can be effectively ensured to be successfully synchronized to the latest account book data, so that on one hand, the data synchronization monitoring function of the original configuration data center is greatly simplified, on the other hand, all nodes can be ensured to be successfully synchronized to the data, and the consistency and the accuracy of the configuration data of the whole network node are greatly ensured.
4) When the configuration data items of the large-scale information nodes are updated, the advantages of the intelligent contract and the block chain are fully utilized, the configuration data account book is updated through the intelligent contract, and the block chain network is utilized to synchronize the updated configuration data account book, so that the whole updating operation steps and process can be greatly simplified, and the updating success rate can be increased.
The invention is further described with reference to the following figures and detailed description.
Drawings
FIG. 1 is a flow chart of a method for writing configuration data into an account book according to the present invention;
FIG. 2 is a flow chart of a method for a network node to synchronize ledger data in the method of the present invention;
FIG. 3 is a flowchart of a method for a network node to read configuration data in an account book according to the present invention;
FIG. 4 is a flow chart of a method for batch updating configuration data through intelligent contracts in the method of the present invention.
Detailed Description
Referring to fig. 1 to 4, the method for managing system configuration data based on a block chain and an intelligent contract according to the present invention includes the following steps:
writing configuration data into an account book:
networking each information node together via P2P protocol requires that each network node be capable of connecting to at least one and two neighboring network nodes to form a point-to-point blockchain network. And then writing the configuration data into the block of the block chain network to form a decentralized configuration data book, which comprises the following specific steps:
1) the administrator submits new configuration data to any node of the blockchain network;
2) a certain node in the block chain network generates the configuration data into a block, and after all other nodes verify and confirm the block according to a workload certification mechanism, the system adds the block into the existing account book, otherwise, the configuration data fails to be submitted;
3) the system broadcasts the updated information of the account book to the whole network;
4) and the node where the administrator is located receives the broadcast information and completes the task of submitting the configuration data.
(II) network node synchronizes the account book data:
all the information nodes acquire and store one copy of the ledger from a nearby node through a P2P protocol, and the specific steps are as follows:
1) the network node receives a broadcast message for updating the account book information;
2) the node initiates a request for updating the ledger to a neighboring node, if the neighboring node has no new ledger data, the node continues to initiate requests to other nodes until a node with new ledger data is found;
3) and synchronizing the new account book data and updating and storing the new account book data to the node.
(III) the network node reads the configuration data in the account book:
when a network node needs to load configuration data, each information node directly reads a copy of an account book to obtain the configuration data, and the specific steps are as follows:
1) the network node opens the account book copy of the node, and searches the node type corresponding to the node from the account book according to the node ID of the network node;
2) searching the configuration item set corresponding to the node type from the account book again according to the node type;
3) reading and analyzing the configuration item set to obtain the specific configuration data content of each item;
4) the information nodes load and apply each configuration data content one by one;
5) and judging whether all the data in the complete set are read, if so, finishing the loading of the current configuration data, and otherwise, returning to the step 3).
(IV) updating the configuration data in batch through intelligent contracts:
when the configuration data items of the large-scale information nodes are updated in batch, all the new configuration data items are put into the intelligent contract of the block chain network. When the triggering condition of the intelligent contract is reached, the intelligent contract can automatically update the ledger of the configuration data in batches, and can automatically broadcast the update to the whole network. Each node of the whole network automatically synchronizes an updated configuration data account book from an adjacent node through a P2P protocol after receiving the broadcast message; the method comprises the following specific steps:
1) creating an intelligent contract containing all configuration items to be updated;
2) when the triggering condition of the intelligent contract is reached, the intelligent contract starts to run, and a configuration data account book is updated;
3) the system broadcasts a message for updating the configuration data account book to the whole network;
4) each node automatically synchronizes a new copy of the ledger through a P2P protocol after receiving the broadcast message;
5) after the node successfully synchronizes the new copy of the account book, the system continues to perform subsequent node updating and loading of new configuration data according to the methods in the step (two) and the step (three).
The above-mentioned embodiments are merely preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, so that the changes in the shape and principle of the present invention should be covered within the protection scope of the present invention.
Claims (1)
1. A system configuration data management method based on block chains and intelligent contracts comprises the following steps:
writing configuration data into an account book:
networking each information node together through a P2P protocol, wherein each network node is required to be at least capable of being connected to two adjacent network nodes to form a point-to-point blockchain network; and then writing the configuration data into the block of the block chain network to form a decentralized configuration data book, which comprises the following specific steps:
1) the administrator submits new configuration data to any node of the blockchain network;
2) a certain node in the block chain network generates the configuration data into a block, and after all other nodes verify and confirm the block according to a workload certification mechanism, the system adds the block into the existing account book, otherwise, the configuration data fails to be submitted;
3) the system broadcasts the updated information of the account book to the whole network;
4) the node where the administrator is located receives the broadcast information and completes the task of submitting the configuration data;
(II) network node synchronizes the account book data:
all the information nodes acquire and store one copy of the ledger from a nearby node through a P2P protocol, and the specific steps are as follows:
1) the network node receives a broadcast message for updating the account book information;
2) the node initiates a request for updating the ledger to a neighboring node, if the neighboring node has no new ledger data, the node continues to initiate requests to other nodes until a node with new ledger data is found;
3) synchronizing new account book data and updating and storing the new account book data to the node;
(III) the network node reads the configuration data in the account book:
each information node directly reads the copy of the account book to obtain configuration data, and the specific steps are as follows:
1) the network node opens the account book copy of the node, and searches the node type corresponding to the node from the account book according to the node ID of the network node;
2) searching the configuration item set corresponding to the node type from the account book again according to the node type;
3) reading and analyzing the configuration item set to obtain the specific configuration data content of each item;
4) the information nodes load and apply each configuration data content one by one;
5) judging whether all the data in the complete set are read, if so, finishing the loading of the current configuration data, and otherwise, returning to the step 3);
(IV) updating the configuration data in batch through intelligent contracts:
when the configuration data items of the large-scale information nodes are updated in batch, all the new configuration data items are put into an intelligent contract of a block chain network; when the triggering condition of the intelligent contract is reached, the intelligent contract can automatically update the ledger of the configuration data in batches and can automatically broadcast the update to the whole network; each node of the whole network automatically synchronizes an updated configuration data account book from an adjacent node through a P2P protocol after receiving the broadcast message; the method comprises the following specific steps:
1) creating an intelligent contract containing all configuration items to be updated;
2) when the triggering condition of the intelligent contract is reached, the intelligent contract starts to run, and a configuration data account book is updated;
3) the system broadcasts a message for updating the configuration data account book to the whole network;
4) each node automatically synchronizes a new copy of the ledger through a P2P protocol after receiving the broadcast message;
5) after the node successfully synchronizes the new copy of the ledger, the system continues to synchronize ledger data of the subsequent nodes and read configuration data in the ledger according to the methods in the step (two) and the step (three).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910128889.4A CN109995848B (en) | 2019-02-21 | 2019-02-21 | System configuration data management method based on block chain and intelligent contract |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910128889.4A CN109995848B (en) | 2019-02-21 | 2019-02-21 | System configuration data management method based on block chain and intelligent contract |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109995848A CN109995848A (en) | 2019-07-09 |
CN109995848B true CN109995848B (en) | 2021-08-10 |
Family
ID=67130215
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910128889.4A Active CN109995848B (en) | 2019-02-21 | 2019-02-21 | System configuration data management method based on block chain and intelligent contract |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109995848B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117880096B (en) * | 2024-03-11 | 2024-05-17 | 杭州高新区(滨江)区块链与数据安全研究院 | Block chain configuration updating method and device, electronic equipment and readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10102526B1 (en) * | 2017-03-31 | 2018-10-16 | Vijay K. Madisetti | Method and system for blockchain-based combined identity, ownership, integrity and custody management |
CN108390891A (en) * | 2018-03-28 | 2018-08-10 | 电子科技大学天府协同创新中心 | Information protecting method based on privately owned block chain |
CN108597128A (en) * | 2018-05-04 | 2018-09-28 | 济南浪潮高新科技投资发展有限公司 | Urban network joins Car sharing system and method |
CN108959654A (en) * | 2018-08-06 | 2018-12-07 | 安徽笛申科技有限公司 | A kind of data management system based on block chain intelligence contract node and storage |
CN109246197B (en) * | 2018-08-15 | 2021-10-15 | 交通银行股份有限公司 | Data processing method and device based on intelligent contract |
-
2019
- 2019-02-21 CN CN201910128889.4A patent/CN109995848B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109995848A (en) | 2019-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200228393A1 (en) | System and method for data replication using a single master failover protocol | |
EP2410431B1 (en) | Method and system for data replication management | |
CN107193490B (en) | Distributed data storage system and method based on block chain | |
US20140081927A1 (en) | Data node fencing in a distributed file system | |
US20010048728A1 (en) | Apparatus and methods for providing data synchronization by facilitating data synchronization system design | |
US20190173596A1 (en) | Method for fast reconfiguration of gm clocks in the tsn network by means of an explicit teardown message | |
US10866965B2 (en) | Data replicating systems and data replicating methods | |
CN106156318B (en) | System and method for realizing high availability of multi-node database | |
CN113987064A (en) | Data processing method, system and equipment | |
CN109639773B (en) | Dynamically constructed distributed data cluster control system and method thereof | |
WO2016177231A1 (en) | Dual-control-based active-backup switching method and device | |
CN110348826A (en) | Strange land disaster recovery method, system, equipment and readable storage medium storing program for executing mostly living | |
CN110213359B (en) | Internet of vehicles networking data pushing system and method based on D2D | |
WO2019178772A1 (en) | Database master-slave block consistency check method, device and system | |
CN109995848B (en) | System configuration data management method based on block chain and intelligent contract | |
CN114374701B (en) | Transparent sharing device for sample model of multistage linkage artificial intelligent platform | |
CN111460029B (en) | Data synchronization method and device | |
CN115695049B (en) | CDN metadata distribution method and device | |
CN110912979B (en) | Method for solving multi-server resource synchronization conflict | |
CN111797166B (en) | Method and device for synchronizing quasi-real-time resume data, electronic equipment and medium | |
CN114880717A (en) | Data archiving method and device | |
CN116107801A (en) | Transaction processing method and related product | |
CN112948052B (en) | Virtual machine migration method across data centers, data center and computer medium | |
US20240121297A1 (en) | Method and apparatus for distributed synchronization | |
CN115297130B (en) | Distributed storage network data synchronization method based on block chain |
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 |