Internet of Things data processing method and device based on block chain
By introducing the identity authentication mechanism of trusted institutions and edge servers in the blockchain, IoT data is processed and encrypted, and using the blockchain-IPFS mapping relationship for storage, it solves the privacy leakage, data tampering and data redundancy problems in IoT data storage, and realizes efficient and secure IoT data storage.
Patent Information
- Application Number
- CN202510285627.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-13
AI Technical Summary
The existing technology has problems such as privacy leakage and malicious tampering in storing IoT data. The storage mechanism of traditional blockchain systems leads to data redundancy, making it difficult to deal with the growing IoT data.
By introducing trusted institutions to the blockchain for identity registration, the edge server processes and encrypts IoT data through blockchain authentication, and tests the data's effectiveness through the blockchain-IPFS mapping relationship in a decentralized storage environment.
It improves the security of IoT data storage, prevents privacy leakage and data tampering, reduces data redundancy, and improves the efficiency and reliability of data storage.
Smart Images

Figure CN120151022A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to an Internet of Things (IoT) data processing method and apparatus based on a blockchain. Background Art
[0002] Various applications based on IoT technologies, such as smart home, smart healthcare, and vehicle networking, provide great convenience for people's lives. However, how to efficiently store and securely manage large-scale IoT data is a major challenge.
[0003] The blockchain is one of the most promising distributed data structures, which does not require a trusted central controller and can provide secure tamper-proof data management.
[0004] In related technologies, traditional storage solutions based on centralized cloud data centers are usually adopted to manage a large amount of IoT data. However, such storage solutions have problems such as privacy leakage and malicious data tampering. The storage mechanism of traditional blockchain systems is that all nodes redundantly store all block data, which easily leads to data redundancy and is not convenient for storing the growing IoT data. Summary of the Invention
[0005] The present invention provides an IoT data processing method and apparatus based on a blockchain, which are used to solve the problems of privacy leakage and malicious data tampering in the existing technology for storing IoT data, and data redundancy will occur when using traditional blockchain systems to store IoT data, thereby improving the security of IoT data storage.
[0006] The present invention provides an IoT data processing method based on a blockchain, including: providing identity registration for entities attempting to join the blockchain based on a trusted institution in the blockchain; the entities include at least one of a new edge server and an IoT device; when the entity includes the new edge server and the new edge server is authenticated by the blockchain, performing target processing on target IoT data based on the new edge server, and performing validity verification on the processed IoT data in a decentralized storage environment based on the blockchain network; wherein, the target IoT data is IoT data authenticated by the trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server perform identity authentication for the new edge server according to an identity authentication mechanism based on knowledge proof and dynamic pseudonyms.
[0007] According to an IoT data processing method based on a blockchain provided by the present invention, the entity attempting to join the system further includes the InterPlanetary File System (IPFS); After the edge server processes the Internet of Things data authenticated by the trusted institution, the method further includes: Storing the processed Internet of Things data in the IPFS; Based on the blockchain network, in a decentralized storage environment, validating the data stored in the IPFS through the blockchain-IPFS mapping relationship.
[0008] According to a method for processing Internet of Things data based on blockchain provided by the present invention, the Internet of Things data is generated based on Internet of Things devices authenticated by the trusted institution, and the physical distance between the target Internet of Things and the edge server does not exceed a distance threshold.
[0009] According to a method for processing Internet of Things data based on blockchain provided by the present invention, the new edge server is authenticated by the blockchain, including: Based on the new edge server, calculating an entity public key and an entity private key according to a first random number, and calculating a pseudonym for the registration application with a second random number as the pseudonym key for the registration application; encrypting the registration application based on the new edge server according to the system public key to obtain an encrypted registration application; Based on the trusted institution, decrypting the encrypted registration application according to the system private key to obtain a decrypted registration application, verifying the first time interval and the user identity information before and after decryption to obtain verification information, and feeding back the verification information to the new edge server; Based on the new edge server, verifying the second time interval and the feedback verification information, and sending a confirmation information to the trusted institution if the verification is passed; Based on the trusted institution, saving the pseudonym and the entity public key of the registration application to the trusted entity list of the blockchain network according to the confirmation information.
[0010] According to a method for processing Internet of Things data based on blockchain provided by the present invention, the blockchain network is constructed through the following steps: Based on the edge server, sending a network joining request to the blockchain; the network joining request includes the pseudonym presented by the edge server credential, the zero-knowledge proof, the timestamp, and the network address; Based on the blockchain, verifying the nodes of the blockchain according to the network joining request and a third time interval, and recording the status of each node to construct the blockchain network.
[0011] According to a method for processing Internet of Things data based on blockchain provided by the present invention, the Internet of Things data is encrypted through the following steps: The IoT data is quickly encrypted using a stream key encryption technology combined with time attributes to obtain the encrypted IoT data.
[0012] The present invention also provides an IoT data processing device based on a blockchain, including: An identity authentication module, configured to provide identity registration for entities attempting to join the blockchain based on trusted institutions in the blockchain; the entities include new edge servers and IoT devices; A storage and verification module, configured to, when the entity includes the new edge server and the new edge server passes the blockchain authentication, perform target processing on target IoT data based on the new edge server, and perform validity verification on the processed IoT data in a decentralized storage environment based on the blockchain network; wherein, the target IoT data is IoT data authenticated by the trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server perform identity authentication for the new edge server according to an identity authentication mechanism of knowledge proof and dynamic pseudonyms.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, it implements the blockchain-based IoT data processing method as described in any one of the above.
[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the blockchain-based IoT data processing method as described in any one of the above.
[0015] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the blockchain-based IoT data processing method as described in any one of the above.
[0016] The blockchain-based IoT data processing method and device provided by the present invention provide identity authentication for entities attempting to join the system through trusted institutions. When the entity passes the authentication of the trusted institution, target processing is performed on target IoT data based on the edge server, and validity verification is performed on the processed IoT data in a decentralized storage environment based on the blockchain network. Zero-knowledge proof ensures that nodes can prove the legitimacy of their identities without exposing any sensitive information, and strong privacy protection is provided through dynamically generated pseudonyms, improving the security of IoT data storage. Description of the Drawings
[0017] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0018] Figure 1 It is one of the schematic flowcharts of the Internet of Things data processing method based on blockchain provided by the present invention.
[0019] Figure 2 It is the second of the schematic flowcharts of the Internet of Things data processing method based on blockchain provided by the present invention.
[0020] Figure 3 It is the schematic structural diagram of the Internet of Things data processing device based on blockchain provided by the present invention.
[0021] Figure 4 It is the schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0022] To make the objectives, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.
[0023] The following will describe Figures 1-3 the Internet of Things data processing method and device based on blockchain of the present invention.
[0024] Figure 1 It is one of the schematic flowcharts of the Internet of Things data processing method based on blockchain provided by the present invention. As Figure 1 shown, the method includes the following: Step 110: Provide identity registration for entities attempting to join the blockchain based on a trusted institution in the blockchain; the entities include at least one of a new edge server and an Internet of Things device.
[0025] In this step, the entity attempting to join the blockchain needs to submit an identity registration application to the trusted institution; among them, the application may include basic information such as the name, type, and function description of the entity, as well as the necessary materials for identity verification.
[0026] In this embodiment, a trusted institution can review the information of an applying entity to ensure its authenticity and legality. After the review is passed, the trusted institution generates a unique private key and a corresponding public key for the applying entity. Among them, the private key is used for signing transactions and verifying identities, and is distributed to the applying entity through a secure channel. The public key is used to publicly verify the identity of the entity on the blockchain.
[0027] Step 120: When the entity includes a new edge server and the new edge server is authenticated by the blockchain, perform target processing on the target Internet of Things data based on the new edge server, and perform validity verification on the processed Internet of Things data in a decentralized storage environment based on the blockchain network. Among them, the target Internet of Things data is the Internet of Things data authenticated by the trusted institution, and the target processing includes at least one of calculating the data hash value and encrypting the data. The trusted institution and each edge server in the blockchain perform identity authentication for the new edge server according to the identity authentication mechanism of proof of knowledge and dynamic pseudonym.
[0028] In this step, proof of knowledge is used to prove that someone knows a certain secret information (such as a password, private key, etc.) without disclosing the information itself. For example, in the secure identity authentication process when an entity such as an edge server joins the blockchain network, using zero-knowledge proof can ensure the legitimacy of the node's identity without exposing any sensitive information.
[0029] In this step, a dynamic pseudonym participates in system interactions by generating a temporary pseudonym for a user that is not directly related to the real identity, thus avoiding the leakage of the user's real identity.
[0030] Specifically, the authentication of the new edge server by the blockchain includes: Based on the new edge server, calculate the entity public key and the entity private key according to the first random number, and calculate the pseudonym for the registration application with the second random number as the pseudonym key for the registration application. Encrypt the registration application based on the system public key by the new edge server to obtain the encrypted registration application.
[0031] In this embodiment, both the first random number and the second random number belong to integers.
[0032] In this embodiment, during the system initialization process, given a security parameter , the trusted institution publishes the system public parameters ; among them, is a cyclic group of order a large prime number , is 's generator, is a secure hash function.
[0033] The trusted authority TCA selects a random number , sets the system private key as , and publishes the system public key .
[0034] During the user's identity registration process, entities in the system complete identity registration through the TCA to obtain a unique identity credential. Taking entity as an example, the corresponding identity registration process includes: Specifically, (1) Entity randomly selects , calculates the public key and the private key ; (2) selects a random number as the pseudonym key, and calculates the pseudonym for applying for registration; where is the user's identity attribute.
[0035] (3) uses the public key of the TCA to encrypt the message, generates the encrypted registration application , that is, the encrypted registration application, and sends it to the TCA.
[0036] Based on the trusted authority, the encrypted registration application is decrypted according to the system private key to obtain the decrypted registration application, and the user identity information corresponding to the first time interval and before and after decryption is verified to obtain the verification information, and the verification information is fed back to the new edge server.
[0037] Specifically, (1) After receiving the encrypted registration application, the TCA decrypts the encrypted registration application using the system private key to obtain .
[0038] (2) The TCA calculates whether holds, and whether the user's identity attribute decrypted is consistent with the original user identity information.
[0039] (3) After the verification passes, the TCA selects a random number , calculates and .
[0040] (4) The TCA locally saves , and sends the verification information to .
[0041] Verify the second time interval and the feedback verification information based on the new edge server. If the verification passes, send a confirmation message to the trusted institution.
[0042] Specifically, After receiving , verify and the equation to check if they hold. If the verification passes, send a confirmation message to the TCA and locally save .
[0043] Based on the confirmation information from the trusted institution, save the pseudonym and entity public key of the registration application to the trusted entity list of the blockchain network; due to limited computing resources of the IoT device, a signature verification mechanism is adopted to meet the high - efficiency operation requirements in a resource - constrained environment while ensuring basic security.
[0044] Specifically, the TCA calls the entity registration method to save to the trusted entity list of the blockchain to ensure the immutability and verifiability of the credentials.
[0045] In this step, the edge server has the characteristics of fast response and low latency, and can process IoT data in real - time or near real - time; by sending a registration application to the TCA and obtaining the certification of the trusted institution, the credibility of the edge server as a data - processing node can be guaranteed.
[0046] In this step, the blockchain network stores the processed IoT data information in a decentralized storage environment, providing data immutability and high transparency, making the data verification process more reliable; the edge servers that make up the blockchain network send registration applications to the TCA and obtain the certification of the trusted institution, ensuring the credibility of the blockchain network as a data - verification node.
[0047] In this step, the target IoT data can be collected from various IoT devices (such as sensors, cameras, etc.).
[0048] In this step, since the hash value can be used to verify whether the data has been tampered with during transmission, the edge server calculates the hash value of the target IoT data to ensure the integrity and uniqueness of the data; data encryption is used to protect the confidentiality of the data and prevent unauthorized access.
[0049] In the embodiment, the processed IoT data is uploaded to the blockchain network for validity verification. The blockchain network uses its decentralized characteristics and consensus mechanism to verify the uploaded data to ensure the authenticity and integrity of the data.
[0050] The Internet of Things data processing method based on blockchain provided by the embodiments of the present invention provides identity registration for entities attempting to join the system through a trusted institution. When the entity is authenticated by the trusted institution, the target Internet of Things data is subjected to target processing based on an edge server, and the validity of the processed Internet of Things data is verified in a decentralized storage environment based on the blockchain network. Zero-knowledge proof ensures that nodes can prove the legitimacy of their identities without exposing any sensitive information, and strong privacy protection is provided through dynamically generated pseudonyms, improving the security of Internet of Things data storage.
[0051] In some embodiments, the entity attempting to join the system further includes the InterPlanetary File System (IPFS); after the target processing of the Internet of Things data authenticated by the trusted institution based on the edge server, the method further includes: storing the processed Internet of Things data in IPFS; verifying the validity of the data stored in IPFS through the blockchain-IPFS mapping relationship in a decentralized storage environment based on the blockchain network.
[0052] Figure 2 is the second flow schematic diagram of the Internet of Things data processing method based on blockchain provided by the present invention. In Figure 2 the illustrated embodiment, the entities attempting to join the system include: (1) A trusted institution, which is used to provide identity registration for any entity attempting to join the system.
[0053] Specifically, in the key management phase, two types of entities, namely Internet of Things devices and edge servers, send registration applications to the trusted institution to obtain authentication by the trusted institution, and store information such as the pseudonyms and public keys of the authenticated entities in the trusted entity list of the blockchain to ensure the immutability and verifiability of the credentials.
[0054] (2) An edge server, which constructs a blockchain network through the entity authentication information sent by the trusted institution (corresponding to 3 blockchain network construction); the edge server is used to perform target processing on the Internet of Things data (corresponding to 4 encrypted data) submitted by the target Internet of Things device after being authenticated by the trusted institution to obtain the processed Internet of Things data; the physical distance between the target Internet of Things and the edge server does not exceed a distance threshold, and the target processing includes at least one of calculating the data hash value and encrypting the data.
[0055] (3) An Internet of Things device, which is used to send the Internet of Things data to the edge server for analysis and processing after being authenticated by the trusted institution; In this embodiment, the Internet of Things data is generated based on the Internet of Things device authenticated by the trusted institution, and the physical distance between the target Internet of Things and the edge server does not exceed a distance threshold.
[0056] In this embodiment, the Internet of Things (IoT) devices generate data in real-time or periodically, which reflects the state and changes of the IoT system. The IoT devices are authenticated by a trusted institution to ensure the credibility and accuracy of the generated data.
[0057] In this embodiment, the physical distance between the target IoT device and the edge server does not exceed a set distance threshold to ensure the efficiency and reliability of data transmission; where the distance threshold can be set according to user requirements.
[0058] (4) InterPlanetary File System (IPFS), which is used to store the processed IoT data.
[0059] Specifically, the edge server can interact with IPFS for ciphertext and ciphertext addresses (corresponding to 5.1 Upload Ciphertext and 5.2 Ciphertext Address). The blockchain can be determined by multiple edge servers located at different positions. Each edge server can send the received information to the blockchain network for storage (corresponding to 5.3 Information Storage), or the edge server can send an information query request to the blockchain network. When the blockchain network receives the ciphertext sent by IPFS (corresponding to 7.1 Ciphertext), it responds and feedbacks the information to be queried (corresponding to 6 Information Query); the edge server can also receive the information query information of the IoT device, and the edge server responds and feedbacks the encrypted data (corresponding to 7.2 Encrypted Data) (5) Blockchain, which is used to provide a decentralized storage environment after being authenticated by a trusted institution, and to verify the validity of the data stored in IPFS through the blockchain-IPFS mapping relationship in the decentralized storage environment.
[0060] In this embodiment, IPFS is a decentralized file storage system that provides a distributed content-addressable file system, enabling files to be stored and retrieved efficiently and securely on the network.
[0061] In this embodiment, the processed IoT data is uploaded to IPFS for storage. IPFS generates a unique hash value for each stored file, and this hash value can be used as the unique identifier of the file; the blockchain network records the hash values of each file stored in IPFS and conducts consensus verification with other nodes to ensure the authenticity and integrity of the data. The Internet of Things data processing method provided by the embodiment of the present invention stores the processed Internet of Things data in IPFS, and based on the blockchain network, validates the data stored in IPFS through the blockchain-IPFS mapping relationship in a decentralized storage environment, reducing the risk of data loss, improving the availability and accessibility of data, and using the content addressing mechanism through IPFS, enabling data to be efficiently retrieved through its hash value, improving the speed and accuracy of data retrieval.
[0062] In some embodiments, the blockchain network is constructed through the following steps: (1) Sending a network joining request from the edge server to the blockchain; the network joining request includes the pseudonym presented by the edge server credential, zero-knowledge proof, timestamp, and network address.
[0063] In this embodiment, the edge server dynamically requests to join the network through the following steps: Select a random number , calculate the pseudonym presented by the credential Select a random number as a temporary secret, calculate the commitment , , generate a challenge , and calculate the response and . Finally, generate a zero-knowledge proof .
[0064] Send a network joining request to the blockchain, as shown below: ; wherein, is 's network address.
[0065] The blockchain after receiving , determines whether holds, then calls the entity query method, and queries through .
[0066] The blockchain verifies through the following steps: ① The blockchain node verifies whether the equation holds; if it holds, it means that is correct, owns the public key The corresponding private key ; ②Verify the equation to check if it holds; if it does, it indicates that is correct, and the same private key was used to generate this pseudonym; If the blockchain verification passes, the blockchain believes that owns the private key , and it was generated using the same private key, then is a registered legitimate node.
[0067] (2) Based on the blockchain, verify the nodes of the blockchain according to the network joining request and the third time interval, and record the status of each node to construct a blockchain network.
[0068] In this embodiment, recording the status of blockchain nodes is achieved through the following steps: After the blockchain successfully verifies the identity, the system updates the status of this node to the "authenticated" status.
[0069] Specifically, the blockchain creates a status record of this node through the create entity method, including the network address, current status, authentication time, and other information of; then, the blockchain packs the information of joining into a block and broadcasts this block proposal to all verification nodes in the network; the verification nodes verify and vote on the block proposal through the consensus mechanism; after reaching a consensus, the verification nodes broadcast the result to the entire network, and all nodes of the blockchain will update the status of node A stored locally according to the consensus result, marking it as "authenticated "; if wants to exit the network, the blockchain can execute the delete entity method to change the status information of this node to "deactivated ".
[0070] The method for processing Internet of Things data based on blockchain provided by the embodiment of the present invention sends a network joining request to the blockchain through the edge server, verifies the nodes of the blockchain according to the network joining request and the third time interval, and records the status of each node to construct a blockchain network, reducing the storage overhead of the blockchain and realizing the immutability of data.
[0071] In some embodiments, the Internet of Things data is encrypted through the following steps: Use the stream key encryption technology combined with time attributes to quickly encrypt the Internet of Things data to obtain the encrypted Internet of Things data.
[0072] In this embodiment, sensitive data typically includes personal privacy information such as biometric data and health records; non-sensitive data includes information that does not pose a significant risk when leaked, such as environmental indicators or device status updates.
[0073] Specifically, the Internet of Things device After collecting data, generate the nth time period data set ; In this embodiment, the data types are divided into sensitive data (0) and non-sensitive data (1), represented by .
[0074] Set as the corresponding message identifier, and use an independent key to encrypt to form ; Finally, According to the time attribute, the key and the ciphertext are made to correspond one by one. By adopting an independent key stream, the security between ciphertexts can be effectively guaranteed. Even if the ciphertext of a certain period is cracked, it will not affect other ciphertexts. Assume It is necessary to send to .
[0075] In this embodiment, during the process of encrypting non-sensitive data, Generate the initial key and the initial vector during the initial registration, and initialize the counter to 0, which is used to ensure that the key stream generated each time is unique and increments in each encryption operation. Then, Generate the initial key seed for non-sensitive data, and send to for storage through a secure channel.
[0076] In this embodiment, during the process of encrypting sensitive data, Generate the initial key and the initial vector , initialize the counter to 0; then, Generate and locally save the initial key seed of the sensitive data in the same way.
[0077] In this embodiment, during the time period, if is non-sensitive data, Generate a key update factor and generate a new key using the update factor and a seed value ; then, use the Pseudorandom Number Generator (PRNG) algorithm to generate a stream key from this seed value ; if is sensitive data, generate a stream key in the same way .
[0078] In this embodiment, the two stream keys are collectively referred to as , expressed as: ; then the encrypted ciphertext is .
[0079] Transmit information , where is the signature of the device using its private key for .
[0080] After receives the request, first check whether holds.
[0081] According to query in the blockchain to obtain its public key and verify the message signature; if the verification passes, it means that has been registered in the system and obtained a valid credential.
[0082] Pass through in to judge whether contains sensitive information; if , execute to ensure the security of sensitive data; if , aggregate the ciphertext sent by the IoT device within using the additive homomorphic encryption algorithm to reduce the storage overhead.
[0083] Specifically, select , and calculate the th aggregated ciphertext generated by the following formula: 。
[0084] In some embodiments, all ciphertexts are stored through blockchain and IPFS to ensure the immutability of the stored data.
[0085] In this embodiment, due to the hardware resources of the system, the blockchain cannot store all ciphertexts in full; this embodiment adopts a data storage method combining on-chain and off-chain, stipulating that the blockchain stores the data hash value, while the ciphertext is stored in IPFS; the storage process of IoT data is performed by and the specific steps are as follows: (1) Upload the ciphertext to the IPFS client.
[0086] (2)IPFS returns the content identifier (CID) for locating the ciphertext.
[0087] (3) Calculate the hash value of the ciphertext 。
[0088] Submit to the blockchain and call the data storage method to store the data.
[0089] Specifically, in the data storage method, the key-value pair is defined to save the data submitted by ; One record in includes the data type ( ), the collection time ( ), the ciphertext hash value ( ), and the content identifier (
[0090] In the blockchain, first calculate the hash value based on the information joining the blockchain network this time and the data type to be stored to construct the retrieval key of the ciphertext set.
[0091] The blockchain verifies whether there is a submission record of ; if not, initialize the dedicated storage space of ; finally, is stored in the array.
[0092]
[0093] In some embodiments, the data decryption process includes authentication, ciphertext search, data preprocessing, and data decryption.
[0093] In this embodiment, when the Internet of Things device wants to obtain the data sent, it sends a data decryption request to : ; Among them, is the signature of the device using its private key for .
[0094] After receives the request, it verifies the identity of and preprocesses the data, and finally decrypts and verifies the data.
[0095] The above identity verification is achieved through the following steps: Check whether holds. Then, According to query its public key in the blockchain and verify the message signature, indicating that has been registered in the system and obtained a valid certificate.
[0096] In this embodiment, the above ciphertext search is achieved through the following steps: Call the method of querying data and retrieve the specific ciphertext based on ; the blockchain calculates the ciphertext set retrieval key , and filters the eligible ciphertexts according to the time limit of to obtain ; then, According to obtain the ciphertext from IPFS.
[0097] The above data preprocessing is achieved through the following steps: If , it means that is a sensitive ciphertext; Use to decrypt to obtain . Then, Send to .
[0098] If , it means that is a non-sensitive ciphertext; The aggregated ciphertext can be decrypted to obtain in Data to be sent.
[0099] Specifically, first, According to and calculate the encryption keys for all Internet of Things devices; taking as an example, calculate the key update factor , the new key and the seed value respectively through the following formulas: ; The new key ; .
[0100] Then, use the PRNG algorithm to generate a stream key through this seed value; after calculating all the keys, calculate the sum of the keys and the aggregated data , and locate the data position through to obtain ; finally, calculate , and send to .
[0101] The above data decryption is achieved through the following steps: After receiving the message, first check whether holds; then, calculate and verify whether the data has been tampered with through the following formula: ; If the equation holds, it means that is trustworthy data, thus completing the decryption.
[0102] The Internet of Things data processing method provided by the embodiments of the present invention encrypts Internet of Things data quickly through the stream key encryption technology generated by combining time attributes to obtain encrypted Internet of Things data. For sensitive data, public key encryption is used to further enhance privacy protection; for non-sensitive data, homomorphic encryption is used for aggregation to reduce storage and transmission overhead, thereby optimizing resource usage efficiency while ensuring data security; in addition, during the data storage and access process, the cooperation of blockchain and IPFS ensures the integrity and security of the data.
[0103] The following describes the Internet of Things data processing device based on blockchain provided by the present invention. The Internet of Things data processing device based on blockchain described below can be correspondingly referred to the Internet of Things data processing method based on blockchain described above.
[0104] Figure 3 is a schematic structural diagram of the Internet of Things data processing device based on blockchain provided by the present invention. As Figure 3 shown, the Internet of Things data processing device based on blockchain includes: an identity authentication module 310 and a storage and verification module 320.
[0105] The identity registration module 310 is used to provide identity registration for entities attempting to join the blockchain based on a trusted institution in the blockchain; the entities include at least one of a new edge server and an Internet of Things device; The storage and verification module 320 is used to, when the entity includes a new edge server and the new edge server passes blockchain authentication, perform target processing on target Internet of Things data based on the new edge server, and perform validity verification on the processed Internet of Things data in a decentralized storage environment based on the blockchain network; wherein, the target Internet of Things data is Internet of Things data authenticated by a trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server perform identity authentication for the new edge server according to the identity authentication mechanism of zero-knowledge proof and dynamic pseudonyms.
[0106] The Internet of Things data processing device based on blockchain provided by the embodiments of the present invention provides identity registration for edge servers attempting to join the considered network through a trusted institution. When the edge server passes the authentication of the trusted institution, target processing is performed on target Internet of Things data based on the edge server, and validity verification is performed on the processed Internet of Things data in a decentralized storage environment based on the blockchain network. It ensures that nodes can prove the legitimacy of their identities without exposing any sensitive information through zero-knowledge proof, and provides strong privacy protection through dynamically generated pseudonyms, improving the security of Internet of Things data storage.
[0107] Figure 4 is a schematic structural diagram of the electronic device provided by the present invention. As Figure 4As shown in the figure, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logical instructions in the memory 430 to execute the Internet of Things data processing method based on the blockchain. The method includes: providing identity registration for entities attempting to join the blockchain by a trusted institution in the blockchain; the entities include at least one of a new edge server and an Internet of Things device; when the entity includes a new edge server and the new edge server is authenticated by the blockchain, performing target processing on target Internet of Things data based on the new edge server, and performing validity verification on the processed Internet of Things data in a decentralized storage environment based on the blockchain network; where the target Internet of Things data is Internet of Things data authenticated by a trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server authenticate the identity of the new edge server according to the identity authentication mechanism of knowledge proof and dynamic pseudonyms.
[0108] In addition, when the logical instructions in the above-mentioned memory 430 are implemented in the form of a software functional unit and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0109] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the blockchain-based Internet of Things data processing method provided by the above-mentioned various methods. The method includes: providing identity registration for entities attempting to join the blockchain based on a trusted institution in the blockchain; the entities include at least one of a new edge server and an Internet of Things device; when the entity includes a new edge server and the new edge server passes blockchain authentication, performing target processing on target Internet of Things data based on the new edge server, and performing validity verification on the processed Internet of Things data in a decentralized storage environment based on the blockchain network; wherein, the target Internet of Things data is Internet of Things data authenticated by a trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server perform identity authentication for the new edge server according to the identity authentication mechanism of proof of knowledge and dynamic pseudonyms.
[0110] In yet another aspect, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the blockchain-based Internet of Things data processing method provided by the above-mentioned various methods. The method includes: providing identity registration for entities attempting to join the blockchain based on a trusted institution in the blockchain; the entities include at least one of a new edge server and an Internet of Things device; when the entity includes a new edge server and the new edge server passes blockchain authentication, performing target processing on target Internet of Things data based on the new edge server, and performing validity verification on the processed Internet of Things data in a decentralized storage environment based on the blockchain network; wherein, the target Internet of Things data is Internet of Things data authenticated by a trusted institution, and the target processing includes at least one of calculating a data hash value and encrypting data; the trusted institution in the blockchain and each edge server perform identity authentication for the new edge server according to the identity authentication mechanism of proof of knowledge and dynamic pseudonyms.
[0111] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing Internet of Things data based on blockchain, characterized in that: include: Providing identity registration for entities attempting to join the blockchain based on a trusted authority in the blockchain; the entity includes at least one of a new edge server and an IoT device; In the case where the entity includes the new edge server and the new edge server is authenticated by the blockchain, target processing is performed on the target IoT data based on the new edge server, and validity of the processed IoT data is verified based on the blockchain network in a decentralized storage environment; wherein the target IoT data is IoT data authenticated by the trusted institution, and the target processing includes calculating at least one of a data hash value and encrypting data; the trusted institution and each edge server in the blockchain perform identity authentication for the new edge server based on a knowledge proof and dynamic pseudonym identity authentication mechanism.
2. The method for processing IoT data based on blockchain according to claim 1, characterized in that: The entity attempting to join the system also includes the Interplanetary File System IPFS; After the target processing is performed on the IoT data authenticated by the trusted institution based on the edge server, the method further includes: Storing the processed IoT data in the IPFS; Based on the blockchain network in a decentralized storage environment, the validity of the data stored in the IPFS is verified through the blockchain-IPFS mapping relationship.
3. The method for processing IoT data based on blockchain according to claim 1, characterized in that: The IoT data is generated based on an IoT device authenticated by the trusted institution, and a physical distance between the target IoT and the edge server does not exceed a distance threshold.
4. The method for processing Internet of Things data based on blockchain according to claim 1, characterized in that: The new edge server passes the blockchain authentication including: Based on the new edge server, the entity public key and the entity private key are calculated according to the first random number, and the pseudonym of the registration application is calculated using the second random number as the pseudonym key of the registration application; based on the new edge server, the registration application is encrypted according to the system public key to obtain an encrypted registration application; Decrypting the encrypted registration application based on the trusted institution according to the system private key to obtain the decrypted registration application, verifying the first time interval and the user identity information corresponding to before and after the decryption to obtain verification information, and feeding back the verification information to the new edge server; Verifying the second time interval and the feedback verification information based on the new edge server, and sending confirmation information to the trusted institution if the verification passes; Based on the trusted institution, the pseudonym and entity public key of the registration application are saved in the trusted entity list of the blockchain network according to the confirmation information.
5. The method for processing IoT data based on blockchain according to claim 1, characterized in that: The blockchain network is constructed through the following steps: Sending a network joining request to the blockchain based on the edge server; the network joining request includes a pseudonym, a zero-knowledge proof, a timestamp, and a network address presented by the edge server credential; Based on the blockchain, the nodes of the blockchain are verified according to the network joining request and a third time interval and the status of each node is recorded to build the blockchain network.
6. The method for processing Internet of Things data based on blockchain according to claim 1 or 2, characterized in that: The IoT data is encrypted through the following steps: The IoT data is quickly encrypted using a stream key encryption technology generated in combination with a time attribute to obtain encrypted IoT data.
7. A blockchain-based IoT data processing device, characterized in that: include: An identity authentication module, configured to provide identity registration for an entity attempting to join the blockchain based on a trusted institution in the blockchain; the entity comprising at least one of a new edge server and an IoT device; A storage and verification module is used to perform target processing on target IoT data based on the new edge server and verify the validity of the processed IoT data based on the blockchain network in a decentralized storage environment when the entity includes the new edge server and the new edge server is authenticated by the blockchain; wherein the target IoT data is IoT data authenticated by the trusted institution, and the target processing includes calculating at least one of a data hash value and encrypting data; the trusted institution and each edge server in the blockchain perform identity authentication for the new edge server based on a knowledge proof and dynamic pseudonym identity authentication mechanism.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the blockchain-based Internet of Things data processing method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the blockchain-based Internet of Things data processing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the blockchain-based Internet of Things data processing method as described in any one of claims 1 to 6 is implemented.