CN-122001588-A - Block chain-based Internet of things data system and construction method thereof
Abstract
Aiming at the data security problem caused by the shortage of the fusion of the domestic blockchain technology and industry and the data tampering and the data leakage, the invention provides a software and hardware integrated data security storage scheme which combines embedded equipment with a long-safety chain technology. The structure of Pb (Protocol Buffers) structures is realized on an STM32F429 development board, and AES encryption and ECDSA signature technology in cryptography are utilized to process the data of the Internet of things. After the Pb structure was constructed, it was serialized and DER-encoded. And finally, the STM32F429 development board is used for sending the data to the Linux end, and the data is deserialized at the Linux end and then uploaded to the blockchain platform, so that the problem of safe storage and transmission of the data of the Internet of things is successfully solved. Through the scheme, the safety and reliability of the data are improved, the potential of combining the embedded equipment with the blockchain technology is also displayed, and an important reference is provided for future data security research of the Internet of things.
Inventors
- ZHANG YUEXIA
- TIAN SHUJIE
- DONG JIN
- REN CHANGRUI
- Yuan Taifu
Assignees
- 北京信息科技大学
- 北京微芯区块链与边缘计算研究院
Dates
- Publication Date
- 20260508
- Application Date
- 20241104
Claims (8)
- 1. The method for establishing the block chain-based internet of things data system is characterized by comprising the following steps of: 1) Acquiring original data of the Internet of things through terminal equipment; 2) Encrypting the data of the Internet of things by using an AES algorithm in Mbedtls libraries on embedded equipment; 3) Firstly, sending an AT instruction to a WIFI module to connect a WIFI network and an SNTP server, obtaining real-time and converting the real-time into a time stamp, then decrypting encrypted data to obtain an original text, constructing the time stamp, the original text and related blockchain information into the Payload structure, and carrying out serialization operation on the Payload structure; 4) A TxRequest structural body is constructed, namely a public key, a private key and a certificate hash are obtained through analyzing a user certificate of a blockchain, the private key is used for carrying out Ecdsa signature on the serialized Payload structural body, then DER coding operation is carried out on signature data, the Payload structural body, the DER coded signature data, the certificate hash and other data are integrated into a TxRequest structural body, and after serialization, the data are sent out through a development board transmission mode; 5) And receiving data and data uplink, namely monitoring a serial port at a Linux end, receiving the serialized TxRequest data sent by a development board, performing deserialization operation after successful receiving, verifying the integrity of a data structure, performing signature verification to ensure that the data is not tampered, and sending the data to a blockchain for further verification and storage after verification, thereby completing the data uplink function.
- 2. The system and method for creating and storing the blockchain-based data structure of the Internet of things of claim 1, wherein in the step 2), the same 128-bit key is used in the encryption and decryption processes based on the symmetric encryption algorithm, so that the consumption of computing resources is low.
- 3. The method for building the blockchain-based Internet of things data system and the construction method thereof according to claim 1, wherein in the step 3), a TCP/IP protocol is used for connecting a WIFI network and communicating with a TCP server, an SNTP server is connected to acquire a character string with a time format of 'year, month and day', the character string is required to be converted into an integer form of Unix timestamp, a hardware random number generator is used for generating a transaction ID, and a Protocol Buffers technology is adopted for constructing and serializing a Payload structure, and the technology provides a data serialization mode which is efficient, language and platform-independent, has good expansibility and type safety.
- 4. The method for building a blockchain-based Internet of things data system and the building method thereof according to claim 1, wherein in the step 4), after private key data is read from a user certificate, the private key data is decoded by using a PEM parser, then an ECDSA private key coded by DER is parsed by X509, and values X, Y of elliptic curve parameters, the private key and a public key are extracted, an ECDSA signature adopts an SECP256R1 elliptic curve, the private key is 256 bits in length, and the public key consists of two 256-bit coordinates (X and Y).
- 5. The method for building a block chain based Internet of things data system and its construction method according to claim 1, wherein in said step 4), the signature is split into R and S and encoded into ASN.1 INTEGRE types, the total LENGTH of the encoded data is calculated and encoded into ASN.1 LENGTH fields, and ASN.1 SEQUENTCE marks are written simultaneously, indicating that the subsequent data is a SEQUENCE for analysis and verification in the DER decoder, when Key1 button of the development board is pressed, ATK_ESP8266 module enters a pass-through mode, when Key2 button is pressed, exits the pass-through mode, presses Key0 button in the pass-through mode, and sends the serialized TxRequest structure to the Linux end to wait for receiving.
- 6. The method for building a blockchain-based Internet of things data system and the building method thereof according to claim 1, wherein in the step 5), a blockchain client is created, a SendTxRequest method of a blockchain SDK interface is called to send a transaction request, and a response TxResponse is obtained to judge whether the Internet of things data is successfully stored and uplinked.
- 7. The block chain-based internet of things data system is characterized by comprising a storage layer, a consensus layer and an embedded system in a block chain system; The storage layer is used for storing the existing intelligent contracts and transaction data on the blockchain; The consensus layer is used for generating new blocks and connecting the new blocks to the existing block chains in the storage layer to form a chain structure, Deploying intelligent contracts, data uplink and transaction management; the embedded system is used for constructing the data structure body of the Internet of things and sending the data structure body to the blockchain system for verification.
- 8. A blockchain-based internet of things data system is established, which is characterized by comprising a computer processor and a memory, wherein the computer processor 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 blockchain-based internet of things data system and the construction method thereof according to any one of claims 1 to 6 when executing the computer executable program, and in addition, the computer program is stored in a computer readable storage medium, and the blockchain-based internet of things data system and the construction method thereof according to any one of claims 1 to 6 can be realized when the processor executes the program.
Description
Block chain-based Internet of things data system and construction method thereof Technical Field The invention relates to the field of blockchain, in particular to an Internet of things data system based on a blockchain and a construction method thereof. Background In recent years, with the rapid development of technology, the internet of things (Internet of Things, ioT) has achieved interconnection of billions or even trillions of objects, which has been growing at a significant rate. According to the prediction of the internet data center, by 2025, with the popularization of 5G networks, industries such as industrial manufacture, intelligent automobiles, intelligent home furnishings, urban traffic and the like will come to a new round of prosperity. At that time, the number of globally networked IoT devices will exceed 400 billions. For example, ioT devices in the industrial manufacturing field may be used to monitor the operating state of a production line in real time, smart home devices may enable remote control and monitoring, smart cars may collect driving data to improve driving safety, etc. However, the large amount of data generated by these massive IoT devices also presents challenges to data security issues, with one of the particularly prominent issues being the increased risk of data tampering and data leakage. Because of the huge amount of data generated by the internet of things device, traditional data security control measures may not be able to effectively prevent tampering or leakage risk of large-scale data. Once the data is tampered with, normal operation of the entire system may be affected, even with serious security risks and losses. However, the disclosure of data may lead to disclosure of personal privacy information, and sensitive information is acquired and utilized by lawbreakers, which brings serious privacy security problem to users. Therefore, how to ensure the secure storage of the data of the internet of things has become a core challenge and has important research significance. The block chain technology can provide an innovative solution to the problem of data security of the Internet of things, ensure the consistency, reliability and traceability of data, and better protect the data security through encryption and storage of data on a chain. Firstly, the distributed architecture of the blockchain eliminates the problem of single point failure, ensures that the system can still normally operate when a plurality of nodes are failed, and improves the stability of the system and the safety of data. Secondly, the cryptographic algorithm ensures the non-falsification of the data, the chain structure realizes the data tracing, and the multiparty verification builds a trusted data system. In addition, the identity verification and access control mechanism of the blockchain can authenticate manufacturing equipment, limit the access authority of users, and ensure the confidentiality and the integrity of data through encryption and desensitization processing. Finally, the blockchain also provides a transparent and efficient supply chain management and traceability mechanism, ensures the whole course tracking of the product from raw material to finished product, and enhances the transparency and reliability of the supply chain. Through the characteristics, the blockchain can effectively solve the problems of data tampering, single-point faults, information island and the like in the traditional data management system. Therefore, realizing the data security of the internet of things through the blockchain has become a big hot spot of current research. Although the role of blockchains in industry development is increasingly prominent, problems remain in its development. The method comprises the steps that the underlying infrastructure products mostly adopt foreign open source technology, technology and industry depth fusion are required to be enhanced, and the development direction is not clear. Disclosure of Invention Aiming at the data security problem caused by the shortage of the fusion of the domestic blockchain technology and industry and the data tampering and the data leakage, the invention provides a software and hardware integrated data security storage scheme which combines embedded equipment with a long-safety chain technology. The structure of Pb (Protocol Buffers) structures is realized on an STM32F429 development board, and AES encryption and ECDSA signature technology in cryptography are utilized to process the data of the Internet of things. After the Pb structure was constructed, it was serialized and DER-encoded. And finally, the STM32F429 development board is used for sending the data to the Linux end, and the data is deserialized at the Linux end and then uploaded to the blockchain platform, so that the problem of safe storage and transmission of the data of the Internet of things is successfully solved. Through the scheme, the safety and reliability of the data