Internet of Things data sharing method, system and device based on block chain and medium

By using blockchain technology for device registration, data encryption and smart contract control in IoT data sharing, the data security and trust issues in IoT data sharing are solved, safe and trustworthy decentralized data sharing is achieved, and the stability and transparency.

CN118631818APending Publication Date: 2024-09-10INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410936724.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing IoT data sharing method relies on centralized data centers, which leads to the risk of data security and privacy leakage. It also lacks a trust foundation and makes it difficult to verify the authenticity of the data.

Method used

Adopt a blockchain-based method to register IoT devices, generate keys for identity verification, collect and encrypt data, use smart contracts to control access rights, realize data transactions and sharing on the blockchain, and store data Exchange records are saved on the blockchain for auditing and traceability.

Benefits of technology

Through the decentralized blockchain network, the risk of single point of failure is eliminated, the stability and reliability of data sharing are improved, the credibility and privacy of data are enhanced, the establishment of trust is promoted, and through tamper-proof transactions Records increase transparency and traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631818A
    Figure CN118631818A
Patent Text Reader

Abstract

The invention discloses an Internet of Things data sharing method, system and device based on a block chain and a medium, and relates to the technical field of information, and the method comprises the steps: carrying out the registration of each Internet of Things device participating in data sharing, generating a secret key, and carrying out the identity verification of each Internet of Things device through employing the secret key; target data is collected through each piece of Internet of Things equipment, encryption is carried out by using a secret key, and the encrypted data is published to a block chain through a data owner, so that block chain transaction is completed; controlling the access authority of the encrypted data through a pre-deployed smart contract so as to allow the accessed node to obtain access authorization, and decrypting the encrypted data based on the key through the access authorization to obtain decrypted data; and performing data exchange operation on the decrypted data through the access-allowed node to realize data sharing, storing each data exchange record to the block chain to determine the transaction history, and performing data auditing and tracing based on the transaction history. According to the invention, safe and credible Internet of Things data sharing is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a blockchain-based Internet of Things data sharing method, system, device and medium. Background Art

[0002] The rapid development of IoT technology has enabled a large number of smart devices and sensors to collect, transmit and process various types of data. However, existing IoT data sharing methods usually rely on centralized data centers or intermediaries, which leads to risks of data security and privacy leakage. In addition, since the authenticity of data is difficult to verify, the traditional IoT data sharing model also lacks a sufficient trust foundation. Therefore, a decentralized, secure and reliable IoT data sharing method is needed to solve these problems. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a blockchain-based IoT data sharing method, system, device and medium, which can realize secure and reliable IoT data sharing. The specific scheme is as follows:

[0004] In the first aspect, the present application discloses a blockchain-based IoT data sharing method, comprising:

[0005] Register each IoT device that participates in data sharing, generate a corresponding key, and use the key to authenticate each registered IoT device;

[0006] Each IoT device that has successfully passed identity authentication collects corresponding target data, encrypts the target data using the key, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction;

[0007] After verifying that the blockchain transaction is legitimate, the access rights to the encrypted data are controlled through a pre-deployed smart contract, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data;

[0008] The decrypted data is subjected to corresponding data exchange operations through the nodes allowed to access, so as to realize data sharing among the IoT devices, and each data exchange record is saved to the blockchain to determine the corresponding transaction history, and data audit and tracing are performed based on the transaction history.

[0009] Optionally, registering each IoT device that participates in data sharing and generating a corresponding key, so as to use the key to authenticate each registered IoT device, includes:

[0010] Each IoT device participating in data sharing is registered in the blockchain, and a corresponding public key and private key are generated, so that other nodes in the blockchain can authenticate the identity of each registered IoT device through the public key and the private key; wherein the blockchain is a public blockchain platform or a self-developed blockchain platform.

[0011] Optionally, each of the IoT devices that has successfully passed the identity authentication collects corresponding target data and encrypts the target data, including:

[0012] Each of the IoT devices that has successfully passed identity authentication collects the corresponding target data according to its own functions and sensors, and encrypts the target data using the key based on a public key encryption algorithm.

[0013] Optionally, the data owner publishes the corresponding encrypted data to the blockchain to complete the blockchain transaction, including:

[0014] The encrypted data, the hash value of the target data and the digital signature of the data owner are published to the blockchain by the data owner to complete the blockchain transaction.

[0015] Optionally, after the data owner publishes the corresponding encrypted data to the blockchain to complete the blockchain transaction, the following steps may be performed:

[0016] The blockchain transaction is written into a new block, and the new block is broadcast to the entire blockchain so that other nodes can verify the blockchain transaction to determine whether the blockchain transaction is legal.

[0017] Optionally, controlling access rights to the encrypted data by a pre-deployed smart contract so that a node allowing access obtains access authorization from the smart contract includes:

[0018] The access rights to the encrypted data are defined by the smart contract, and the identity and access rights of each node are verified by the smart contract. The nodes allowed to access are determined according to the corresponding verification results, and the access authorization is issued to the nodes allowed to access by the smart contract.

[0019] Optionally, performing a corresponding data exchange operation on the decrypted data through the node allowed to access to achieve data sharing between the IoT devices includes:

[0020] The node allowed to access performs corresponding data exchange operations on the decrypted data based on the target data exchange method to achieve data sharing between the IoT devices; the target data exchange method is a point-to-point communication method or a method of encrypting the decrypted data again and transmitting it on the blockchain; the data sharing includes any one or a combination of data acquisition, data exchange and data forwarding.

[0021] In the second aspect, the present application discloses a blockchain-based IoT data sharing system, comprising:

[0022] An identity authentication module is used to register each IoT device that participates in data sharing and generate a corresponding key so as to use the key to authenticate the identity of each IoT device that has completed registration;

[0023] A data encryption module, used for collecting corresponding target data from each IoT device that has successfully passed identity authentication, encrypting the target data using the key, and publishing the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction;

[0024] A data decryption module is used to control the access rights of the encrypted data through a pre-deployed smart contract after verifying the legality of the blockchain transaction, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data;

[0025] A data sharing module, used to perform corresponding data exchange operations on the decrypted data through the nodes allowed to access, so as to realize data sharing among the IoT devices;

[0026] The data audit and tracing module is used to save each data exchange record to the blockchain to determine the corresponding transaction history and perform data audit and tracing based on the transaction history.

[0027] In a third aspect, the present application discloses an electronic device, comprising:

[0028] Memory, used to store computer programs;

[0029] A processor is used to execute the computer program to implement the aforementioned blockchain-based IoT data sharing method.

[0030] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned blockchain-based IoT data sharing method.

[0031] When the present application is performing IoT data sharing, firstly, each IoT device participating in the data sharing is registered, and a corresponding key is generated, so as to use the key to authenticate the identity of each IoT device that has completed registration; then, each IoT device that has successfully passed the identity authentication collects the corresponding target data, and uses the key to encrypt the target data, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction; after verifying that the blockchain transaction is legal, the access rights of the encrypted data are controlled through a pre-deployed smart contract, so that the node that allows access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data; finally, the node that allows access performs corresponding data exchange operations on the decrypted data to realize data sharing between the IoT devices, and saves each data exchange record to the blockchain to determine the corresponding transaction history, and perform data audit and tracing based on the transaction history. It can be seen that this application uses the blockchain network to share IoT data, and utilizes the decentralized characteristics of the blockchain network to eliminate the single point failure risk of traditional data centers, improve the stability and reliability of data sharing, and the data exchange achieved through blockchain technology has the characteristics of being tamper-proof, which enhances the credibility of the data and promotes the establishment of trust in data exchange. At the same time, in the process of data sharing, through the encryption and decryption of data and identity authentication based on smart contracts, the security and privacy of the data are further guaranteed to prevent unauthorized access and tampering. Finally, each data exchange record is saved to the blockchain, the corresponding transaction history is determined, and data auditing and tracing are performed based on the transaction history. The transaction information in the blockchain network is visible to all nodes, which improves the transparency and traceability of the data sharing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0033] Figure 1 A flowchart of a blockchain-based IoT data sharing method disclosed in this application;

[0034] Figure 2 A schematic diagram of a specific blockchain-based IoT data sharing method disclosed in this application;

[0035] Figure 3This is a schematic diagram of the structure of an Internet of Things data sharing system based on blockchain disclosed in this application;

[0036] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] Existing IoT data sharing methods usually rely on centralized data centers or intermediaries, which leads to the risk of data security and privacy leakage. In addition, since the authenticity of data is difficult to verify, the traditional IoT data sharing model also lacks sufficient trust foundation. In order to solve the above technical problems, this application discloses a blockchain-based IoT data sharing method that can achieve secure and reliable IoT data sharing.

[0039] See also Figure 1 As shown, the embodiment of the present invention discloses a blockchain-based IoT data sharing method, comprising:

[0040] Step S11: register each IoT device that participates in data sharing, generate a corresponding key, and use the key to authenticate the identity of each IoT device that has completed registration.

[0041] In this embodiment, Figure 2As shown, first enter the registration stage. In the registration stage, a public blockchain platform or a self-developed blockchain platform can be used to realize the registration and identity authentication of the device. These platforms have a powerful distributed consensus algorithm to ensure the consistency between nodes and the immutability of data. The public key and identity information of the device can be registered on the blockchain to ensure the unique identification of the node. It includes: registering each of the IoT devices participating in data sharing in the blockchain, generating corresponding public keys and private keys, so that other nodes in the blockchain can authenticate the registered IoT devices through the public key and the private key; wherein the blockchain is a public blockchain platform or a self-developed blockchain platform. Specifically, IoT device registration: each IoT device participating in data sharing needs to be registered in the blockchain network. During the registration process, the device will generate a pair of public and private keys for subsequent data encryption and identity authentication. After the device registration is completed, other nodes in the blockchain network can verify the identity of the device through the public key. Here, the device generates its own information signature based on the private key, and authenticates the device through the public key to the information signature.

[0042] Step S12: Each IoT device that has successfully passed identity authentication collects corresponding target data, and encrypts the target data using the key, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction.

[0043] In this embodiment, each IoT device that has successfully passed the identity authentication collects the corresponding target data according to its own functions and sensors, and uses the key to encrypt the target data based on the public key encryption algorithm. Data encryption can use an asymmetric encryption algorithm, such as RSA, to protect the privacy and security of the data. Each device has its own public key and private key. The data owner uses its private key to encrypt the data, and only the node using the corresponding public key can decrypt it. This method can ensure the confidentiality of the data during transmission and storage. When collecting data, the IoT device collects various types of data, such as environmental monitoring data, sensor data, etc., according to its functions and sensors. The collected data will then be encrypted to ensure the security and privacy of the data during transmission and storage. Public key encryption algorithms are usually used to encrypt data using the public key of the data owner.

[0044] Next, the encrypted data, the hash value of the target data, and the digital signature of the data owner are published to the blockchain by the data owner to complete the blockchain transaction. Specifically, we are currently entering the blockchain transaction stage. At this stage, a blockchain platform with smart contract functions can be used or smart contracts can be deployed on the self-developed blockchain. Smart contracts allow complex business logic and access control rules to be defined on the blockchain. The data publishing transaction will execute the smart contract and write the encrypted data, hash value, and digital signature to the blockchain. The consensus algorithm ensures that the transaction is confirmed and written to the block, ensuring the integrity and credibility of the data. The data owner uses his private key to publish the encrypted data to the blockchain network. This is a blockchain transaction that contains the hash value of the data and the digital signature of the data owner to ensure the source and integrity of the data. Finally, the block is confirmed, and the transaction will be written into a new block and broadcast to the entire blockchain network. Other nodes will verify the transaction and confirm whether the transaction is legal. In this way, the data exchange achieved through blockchain technology has the characteristics of being tamper-proof, enhancing the credibility of the data and promoting the establishment of trust in data exchange. The decentralized nature of blockchain networks eliminates the single point failure risk of traditional data centers and improves the stability and reliability of data sharing.

[0045] Step S13: After verifying that the blockchain transaction is legal, the access rights to the encrypted data are controlled through a pre-deployed smart contract, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data.

[0046] In this embodiment, after verifying that the blockchain transaction is legal, a blockchain platform that supports smart contracts is used, and the smart contract can implement data access control logic. For example, the smart contract on Ethereum can verify the identity and authority of the requester and grant access authorization based on the conditions defined by the data owner. This method ensures that only authorized nodes can access the decrypted data. Data access control: In the blockchain network, smart contracts are responsible for managing access control of data. The data owner can define the access rights of the data in the smart contract, such as specifying which nodes can access the data. Access authorization: Authorized nodes can obtain access authorization from the smart contract. The smart contract verifies the identity and access rights of the node. If it is legal, the node is allowed to decrypt and access the data, and the access authorization is issued to the node that is allowed to access using the smart contract.

[0047] Step S14: Perform corresponding data exchange operations on the decrypted data through the node allowed to access, realize data sharing among the IoT devices, and save each data exchange record to the blockchain to determine the corresponding transaction history, and perform data audit and tracing based on the transaction history.

[0048] In this embodiment, the node allowed to access performs corresponding data exchange operations on the decrypted data based on the target data exchange mode to achieve data sharing between the IoT devices; the target data exchange mode is a point-to-point communication mode or a mode of transmitting the decrypted data on the blockchain after encrypting it again; the data sharing includes any one or a combination of data acquisition, data exchange, and data forwarding. At the same time, after completing data sharing, the public blockchain platform provides an unalterable transaction record, which helps to audit and trace the data. For example, Ethereum's blockchain can trace the history of each transaction to ensure the transparency and credibility of data exchange. All data exchange records are permanently recorded on the blockchain to form an unalterable transaction history. Any node can audit and trace the historical exchange of specific data to ensure the transparency and credibility of the data. In this way, the transaction information in the blockchain network is visible to all nodes, which improves the transparency and traceability of the data sharing process.

[0049] To summarize, when the present application is performing IoT data sharing, firstly, each IoT device participating in the data sharing is registered, and a corresponding key is generated, so as to use the key to authenticate the identity of each IoT device that has completed registration; then, each IoT device that has successfully passed the identity authentication collects the corresponding target data, and uses the key to encrypt the target data, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction; after verifying that the blockchain transaction is legal, the access rights to the encrypted data are controlled through a pre-deployed smart contract, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data; finally, the node that is allowed to access performs corresponding data exchange operations on the decrypted data to realize data sharing between the IoT devices, and saves each data exchange record to the blockchain to determine the corresponding transaction history, and perform data auditing and tracing based on the transaction history. It can be seen that this application uses the blockchain network to share IoT data, and utilizes the decentralized characteristics of the blockchain network to eliminate the single point failure risk of traditional data centers, improve the stability and reliability of data sharing, and the data exchange achieved through blockchain technology has the characteristics of being tamper-proof, which enhances the credibility of the data and promotes the establishment of trust in data exchange. At the same time, in the process of data sharing, through the encryption and decryption of data and identity authentication based on smart contracts, the security and privacy of the data are further guaranteed to prevent unauthorized access and tampering. Finally, each data exchange record is saved to the blockchain, the corresponding transaction history is determined, and data auditing and tracing are performed based on the transaction history. The transaction information in the blockchain network is visible to all nodes, which improves the transparency and traceability of the data sharing process.

[0050] like Figure 2 As shown, this application will go through 6 stages when sharing IoT data, namely registration stage, data encryption stage, blockchain transaction stage, smart contract stage, data sharing stage and data audit stage.

[0051] Specifically, first, in the registration stage, public blockchain platforms or self-developed blockchain platforms can be used to implement device registration and authentication. These platforms have powerful distributed consensus algorithms that ensure consistency between nodes and the immutability of data. The public key and identity information of the device can be registered on the blockchain to ensure the unique identification of the node, that is, each IoT device participating in data sharing needs to be registered in the blockchain network. Second, in the data encryption stage, the various types of data collected by the IoT device according to its functions and sensors are encrypted using public key encryption algorithms. Data encryption can use asymmetric encryption algorithms, such as RSA, to protect the privacy and security of the data. Each device has its own public key and private key. The data owner uses its private key to encrypt the data, and only the node using the corresponding public key can decrypt it. This method ensures the confidentiality of the data during transmission and storage. Third, in the blockchain transaction stage, a blockchain platform with smart contract functions can be used or smart contracts can be deployed on the self-developed blockchain. Smart contracts allow complex business logic and access control rules to be defined on the blockchain. Data publishing transactions trigger smart contracts to write encrypted data, hash values, and digital signatures into the blockchain. The consensus algorithm ensures that the transaction is confirmed and written into the block, ensuring the integrity and credibility of the data. Specifically, it includes data publishing: the data owner publishes the encrypted data to the blockchain network. This is a blockchain transaction that contains the hash value of the data and the digital signature of the data owner to ensure the source and integrity of the data. Block confirmation: The transaction will be written into a new block and broadcast to the entire blockchain network. Other nodes will verify the transaction and confirm whether the transaction is legal. Fourth, the smart contract stage. Using a blockchain platform that supports smart contracts, smart contracts can implement data access control logic. For example, smart contracts on Ethereum can verify the identity and permissions of the requester and grant access authorization based on the conditions defined by the data owner. This approach ensures that only authorized nodes can access the decrypted data. In this way, in the blockchain network, smart contracts are responsible for managing data access control. Data owners can define data access rights in smart contracts, such as specifying which nodes can access the data. Fifth, in the data sharing stage, the node that obtains access authorization uses its private key to decrypt the encrypted data and restore the original data content. Nodes can obtain, process or forward data as needed to achieve data sharing and exchange between IoT devices. These nodes can use point-to-point communication to achieve data exchange, or re-encrypt the decrypted data and transmit it on the blockchain. This method ensures the secure transmission and exchange of data. Sixth, data audit stage. The public blockchain platform provides an unalterable transaction record, which helps to audit and trace data. For example, Ethereum's blockchain can trace the history of each transaction, ensuring the transparency and credibility of data exchange.Specifically include: Data transaction records: All data exchange records are permanently recorded on the blockchain, forming an unalterable transaction history. Audit and traceability: Any node can audit and trace the historical exchange of specific data to ensure the transparency and credibility of the data.

[0052] In this way, this application uses the blockchain network to share IoT data, utilizes the decentralized characteristics of the blockchain network to eliminate the single point failure risk of traditional data centers, improves the stability and reliability of data sharing, and the data exchange achieved through blockchain technology has the characteristics of being tamper-proof, which enhances the credibility of the data and promotes the establishment of trust in data exchange. At the same time, in the process of data sharing, through the encryption and decryption of data and identity authentication based on smart contracts, the security and privacy of the data are further guaranteed to prevent unauthorized access and tampering. Finally, each data exchange record is saved to the blockchain, the corresponding transaction history is determined, and data auditing and tracing are performed based on the transaction history. The transaction information in the blockchain network is visible to all nodes, which improves the transparency and traceability of the data sharing process.

[0053] See also Figure 3 The embodiment of the present invention discloses an Internet of Things data sharing system based on blockchain, including:

[0054] The identity authentication module 11 is used to register each IoT device that participates in data sharing and generate a corresponding key so as to use the key to authenticate the identity of each IoT device that has completed registration;

[0055] The data encryption module 12 is used to collect corresponding target data from each IoT device that has successfully passed identity authentication, encrypt the target data using the key, and publish the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction;

[0056] A data decryption module 13 is used to control the access rights of the encrypted data through a pre-deployed smart contract after verifying the legality of the blockchain transaction, so that the node that allows access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data;

[0057] A data sharing module 14 is used to perform corresponding data exchange operations on the decrypted data through the nodes allowed to access, so as to realize data sharing among the IoT devices;

[0058] The data audit and tracing module 15 is used to save each data exchange record to the blockchain to determine the corresponding transaction history and perform data audit and tracing based on the transaction history.

[0059] To summarize, when the present application is performing IoT data sharing, firstly, each IoT device participating in the data sharing is registered, and a corresponding key is generated, so as to use the key to authenticate the identity of each IoT device that has completed registration; then, each IoT device that has successfully passed the identity authentication collects the corresponding target data, and uses the key to encrypt the target data, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction; after verifying that the blockchain transaction is legal, the access rights to the encrypted data are controlled through a pre-deployed smart contract, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data; finally, the node that is allowed to access performs corresponding data exchange operations on the decrypted data to realize data sharing between the IoT devices, and saves each data exchange record to the blockchain to determine the corresponding transaction history, and perform data auditing and tracing based on the transaction history. It can be seen that this application uses the blockchain network to share IoT data, and utilizes the decentralized characteristics of the blockchain network to eliminate the single point failure risk of traditional data centers, improve the stability and reliability of data sharing, and the data exchange achieved through blockchain technology has the characteristics of being tamper-proof, which enhances the credibility of the data and promotes the establishment of trust in data exchange. At the same time, in the process of data sharing, through the encryption and decryption of data and identity authentication based on smart contracts, the security and privacy of the data are further guaranteed to prevent unauthorized access and tampering. Finally, each data exchange record is saved to the blockchain, the corresponding transaction history is determined, and data auditing and tracing are performed based on the transaction history. The transaction information in the blockchain network is visible to all nodes, which improves the transparency and traceability of the data sharing process.

[0060] In some specific embodiments, the identity authentication module 11 may specifically include:

[0061] An identity authentication unit is used to register each of the IoT devices participating in data sharing in the blockchain and generate corresponding public keys and private keys so that other nodes in the blockchain can authenticate each of the registered IoT devices through the public key and the private key; wherein the blockchain is a public blockchain platform or a self-developed blockchain platform.

[0062] In some specific embodiments, the data encryption module 12 may specifically include:

[0063] The data encryption unit is used for each IoT device that has successfully passed identity authentication to collect the corresponding target data according to its own functions and sensors, and to encrypt the target data using the key based on a public key encryption algorithm.

[0064] In some specific embodiments, the data encryption module 12 may specifically include:

[0065] The blockchain transaction completion module is used to publish the encrypted data, the hash value of the target data and the digital signature of the data owner to the blockchain through the data owner to complete the blockchain transaction.

[0066] In some specific embodiments, the system may further include:

[0067] The verification module is used to write the blockchain transaction into a new block and broadcast the new block to the entire blockchain so that other nodes can verify the blockchain transaction to determine whether the blockchain transaction is legal.

[0068] In some specific embodiments, the data decryption module 13 may specifically include:

[0069] An access authorization issuing unit is used to define the access rights of the encrypted data through the smart contract, and use the smart contract to verify the identity and access rights of each node, determine the nodes allowed to access according to the corresponding verification results, and use the smart contract to issue the access authorization to the nodes allowed to access.

[0070] In some specific embodiments, the data sharing module 14 may specifically include:

[0071] A data sharing unit is used to perform corresponding data exchange operations on the decrypted data based on a target data exchange method through the node allowed to access, so as to realize data sharing among the IoT devices; the target data exchange method is a point-to-point communication method or a method of encrypting the decrypted data again and transmitting it on the blockchain; the data sharing includes any one or a combination of data acquisition, data exchange and data forwarding.

[0072] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0073] Figure 4A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the blockchain-based IoT data sharing method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0074] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0075] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0076] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the blockchain-based IoT data sharing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.

[0077] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for sharing IoT data based on blockchain is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0078] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0079] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0080] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0081] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0082] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A blockchain-based IoT data sharing method, characterized in that: include: Register each IoT device that participates in data sharing, generate a corresponding key, and use the key to authenticate each registered IoT device; Each IoT device that has successfully passed identity authentication collects corresponding target data, encrypts the target data using the key, and publishes the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction; After verifying that the blockchain transaction is legitimate, the access rights to the encrypted data are controlled through a pre-deployed smart contract, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data; The decrypted data is subjected to corresponding data exchange operations through the nodes allowed to access, so as to realize data sharing among the IoT devices, and each data exchange record is saved to the blockchain to determine the corresponding transaction history, and data audit and tracing are performed based on the transaction history.

2. The method for sharing IoT data based on blockchain according to claim 1, characterized in that: The step of registering each IoT device that participates in data sharing and generating a corresponding key, and using the key to authenticate each registered IoT device, includes: Each IoT device participating in data sharing is registered in the blockchain, and a corresponding public key and private key are generated, so that other nodes in the blockchain can authenticate the identity of each registered IoT device through the public key and the private key; wherein the blockchain is a public blockchain platform or a self-developed blockchain platform.

3. The method for sharing IoT data based on blockchain according to claim 1, characterized in that: Each of the IoT devices that has successfully passed the identity authentication collects corresponding target data and encrypts the target data, including: Each of the IoT devices that has successfully passed identity authentication collects the corresponding target data according to its own functions and sensors, and encrypts the target data using the key based on a public key encryption algorithm.

4. The method for sharing IoT data based on blockchain according to claim 1, characterized in that: The data owner publishes the corresponding encrypted data to the blockchain to complete the blockchain transaction, including: The encrypted data, the hash value of the target data and the digital signature of the data owner are published to the blockchain by the data owner to complete the blockchain transaction.

5. The method for sharing IoT data based on blockchain according to claim 1, characterized in that: After the data owner publishes the corresponding encrypted data to the blockchain to complete the blockchain transaction, it includes: The blockchain transaction is written into a new block, and the new block is broadcast to the entire blockchain so that other nodes can verify the blockchain transaction to determine whether the blockchain transaction is legal.

6. The method for sharing IoT data based on blockchain according to claim 1, characterized in that: The controlling the access rights to the encrypted data by means of a pre-deployed smart contract so as to allow the accessing node to obtain access authorization from the smart contract includes: The access rights to the encrypted data are defined by the smart contract, and the identity and access rights of each node are verified by the smart contract. The nodes allowed to access are determined according to the corresponding verification results, and the access authorization is issued to the nodes allowed to access by the smart contract.

7. The method for sharing IoT data based on blockchain according to any one of claims 1 to 6, characterized in that: The performing corresponding data exchange operations on the decrypted data through the node allowed to access, so as to realize data sharing among the IoT devices, includes: The node allowed to access performs corresponding data exchange operations on the decrypted data based on the target data exchange method to achieve data sharing between the IoT devices; the target data exchange method is a point-to-point communication method or a method of encrypting the decrypted data again and transmitting it on the blockchain; the data sharing includes any one or a combination of data acquisition, data exchange and data forwarding.

8. A blockchain-based IoT data sharing system, characterized in that: include: An identity authentication module is used to register each IoT device that participates in data sharing and generate a corresponding key so as to use the key to authenticate the identity of each IoT device that has completed registration; A data encryption module, used for collecting corresponding target data from each IoT device that has successfully passed identity authentication, encrypting the target data using the key, and publishing the corresponding encrypted data to the blockchain through the data owner to complete the blockchain transaction; A data decryption module is used to control the access rights of the encrypted data through a pre-deployed smart contract after verifying the legality of the blockchain transaction, so that the node that is allowed to access obtains access authorization from the smart contract, and decrypts the encrypted data based on the key through the access authorization to obtain the decrypted data; A data sharing module, used to perform corresponding data exchange operations on the decrypted data through the nodes allowed to access, so as to realize data sharing among the IoT devices; The data audit and tracing module is used to save each data exchange record to the blockchain to determine the corresponding transaction history and perform data audit and tracing based on the transaction history.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the blockchain-based IoT data sharing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the blockchain-based Internet of Things data sharing method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Environment quality data management system and method and storage medium

    CN119180562A

  • Energy equipment data communication method based on block chain

    CN119420784A

  • Block chain-based 5G Internet of Things data sharing method

    CN120111481A

  • Ladder networking data trusted sharing system based on Changsafety chain

    CN121056185A

  • Blockchain-based data communication method for energy devices

    WO2026145384A1