Credible edge Internet of things system with deployment of end edge cloud cooperation of block chain
Technical Field
The invention belongs to the technical field of Internet of things, and particularly relates to a trusted edge Internet of things system with collaborative end edge clouds of a deployment block chain.
Background
In recent years, the blockchain technology does not need a third-party organization for management, and realizes decentralized trust establishment through a cryptography algorithm and a distributed consensus algorithm, so the blockchain technology has wide application prospects in various industries. The tamper resistance of the block chain ensures the stability and reliability of the data, and the multi-party consensus mechanism ensures the verifiability and credibility of the data and ensures that the electronic data can be efficiently, transparently, safely and trustfully stored and transmitted. However, since the blockchain network is composed of independent nodes, various operations such as transfer transactions occurring at the nodes are broadcast to the network in the form of transaction data, and when the usage amount is large, the problems of network congestion and low communication efficiency are caused.
The internet of things is a new technology appearing at the beginning of the century, and covers information acquisition, information transmission and information storage processing technologies, and articles can be connected through the technologies to exchange information and communicate, so that intelligent management is realized. However, the traditional architecture of the internet of things is a centralized architecture, so that the security and reliability of electronic data of the internet of things are defective, and the data security problem is particularly important when a plurality of devices are connected through a central communication channel.
The existing internet of things integrating the blockchain technology is only to deploy the blockchain on the internet of things equipment, and neglects that as the data volume and the communication demand are higher and higher, the equipment needs to generate and verify a plurality of things very quickly, the generated blockchain transaction blocks are more and more, the limited memory capacity of the internet of things equipment can limit the performance of the equipment, the access speed is lower and slower, and the method cannot be applied to the fields with high data requirements such as intelligent industrial production and the like.
Disclosure of Invention
The invention aims to provide a credible edge Internet of things system with good safety and high communication efficiency and with cooperation of end edge clouds of a deployment block chain.
The whole edge Internet of things system architecture is divided into three layers: the terminal layer comprises a plurality of terminal devices, the edge layer comprises a plurality of edge devices, and the cloud service layer is a built cloud server. According to the method, block chains with different functions are deployed according to different performance characteristics of different layers of the edge Internet of things; the data safety and reliability problem in the Internet of things is solved, the communication efficiency is improved, the data transmission delay is reduced, the maximum utilization of the performance of each device is guaranteed, the data safety and reliability management system can be applied to intelligent industrial production, and the production, management and financing efficiency of enterprises is improved.
The trusted edge Internet of things system with the deployment block chain and the end edge cloud cooperation comprises a plurality of terminal devices, a plurality of edge devices, a cloud server and the block chain deployed on the system. Wherein:
the terminal equipment is provided with a block chain data preprocessing function module, and the data preprocessing function module comprises a data acquisition module, a data preprocessing module, a terminal layer account management module and a communication module; wherein:
the data acquisition module comprises data acquisition, data receiving and data sending and mainly completes tasks of acquiring data and receiving and sending the data by the terminal equipment;
the data preprocessing module comprises an early warning intelligent contract, data classification and data encryption, and has the main functions of configuring different early warning models according to different application scenes, analyzing and labeling data, performing alarm processing on the data conforming to the early warning models and mainly finishing a preprocessing task on equipment; here, the algorithm of data classification may be an SVM (support vector machine) algorithm, an NBC (naive bayes classification) algorithm, a KNN (K nearest neighbor) algorithm, or the like; the data encryption algorithm is a block chain encryption algorithm and comprises the steps of carrying out digital signature and abstract on data to generate a pair of public and private keys; the algorithm of the digital signature may be an RSA, DSA or ECDSA (elliptic curve digital signature) algorithm, and the algorithm of the digest generation may be an MD (message digest) or SHA (secure hash) algorithm;
the terminal layer account management module comprises identity registration and identity management, and has the main functions of registering and chaining terminal equipment, generating a block chain Identification (ID), a public and private key pair and the like;
the communication module is mainly used for realizing communication between the terminal equipment and the edge equipment through a low-power local area network. The supported technologies include at least one of Wi-Fi, ZigBee, NB-loT, LoRa, SigFox.
Furthermore, the terminal equipment can be field acquisition equipment, environment sensing equipment, terminal control equipment and the like, the terminal equipment generates an account of the terminal equipment through a terminal layer account management module, is provided with an independent identification ID and a public and private key, finishes data acquisition through a data acquisition module, analyzes and labels data through a data preprocessing module, packs the data in a data block form and transmits the data to edge equipment through a data communication module.
The edge device is provided with a block chain application node function module, and the application node function module comprises an edge layer account management module, a data processing module, an application node module and a communication module; wherein:
the edge layer account management module comprises identity registration, identity management and account management, and has the main functions of edge equipment registration and chaining, block chain Identification (ID) and public and private key pair generation, management of nearby terminal equipment and allocation of sufficient pass-certificate to the terminal equipment account;
the data processing module comprises data receiving, data analysis, data classification, data sending and early warning intelligent contracts; the edge device receives data transmitted by the terminal device, further processes the data, preferentially processes abnormal data, performs early warning if the data are abnormal, marks the data again, broadcasts the data to other nodes and receives feedback of other nodes;
the application node module comprises a data check label, a data query and a data storage intelligent contract, and has the main functions of verifying whether received data is tampered, querying previous affairs and the data storage intelligent contract, wherein the contract is used for storing data by edge equipment, and the edge equipment only stores staged block data and continuously updates the data;
the communication module has the main function of realizing communication between the terminal equipment and the edge equipment and between the edge equipment and the cloud server through the low-power local area network. The supported technologies comprise at least one of Wi-Fi, ZigBee, NB-loT, LoRa and SigFox;
further, the edge device may be an intelligent router, an intelligent edge gateway, and the like, the edge device generates an account of the edge device through an edge layer account management module, is provided with an independent identification ID and a public and private key, and is allocated to a connected terminal account for sufficient certification for data transmission, receives data transmitted by the terminal device through a data processing module and an application node module, performs verification, preferentially processes abnormal data after the verification is passed, further analyzes, processes and feeds back the data, updates the stored data by calling a data storage intelligent contract, and broadcasts the data to other connected nodes through a communication module.
The cloud server is provided with a block chain consensus node function module, and the consensus node function module comprises a data processing module, a data storage module, a consensus node module and a communication module; wherein:
the data processing module comprises data receiving, data analysis, data feedback and an early warning intelligent contract, and has the functions of mainly receiving data transmitted by edge equipment, further analyzing the data, sequentially processing emergency data and normal data and feeding back the result in time;
the data storage module is mainly used for storing data in a distributed mode, an interplanetary file system (IPFS) is adopted, and NoSQL databases such as LevelDB, CouchDB, RocksDB and the like are selected as bottom storage;
the common identification node module comprises data verification, common identification and uplink, and has the functions of mainly receiving data transmitted by other nodes and then verifying, and performing common identification between common identification nodes after the verification is passed; here, the consensus algorithm may be POW, POS, PBFT, etc., and the distributed ledger is modified after achieving consensus, completing data uplink;
the communication module mainly functions to realize communication between nodes by using a P2P network technology; the consensus nodes are at least four, every two of the four consensus nodes are connected, and the application nodes are connected with 1 to N other nodes;
furthermore, the cloud server receives data transmitted by other nodes through the data processing module and the consensus node module, verifies the data, further analyzes, processes and feeds back the data after the data are verified, performs consensus on the data and other three consensus nodes through the communication module, modifies the distributed account book after the consensus, completes data chaining, and stores and backs up the data through the data storage module.
The trusted edge Internet of things system with collaborative end edge clouds for deploying the block chain can be applied to intelligent industrial production. Can go to gather the data in the industrial production through this system, analyze data through the early warning model, if data are unusual, can early warning the very first time, integrated block chain technology guarantees the tamper-proof nature and the security of data, the enterprise can carry out the financing through the production data, accelerate the expansion of enterprise's scale, also can carry out visual management to data, intelligent industrial production can be furniture production, trades such as automobile parts production, the data of gathering include but not be limited to temperature, humidity, also can be raw and other materials memory space, commodity circulation order volume, warehouse entry delivery list etc..
Drawings
Fig. 1 is a system architecture diagram of a block chain deployment method facing edge cloud coordination of a trusted edge internet of things.
Fig. 2 shows functional modules of the terminal device, the edge device, and the cloud server according to the present invention.
Fig. 3 is a flowchart of a block chain deployment method of end edge cloud cooperation for a trusted edge internet of things.
Detailed Description
The technical scheme is further specifically described by matching the invention with the accompanying drawings.
As shown in fig. 1, a block chain deployment method and system architecture diagram facing edge cloud coordination of a trusted edge internet of things is divided into a terminal layer, an edge layer, and a cloud service layer. The terminal layer comprises a plurality of terminal devices, the edge layer comprises a plurality of edge devices, and the cloud service layer is a built cloud server. As shown in fig. 2, the terminal device, the edge device, and the functional module on the cloud server are deployed with a block chain data preprocessing function, and the functional module includes a data acquisition module, a data preprocessing module, a terminal layer account management module, and a communication module; the edge device is provided with a block chain application node, and the functional module is provided with an edge layer account management module, a data processing module, an application node module and a communication module; the cloud server is provided with four block chain consensus nodes, and the functional modules of the four block chain consensus nodes comprise a data processing module, a data storage module, a consensus node module and a communication module.
The data acquisition module in the terminal equipment comprises data acquisition, data receiving and data sending and mainly completes tasks of acquiring data and receiving and sending the data by the terminal equipment; the data preprocessing module comprises early warning intelligent contracts, data classification and data encryption, and has the main functions of compiling different early warning intelligent contracts according to different application scenes, analyzing and labeling data, performing alarm processing on the data conforming to an early warning model and mainly finishing a preprocessing task of equipment; the terminal layer account management module comprises identity registration and identity management, and has the main functions of registering and winding up terminal equipment, generating a block chain Identifier (ID), a timestamp and the like; the communication module is mainly used for realizing communication between the terminal equipment and the edge equipment through a low-power local area network, and the supported technology comprises at least one of Wi-Fi, ZigBee, NB-loT, LoRa and SigFox;
the edge device is provided with a blockchain application node, an edge layer account management module in the functional module comprises identity registration, identity management and account management, and the main functions of the edge device are that the edge device registers and links a chain, generates a blockchain identification ID and a public and private key pair, manages nearby terminal devices and allocates sufficient pass-certificates for the terminal device accounts; the data processing module comprises data receiving, data analysis, data classification, data sending and early warning intelligent contracts, the edge equipment receives data transmitted by the terminal equipment, further processes the data, preferentially processes abnormal data, if the data is abnormal, early warning is carried out, a label is marked again, the data is broadcasted to other nodes, and the feedback of other nodes is received; the application node module comprises a data check label, a data query and a data storage intelligent contract, and has the main functions of verifying whether received data is tampered, querying previous affairs and the data storage intelligent contract, wherein the contract is used for storing data by edge equipment, and the edge equipment only stores staged block data and continuously updates the data; the communication module is mainly used for realizing communication between the terminal equipment and the edge equipment through a low-power local area network, the supported technology comprises at least one of Wi-Fi, ZigBee, NB-loT, LoRa and SigFox, the edge equipment and the cloud server are in communication, and a P2P network technology is utilized;
the cloud server deploys a block chain consensus node, a data processing module in the functional module comprises data receiving, data analysis, data feedback and an early warning intelligent contract, and the function of the functional module is mainly to receive data transmitted by edge equipment, further analyze the data, sequentially process emergency data and normal data and feed back the result in time; the data storage module has the functions of mainly performing distributed storage on data, applying an interplanetary file system (IPFS), and selecting NoSQL (structured query language) such as LevelDB, CouchDB, RocksDB and the like as bottom storage; the common identification node module comprises data verification, common identification and uplink, and has the functions of mainly receiving data transmitted by other nodes and then verifying, carrying out common identification among common identification nodes after the verification is passed, wherein a common identification algorithm can be POW, POS, PBFT and the like, and modifying a distributed account book after the common identification is achieved to complete the data uplink; the communication module has the main functions of realizing communication among nodes by utilizing a P2P network technology, wherein at least four consensus nodes are required, every two of the four consensus nodes are connected, and the application node is connected with 1 to N other nodes;
the terminal device, the edge device and the cloud server together form a whole system, and as shown in fig. 3, a block chain deployment method flow chart facing end edge cloud cooperation of a trusted edge internet of things is provided.
The terminal equipment can be field acquisition equipment, environment sensing equipment, terminal control equipment and the like, authentication and registration are completed through a terminal layer account management module to become trusted equipment on a chain, registration content comprises a terminal equipment identification ID, a public and private key and the like, and sufficient evidence is distributed to an account of the terminal equipment for transmitting data after the registration is successful. Next, the terminal device acquires data through the data acquisition module, and can acquire different types of data according to different application scenes, for example, the terminal device is applied to industrial production factories, can acquire factory temperature, humidity, raw material entering factory, product leaving factory and other data by using the terminal device, and preprocesses the data through the data preprocessing module after acquiring corresponding data. The data preprocessing module serializes data, converts the data into digital signals, different early warning models are compiled in the data preprocessing module according to different application scenes, the contract comprises early warning threshold values and relevant configurations, the data are classified, the data classification algorithm can be an SVM (support vector machine) algorithm, an NBC (naive Bayesian classification) algorithm, a KNN (K nearest neighbor) algorithm and the like, tags of 'normal data' and 'abnormal data' are marked on the data through different data classification algorithms, when the judgment result is 'abnormal data', the terminal equipment starts an alarm program, and the equipment sends out early warning to remind field workers. The data preprocessing module encrypts the labeled data, a block chain encryption algorithm is used for digitally signing and abstracting the data, the digital signature algorithm can be RSA, DSA or ECDSA (elliptic curve digital signature) algorithm, the abstract algorithm can be MD (message abstraction) or SHA (secure hash) algorithm, a timestamp is covered after the data are encrypted through the digital signature and abstract algorithm, a data block of the block chain is basically formed, then data transmission is carried out through the communication module, the communication module mainly has the function of realizing communication between terminal equipment and edge equipment through a low-power-consumption local area network, and the supported technology comprises at least one of Wi-Fi, ZigBee, NB-loT, LoRa and SigFox.
The edge device can be an intelligent router, an intelligent edge gateway and the like, firstly, the edge device completes authentication and registration through an edge layer account management module to become a trusted device on a chain, the registration content comprises an edge device identification ID, a public and private key and the like, and sufficient evidence is distributed to an account of the edge device for data transmission after the registration is successful. The edge device firstly receives data through the communication module and the data processing module, verifies the data through the data signature verification function of the application node module after receiving the data, if the data is not verified, the data is fed back to the terminal device or the edge device is tampered, the request is sent again, if the data is verified, the received data is further processed through the data processing module, and the priority is that the abnormal data is processed firstly, and then the normal data is processed in idle time. The abnormal data is further compared with the optimized early warning model, if the abnormal data is not in accordance with the early warning model, the abnormal data is indicated to indicate normal data, the normal data is fed back to the terminal equipment, the data is collected again, if the abnormal data is indicated to indicate abnormal data, early warning is carried out, the edge equipment sends out early warning to remind workers, the data is re-labeled with 'emergency data' through a data classification algorithm, then the function of broadcasting the emergency data to other nodes is completed through a communication module, and the other nodes comprise application nodes of the edge equipment and common identification nodes of the cloud server which are connected.
After the application node of the edge device broadcasts data to other nodes, the data is stored by calling a data storage intelligent contract written in the application node module, verified transactions are not stored on the edge device but are centrally and uniformly stored on a cloud server to form a cloud storage copy, the edge device only stores a staged transaction block, and storage space is continuously changed. The application node function module of the block chain deployed on the edge device calls the hash value of the transaction to be queried to find the corresponding data if a manager wants to query the data.
Four cloud hosts are built into a cloud server, each cloud host is a common identification node, and every two common identification nodes are connected with each other, so that the server is ensured to be in a relatively safe environment. The data processing method comprises the steps of firstly receiving data through a data processing module and a communication module, then verifying the data through a consensus node module after the data are received, if the data are not verified, indicating that the data are tampered, feeding the data back to data source equipment, and if the data are verified, further processing the data, wherein the priority is that 'emergency data' is processed firstly and then 'normal data' is processed in idle. And further comparing the data with the more optimized early warning model, feeding the data back to the edge equipment if the data are not in accordance with the early warning model, and directly early warning the data to background management personnel through a cloud if the data are normal, so as to survey related equipment. After the data processing is finished, the affairs are broadcasted to other consensus nodes through the consensus node module and the communication module, consensus is finished among the consensus nodes through a consensus algorithm, the consensus algorithm can be POW, POS, PBFT and the like, the distributed account book is modified after consensus is achieved, and data chaining is finished. The data storage module is used for data storage and applies an interplanetary file system (IPFS).
The utility model provides an edge thing networking of integrated block chain technique application in intelligent industrial production, intelligent industrial production can be toy production, furniture production, equipment parts production etc. for example use in toy production industry, because present many toy manufacturing enterprises are all middle-size and small-size enterprises, face the production data not intelligent, the difficult scheduling problem of enterprise financing, consequently can utilize this system to effectively solve these problems. The method comprises the steps that firstly, data such as factory temperature, humidity, raw material entering, product leaving, order and the like can be acquired by using terminal equipment, the data are further processed, linked up and stored through edge equipment and a cloud server, the safety, credibility, non-falsification and traceability of the data can be guaranteed, the performance of the edge equipment is effectively released, early warning prompt can be carried out when the data are abnormal, the production capacity and potential of an enterprise can be systematically evaluated through the data, the data are digital assets of the enterprise, the method can be used for carrying out intelligent management on production by the enterprise, the asset credibility of the enterprise is enhanced, the product mobility is improved, the financing cost is reduced, and the supervision efficiency is improved.
The edge internet of things with the integrated block chain technology applied to the intelligent industrial production realizes that the block chain technology can be effectively utilized in the intelligent industrial production, the data is guaranteed to be safe and credible and cannot be tampered, and meanwhile, the problem that the block chain occupies a storage space to influence the performance of equipment is solved. The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.