CN112380010B - Hierarchical blockchain for load balancing in Internet of things environment - Google Patents
Hierarchical blockchain for load balancing in Internet of things environment Download PDFInfo
- Publication number
- CN112380010B CN112380010B CN202011276307.6A CN202011276307A CN112380010B CN 112380010 B CN112380010 B CN 112380010B CN 202011276307 A CN202011276307 A CN 202011276307A CN 112380010 B CN112380010 B CN 112380010B
- Authority
- CN
- China
- Prior art keywords
- data
- internet
- terminal
- index
- things
- 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
- 238000013500 data storage Methods 0.000 claims abstract description 17
- 238000000034 method Methods 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a layering blockchain for load balancing in an Internet of things environment, which is characterized in that account book data and index records are stored separately, storage nodes are divided into a plurality of storage layers with smaller scale, and the positions of the small blockchains of the storage layers for recording terminal data of the Internet of things are dynamically determined by nodes of a common-knowledge index layer through an automatic load balancing strategy; the consensus index layer forms a top layer block chain and records the data index information of the whole network; because the scale of the index information is far smaller than the scale of the data, and any internet of things terminal only needs to store the data in a small-scale storage layer block chain, the storage space is saved, repeated transmission and storage of large-scale data account book copies in the whole network are avoided, the problem that a large amount of similar or identical sensing data are transmitted in a short time in the internet of things environment to occupy a large amount of network bandwidth resources is solved, meanwhile, the cost of the server side to the data storage space is greatly reduced, and the storage pressure of the server is reduced.
Description
Technical Field
The invention relates to the technical field of blockchains, in particular to a hierarchical blockchain for load balancing in an Internet of things environment.
Background
The blockchain technology is used as a novel data sharing storage technology with the advantages of being distributed and non-centralized, and has the unique advantages of full (transaction/transfer) process record, easy tracking and tracing, transaction repudiation resistance and the like. The blockchain is widely paid attention to in the industry, is not only applied to a network digital virtual currency system, but also widely applied to the fields of industrial automation management, logistics management, finance, biological information systems and the like, and achieves good application effects by introducing the blockchain technology into a plurality of large-scale and distributed information systems.
However, conventional blockchain technology requires that accounting data be sent across the entire network, and that ledger copies be stored in a distributed manner at each storage node, resulting in a significant occupation of storage and bandwidth resources. Particularly for the application environment of calculation and storage of the Internet of things and limited bandwidth resources, the resource occupation caused by large-data-volume copying and transmission of the blockchain is difficult to bear. Therefore, the design of the novel block chain structure and the reduction of resource occupation have important significance for the wide application of the block chain in the environment of the Internet of things.
Disclosure of Invention
The invention aims to provide a hierarchical blockchain for load balancing in the environment of the Internet of things, which aims to solve the problems that redundant data in the network is excessively copied, and storage and network bandwidth resources are excessively pressurized and the like in the application environment of the Internet of things and other resources are limited. The invention adopts a hierarchical block chain structure, which comprises a consensus index layer and a data storage layer, and separates data retrieval and storage. Each node of the consensus index layer stores an index account book, and the account book records the storage layer address of each Internet of things terminal data to form an information retrieval block chain; the data storage layer forms a plurality of small-scale block chains, and data sent by the terminal of the Internet of things are stored in the small-scale block chains; assuming that the conventional blockchain network has n nodes in total, n-1 parts of data needs to be transmitted by any node for one time of data broadcasting, n x (n-1) parts of data needs to be transmitted for one time of data synchronization of the whole network, and if relay forwarding is involved, the amount of transmitted data is further increased. By using the hierarchical blockchain structure of the invention, the size of a single small blockchain of a storage layer is set to be n/10, so that the data volume required to be transmitted for data broadcasting and whole network data synchronization is about 1/10 and 1/100 of the original data volume. Through storage and index layering, the invention can achieve the purpose of effectively reducing the network transmission data volume.
The invention realizes the above purpose through the following technical scheme:
a hierarchical blockchain for load balancing in an Internet of things environment comprises a consensus index layer and a data storage layer;
the data storage layer is used for storing data account books of the terminals of the Internet of things, the consensus index layer comprises a plurality of nodes, any one node is connected with the adjacent node and is connected with any data storage layer, the index account book is stored in the node, and the index account book comprises index information of the data of each terminal of the Internet of things;
and the user obtains the storage layer address of the target internet of things terminal data ledger by inquiring the consensus index layer, and forwards the data access request to the corresponding storage layer block chain to the storage layer where the target internet of things terminal data ledger is located.
The index information comprises an internet of things terminal id, a storage layer network address add and a data time period.
The further scheme is that the terminal registration process of the Internet of things comprises the following steps: after a new internet of things terminal r sends a registration request broadcast to a consensus index layer, each node in the consensus index layer broadcasts the load of a storage layer where an index node is located to the whole network, and all nodes of the consensus index layer compare the load information broadcast by other nodes; based on a load balancing strategy, a common index node s corresponding to a storage layer block chain with the smallest current load wins, s adds an identifier r.id of an Internet of things terminal r to a terminal list of s, and the storage layer block chain where s is located is responsible for receiving new registered Internet of things terminal data; and simultaneously, s adds a new terminal record < r.id, s.add > message to the consensus index layer broadcast, data representing r is stored in a storage layer block chain where s is located, and the consensus index node receiving the message adds < r.id, s.add > to a local terminal list.
Further, the data storage flow comprises: each internet of things terminal r only needs to send data to any one of the consensus index layer nodes s, the s searches a terminal record list, and the data is sent to an index node s 'corresponding to r according to an address s' add matched with r.id; s 'after receiving the data, inquiring a terminal list, if the add corresponding to the r.id is not consistent with the address of the terminal, discarding the received data, otherwise, forwarding the data to a storage layer block chain where the data is located by s'; meanwhile, s' is responsible for broadcasting storage index information < r.id, time1, time2 and num > of r to the consensus index layer, wherein time1 and time2 respectively represent start and stop time of data acquisition of a number terminal, and num represents the number of data.
The data retrieval process further comprises the following steps: when a user needs to browse the data of a certain internet of things terminal r, only a request containing a terminal r.id and a query time period needs to be sent to any one consensus index layer node s; searching a terminal list by s, and transmitting data to an index node s 'corresponding to r according to the queried s' add corresponding to r.id; s ' inquires the terminal list, if the add corresponding to the r.id is not consistent with the address of s ' itself, ignoring the inquiry request, otherwise, s ' retrieves the record information in the inquiry period from the storage layer account book, and returns to the inquirer.
The invention has the beneficial effects that:
according to the invention, account book data and index records are stored separately, storage nodes are divided into a plurality of storage layers with smaller scale, and the nodes of the consensus index layer dynamically determine the small-sized blockchain of the storage layer for recording the terminal data of the Internet of things through an automatic load balancing strategy; the consensus index layer forms a top-layer block chain and records the data index information of the whole network. Because the scale of the index information is far smaller than the scale of the data, and any internet of things terminal only needs to store the data in a small-scale storage layer block chain, the storage space is saved, repeated transmission and storage of large-scale data account book copies in the whole network are avoided, the problem that a large amount of similar or identical sensing data occupy a large amount of network bandwidth resources in a short time in the internet of things environment is solved, meanwhile, the cost of the server side on the data storage space is greatly reduced, and the storage pressure of the server is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description will briefly explain the practical drawings required in the embodiments or the prior art description, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a diagram of the network topology of the present invention.
Fig. 2 is a flow chart of network node registration according to the present invention.
FIG. 3 is a flow chart of the data storage of the present invention.
FIG. 4 is a flow chart of the data retrieval method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, based on the examples herein, which are within the scope of the invention as defined by the claims, will be within the scope of the invention as defined by the claims.
In any embodiment, as shown in fig. 1, the hierarchical blockchain for load balancing in the internet of things environment of the present invention includes a consensus index layer and a data storage layer;
the data storage layer is used for storing data account books of the terminals of the Internet of things, the consensus index layer comprises a plurality of nodes, any node is connected with adjacent nodes and is connected with one data storage layer, the nodes are stored with index account books and terminal lists, and the index account books contain index information of the data of each terminal of the Internet of things; the index information comprises an internet of things terminal id, an index node network address add corresponding to a storage layer block chain where data are located, and a data time period, the terminal list comprises record information of each internet of things terminal, and the record information comprises the internet of things terminal id, the index node network address add corresponding to the storage layer block chain where data are located.
And the user obtains an index node address corresponding to the storage layer blockchain where the target internet of things terminal data ledger is located by inquiring the consensus index layer, and the index node forwards the user data access request to the corresponding storage layer blockchain.
In a specific embodiment, as shown in fig. 2, a hierarchical blockchain of load balancing in an internet of things environment according to the present invention, a registration process of an internet of things terminal includes: after a new internet of things terminal r sends a registration request broadcast to a consensus index layer, each node in the consensus index layer broadcasts the load of a storage layer where an index node is located to the whole network, and all nodes of the consensus index layer compare the load information broadcast by other nodes; based on a load balancing strategy, a common index node s corresponding to a storage layer block chain with the smallest current load wins, s adds an identifier r.id of an Internet of things terminal r to a terminal list of s, and the storage layer block chain where s is located is responsible for receiving new registered Internet of things terminal data; and at the same time, s adds a new terminal record < r.id, s.add > message to the consensus index layer broadcast, the data representing r is stored in a storage layer block chain where s is located, and the consensus index node receiving the message adds the < r.id, s.add > message to a local terminal list.
The data storage flow is as shown in fig. 3, and includes: each internet of things terminal r only needs to send data to any one of the consensus index layer nodes s, the s searches a terminal record list, and the data is sent to an index node s 'corresponding to r according to an address s' add matched with r.id; s 'after receiving the data, inquiring a terminal list, if the add corresponding to the r.id is not consistent with the address of the terminal, discarding the received data, otherwise, forwarding the data to a storage layer block chain where the data is located by s'; and s' is responsible for broadcasting storage index information < r.id, time2 and num > of r to the consensus index layer, wherein time1 and time2 respectively represent start and stop time of data acquisition of a digital terminal, and num represents the number of data. The storage layer blockchain may be built using conventional fabric hyperledger (super ledger).
The data retrieval flow is as shown in fig. 4, and includes: when a user needs to search the data of a certain internet of things terminal r, only a request containing a terminal r.id and a query time period needs to be sent to any one consensus index layer node s; searching a terminal list by s, and transmitting data to an index node s 'corresponding to r according to the queried s' add corresponding to r.id; s ' inquires the terminal list, if the add corresponding to the r.id is not consistent with the address of s ' itself, ignoring the inquiry request, otherwise, s ' retrieves the record information in the inquiry period from the storage layer account book, and returns to the inquirer.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims. In addition, the specific features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various possible combinations are not described further. Moreover, any combination of the various embodiments of the invention can be made without departing from the spirit of the invention, which should also be considered as disclosed herein.
Claims (1)
1. The hierarchical blockchain system for load balancing in the environment of the Internet of things is characterized by comprising a consensus index layer and a data storage layer;
the data storage layer is used for storing data account books of the terminals of the Internet of things, the consensus index layer comprises a plurality of nodes, any one node is connected with an adjacent node and is connected with one data storage layer, the nodes are stored with index account books, and the index account books contain data index information of each terminal of the Internet of things;
a user obtains a storage layer address of a target internet of things terminal data account book by inquiring a consensus index layer, and forwards a data access request to a corresponding storage layer block chain to the storage layer where the target internet of things terminal data account book is located;
the index information comprises an internet of things terminal id, a storage layer network address add and a data time period;
the terminal registration process of the Internet of things comprises the following steps:
after a new internet of things terminal r sends a registration request broadcast to a consensus index layer, each node in the consensus index layer broadcasts the load of a storage layer where an index node is located to the whole network, and all nodes of the consensus index layer compare the load information broadcast by other nodes; based on a load balancing strategy, a common index node s corresponding to a storage layer block chain with the smallest current load wins, s adds an identifier r.id of an Internet of things terminal r to a terminal list of s, and the storage layer block chain where s is located is responsible for receiving new registered Internet of things terminal data; meanwhile, s adds a new terminal record < r.id, s.add > message to the consensus index layer broadcast, data representing r is stored in a storage layer block chain where s is located, and a consensus index node receiving the message adds the < r.id, s.add > message to a local terminal list;
the data storage flow comprises the following steps:
each internet of things terminal r only needs to send data to any one of the consensus index layer nodes s, the s searches a terminal record list, and the data is sent to an index node s 'corresponding to r according to an address s' add matched with r.id; s 'after receiving the data, inquiring a terminal list, if the add corresponding to the r.id is not consistent with the address of the terminal, discarding the received data, otherwise, forwarding the data to a storage layer block chain where the data is located by s'; meanwhile, s' is responsible for broadcasting storage index information < r.id, time1, time2 and num > of r to the consensus index layer, wherein time1 and time2 respectively represent start and stop time of data acquisition of a number terminal, and num represents the number of data bars;
the data retrieval flow comprises:
when a user needs to browse the data of a certain internet of things terminal r, only a request containing a terminal r.id and a query time period needs to be sent to any one consensus index layer node s; searching a terminal list by s, and transmitting data to an index node s 'corresponding to r according to the queried s' add corresponding to r.id; s ' inquires the terminal list, if the add corresponding to the r.id is not consistent with the address of s ' itself, ignoring the inquiry request, otherwise, s ' retrieves the record information in the inquiry period from the storage layer account book, and returns to the inquirer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011276307.6A CN112380010B (en) | 2020-11-13 | 2020-11-13 | Hierarchical blockchain for load balancing in Internet of things environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011276307.6A CN112380010B (en) | 2020-11-13 | 2020-11-13 | Hierarchical blockchain for load balancing in Internet of things environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112380010A CN112380010A (en) | 2021-02-19 |
CN112380010B true CN112380010B (en) | 2024-04-02 |
Family
ID=74584331
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011276307.6A Active CN112380010B (en) | 2020-11-13 | 2020-11-13 | Hierarchical blockchain for load balancing in Internet of things environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112380010B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113127562A (en) * | 2021-03-30 | 2021-07-16 | 河南九域腾龙信息工程有限公司 | Low-redundancy block chain data storage and retrieval method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018205137A1 (en) * | 2017-05-09 | 2018-11-15 | Accenture Global Solutions Limited | Data storage layer index for efficient information retrieval |
CN110647559A (en) * | 2019-09-24 | 2020-01-03 | 腾讯科技(深圳)有限公司 | Data processing method, related node and system |
CN111556140A (en) * | 2020-04-26 | 2020-08-18 | 北京师范大学珠海分校 | Multi-layer block chain network architecture and data storage and sharing method thereof |
-
2020
- 2020-11-13 CN CN202011276307.6A patent/CN112380010B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018205137A1 (en) * | 2017-05-09 | 2018-11-15 | Accenture Global Solutions Limited | Data storage layer index for efficient information retrieval |
CN110647559A (en) * | 2019-09-24 | 2020-01-03 | 腾讯科技(深圳)有限公司 | Data processing method, related node and system |
CN111556140A (en) * | 2020-04-26 | 2020-08-18 | 北京师范大学珠海分校 | Multi-layer block chain network architecture and data storage and sharing method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN112380010A (en) | 2021-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8359318B2 (en) | System and method for distributed index searching of electronic content | |
Schmidt et al. | Enabling flexible queries with guarantees in P2P systems | |
US20080195597A1 (en) | Searching in peer-to-peer networks | |
CN101873335B (en) | Distributed type searching method of cross-domain semantic Web service | |
CN101674233B (en) | Peterson graph-based storage network structure and data read-write method thereof | |
EP2629212A1 (en) | Method for storing and searching tagged content items in a distributed system | |
CN105608188A (en) | Data processing method and data processing device | |
CN102843426B (en) | Based on Web cache resources shared system and the method for intelligent father node | |
Li et al. | Comet: A scalable coordination space for decentralized distributed environments | |
CN112380010B (en) | Hierarchical blockchain for load balancing in Internet of things environment | |
CN103326925B (en) | A kind of information push method and device | |
CN101344882B (en) | Data query method, insertion method and deletion method | |
CN102737061B (en) | Distributed ticket query management system and method | |
CN101917475B (en) | P2P (Peer-to-Peer) mode based PSRD (Program Support Requirements Document) universal service resource discovery method | |
CN104679805A (en) | Power grid integrated information remote access method | |
CN101004741A (en) | Modified hash method, and application | |
CN101072156A (en) | Method and system for searching seed for P2P system | |
Villamil et al. | Pins: Peer to peer interrogation and indexing system | |
Vishnevsky et al. | Scalable blind search and broadcasting over distributed hash tables | |
CN111538865B (en) | Multiparty set synchronization method and device and electronic equipment | |
AU2002351296A1 (en) | System and method for processing a request using multiple database units | |
Zhengdong et al. | A P2P-based semantic web services composition architecture | |
Xia et al. | Fully decentralized DHT based approach to grid service discovery using overlay networks | |
JP5132359B2 (en) | Data distributed processing system and method | |
Ren et al. | haps: Supporting effective and efficient full-text p2p search with peer dynamics |
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 |