Search

CN-122019659-A - Block chain-based trusted Internet of things data acquisition and uplink method and device

CN122019659ACN 122019659 ACN122019659 ACN 122019659ACN-122019659-A

Abstract

The invention discloses a block chain-based trusted Internet of things data acquisition and uplink method and device, wherein the method comprises the following steps: firstly, the block chain internet of things terminal collects internet of things data to obtain original data. Secondly, encrypting the acquired data, constructing a transaction body by using the encrypted data, signing the transaction body by using a private key to obtain a signature value, and constructing a request body by using the signature value and the terminal certificate of the Internet of things. The request body is serialized by using an embedded serialization tool, data transmission is carried out through trusted transmission, the request body is sent to the blockchain client, the blockchain client performs signature verification on the received data, and the data is uplink after the signature verification passes. In order to realize the operations of encryption, signature and the like of data, a data storage overall scheme based on a block chain, a data storage overall architecture based on the block chain, a time sequence diagram of the overall architecture and a corresponding software and hardware scheme are respectively designed.

Inventors

  • ZHANG YUEXIA
  • LU JIE
  • DONG JIN
  • REN CHANGRUI
  • Yuan Taifu

Assignees

  • 北京信息科技大学
  • 北京微芯区块链与边缘计算研究院

Dates

Publication Date
20260512
Application Date
20241104

Claims (4)

  1. 1. The method and the device for establishing the block chain-based trusted Internet of things data acquisition and uplink are characterized by comprising the following steps: Step 1, a block chain internet of things terminal collects internet of things data to obtain original data; step 2, encrypting the acquired data, constructing a transaction body by using the encrypted data, signing the transaction body by using a private key to obtain a signature value, and constructing a request body by using the signature value and a terminal certificate of the Internet of things; step 3, serializing the request body by using an embedded serialization tool, transmitting data through trusted transmission, and sending the data to the blockchain client; And 4, checking the received data by the blockchain client, and uploading the data after the checking is passed.
  2. 2. The method for establishing the blockchain-based trusted Internet of things data acquisition and uplink according to claim 1, wherein in the step 2, data is encrypted and a transaction body is constructed, and a signature and construction request body comprises the following main parts of a first part which is an overall architecture design and mainly designs an Internet of things terminal data uplink client system by utilizing the existing infrastructure. The trusted Internet of things data security storage model in the blockchain technology is composed of a resource layer, a blockchain platform layer, a blockchain basic service layer, a data uplink system core module, an application layer, a certificate generation tool and other auxiliary tools from bottom to top. The resource layer is the bottommost layer of the whole system and mainly comprises basic resources such as cloud infrastructure, internet of things equipment, physical computers, virtual machines and the like. The blockchain platform layer is a second layer and mainly comprises various storage resources such as levelDB, mySQL databases, crypto encryption libraries, conf configuration libraries and other basic components and a blockchain network. The node types of the blockchain network are divided into three types, namely synchronous nodes, consensus nodes and light nodes. The nodes are connected by adopting a p2p network. Different nodes have different functions, and the synchronous nodes store the complete data backup of the block chain system and update the backup in real time so as to ensure that the data stored by the nodes are the latest and the most complete block data. But the synchronization node does not participate in the consensus, it has no capability nor authority for consensus. The consensus node is the highest authority node in the blockchain system and is also the highest capacity node. The consensus nodes participate in the consensus process, save the most complete data of the blockchain system and are the most core nodes in the blockchain. The light node has smaller volume, but the stored data is not comprehensive, and only partial data is reserved. Not all changes are verified independently, but the necessary data is requested from some providers. The provider may connect to the full node directly or through some centralized remote procedure call server. The light node will then validate the data keeping it synchronized with the chain head. The light node only processes the block header and only occasionally downloads the actual block content. The degree of lightweight of nodes may vary depending on the combination of light client and full client software they are running. The basic service layer of the blockchain provides some basic services of the blockchain, and in the design of the data uplink client system of the terminal of the Internet of things, the basic services mainly used comprise RPC service, transaction caching service, block verification service, message subscription service and the like. In addition to these basic services, services related to the chain are provided, including a chain management service, a certificate key management service, a chain code call service, and the like. The basic services take the blockchain platform as a basis, and an interface is provided for the core module upwards, so that the core module can call the basic services to process data. The core module layer of the data uplink system is a core function set provided by the Internet of things terminal data uplink client system, and the core module layer is mainly divided into two major parts, namely an embedded part and a blockchain client part because the Internet of things terminal data uplink client system relates to subsystems such as an embedded type and a blockchain. The embedded part mainly comprises transaction construction, certificate application, account inquiry and other services. The blockchain client part mainly comprises the functions of certificate analysis, private key issuing, uplink service and the like. In addition, the system also comprises additional modules such as a certificate generation tool and a system test, and the like, thereby providing a more comprehensive test and use for the system. Because the hardware design part of the whole system only relates to the embedded part, only the hardware structure diagram of the embedded part is designed when the hardware design is carried out, the design mainly follows the minimum system principle, and except for some basic components, other components are used and added. The software architecture is divided into an embedded side and a blockchain side in total, and adopts a layering and modularized design mode. The embedded type side is divided into 5 layers from bottom to top, namely a hardware resource layer, an operating system layer, an encryption library layer, a core module layer, an interface layer and an application layer. The hardware resource layer and the operating system layer are basic resources. The function library layer writes own encryption algorithm and signature algorithm, writes serialization and network management on the basis of the existing encryption algorithm. The core module mainly comprises a transaction structure and an account inquiry service.
  3. 3. The method of claim 1, wherein the step of serializing the request by the serialization tool for embedded in the request is performed by a trusted transmission, and the request is sent to the blockchain client, and the step of serializing the request by the nanopb serialization tool is performed by an SSL trusted transmission, and the request is sent to the blockchain client: firstly, the constructed request body is used as input, serialization is carried out through nanopb, then the serialized data is transmitted to the blockchain client side in a safe mode, secondly, the blockchain client side deserializes the data, analyzes the request body, then takes out the transaction body, verifies the signature of the transaction body, and links the transaction body up after the verification is passed.
  4. 4. The method for acquiring and uploading the data of the trusted Internet of things based on the blockchain is characterized by comprising a computer processor and a memory, wherein the memory is used for storing a computer executable program, the processor reads the computer executable program from the memory and executes the computer executable program, the processor can realize the method for safely storing the data of the trusted Internet of things in the blockchain technology according to any one of claims 1 to 3 when executing the computer executable program, and the computer readable storage medium stores the computer program which can realize the method for safely storing the data of the trusted Internet of things in the blockchain technology according to any one of claims 1 to 3 when being executed by the processor.

Description

Block chain-based trusted Internet of things data acquisition and uplink method and device Technical Field The invention relates to the technical field of the Internet of things and blockchain, in particular to a method and a device for safely storing trusted Internet of things data in the blockchain technology. Background With the development of the internet of things technology, the number of the terminals of the internet of things is rapidly increased to generate massive data. For the management of the mass data, the traditional mode is to upload the internet of things data to a central node for centralized management. The centralized management of data at a central node may face multiple problems such as monopoly of data, fake data, unfavorable sharing, data leakage, etc. Therefore, the research of the novel internet of things data management scheme has important significance. The blockchain system has the advantages of sharing, safety, traceability, trustworthiness and the like, and data in the blockchain system is difficult to counterfeit, traceable and trustworthy. The unique cryptography principle and the operation mechanism of the blockchain endow the blockchain with the characteristics of decentralization, non-tamper property, traceability and the like, and a new thought is provided for solving the security problem faced by the current Internet of things. In 2008 Satoshi Nakamoto (Zhongben Smart) a blockchain technique was first proposed in published paper "Bizhen-point electronic Cash System". As an underlying technology of bitcoin, the blockchain nature is a de-centralized, distributed database. The data structure is a linked list in a series of blocks constructed by hash pointers, and each block contains a series of transaction data, so that the data cannot be tampered by an encryption mode. At the same time, each blockchain has a common problem to be solved, i.e., most participants should agree on the order of blocks and have the same knowledge capacity for the blockchains in the system. The most distinctive feature of the blockchain is its decentralization network, so that it can construct trust between nodes without trusted third party endorsements in a decentralization system, eliminating single point failure, realizing decentralization and distributed trust, and completing value transfer while information transfer. As a distributed network scheme, the storage characteristics of the blockchain are very suitable for the application scene of the distributed Internet of things. The block chain technology is used for solving the safety problem in the Internet of things and replacing a third party central agency. All peer nodes in the network can verify the identity of the equipment, and the influence of single-point faults can be effectively avoided. Because the internet of things equipment is limited by insufficient resources, other nodes cannot be trusted among all terminal nodes. The inherent non-tamperable nature of the blockchain itself is that the data packed into blocks is linked in a hash chain fashion, and any information on the chain cannot be modified theoretically as long as more than fifty percent of the blocks are guaranteed to be secure. Thereby realizing the trusted communication under the condition of the decrustation. Therefore, the management of the data of the Internet of things by adopting the blockchain system has important research value. Disclosure of Invention Aiming at the problems of unsafe data storage, untraceable data, unreliable data and the like of the Internet of things, the invention provides a method and a system for safely storing trusted Internet of things data in a blockchain technology. The method builds a trusted Internet of things data secure storage model in a blockchain technology, and introduces a blockchain system to ensure the data credibility in the Internet of things. And then, designing an Internet of things data secure storage system in the blockchain, and writing relevant codes for realizing the system. The system has excellent performance in the aspects of guaranteeing the data security of the Internet of things, traceability of the data and verifiability of the data. The block chain-based trusted Internet of things data acquisition and uplink method and device comprise the following steps: Step 1, a block chain internet of things terminal collects internet of things data to obtain original data; step 2, encrypting the acquired data, constructing a transaction body by using the encrypted data, signing the transaction body by using a private key to obtain a signature value, and constructing a request body by using the signature value and a terminal certificate of the Internet of things; step 3, serializing the request body by using an embedded serialization tool, transmitting data through trusted transmission, and sending the data to the blockchain client; Step 4, the block chain client performs signature verification on the received data, and