Internet of Things data transmission method and device, equipment and storage medium

By performing IoT data transmission processing on the Rollup layer, using off-chain computing and blockchain transactions, the problem of insufficient security and real-time in IoT data transmission is solved, and efficient and secure data transmission and storage is achieved.

CN119728079APending Publication Date: 2025-03-28HANGZHOU DBAPPSECURITY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510018359.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing IoT data transmission architecture has shortcomings in terms of security and real-time performance. Inadequate processing capabilities of relay/side chains lead to data processing delays, and relay/side chains themselves may become targets of attacks, affecting the security of the system.

Method used

The IoT data transmission method using the Rollup layer is used to obtain encrypted data sent by sensor devices that meet the preset authentication mechanism, perform data processing and packaging, and use off-chain calculation verification data packets to generate verification proofs and target off-chain calculation results, and compress and optimize the results. Finally, the optimized data packets and verification proofs are submitted to the blockchain layer for transactions.

Benefits of technology

It improves the security and real-time nature of IoT data during transmission, and builds a safe and reliable IoT data transmission network through the immutability of blockchain and the high performance of Rollup technology, reducing centralized risks and achieving transparent data management through smart contracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728079A_ABST
    Figure CN119728079A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things data transmission method, device and equipment and a storage medium, relates to the field of data security, is applied to a Rollup layer, and comprises the following steps: acquiring encrypted sensor data sent by sensor equipment meeting a preset authentication mechanism in the Internet of Things; processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a to-be-verified data packet; verifying the to-be-verified data packet through under-chain calculation to obtain a corresponding verification proof and a target under-chain calculation result, and performing data compression and optimization on the target under-chain calculation result to obtain an optimized data packet; and submitting the optimized data packet and the verification proof to a block chain layer, so that the block chain layer completes the transaction of the optimized data packet through an intelligent contract layer based on the verification proof, and stores the optimized data packet in the block chain layer. According to the invention, the security and real-time performance of the Internet of Things data in the transmission process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security, and in particular to an Internet of Things data transmission method, device, equipment and storage medium. Background Art

[0002] With the rapid development of IoT technology, various smart devices are becoming increasingly popular in daily life and industrial applications, generating a large amount of data. These data are not only used for real-time monitoring and analysis, but also involve user privacy and sensitive information. At the same time, the traditional IoT data transmission architecture usually relies on centralized servers and data storage methods, which also leads to many security risks. At present, when using blockchain to transmit data obtained by sensor devices in the IoT, the introduction of relays / side chains improves the credibility of IoT data before writing into the blockchain network and enhances the security of the system. However, the insufficient processing capacity of relays / side chains may cause data processing delays, affecting the real-time performance of the entire system. In addition, relays / side chains themselves may become targets of attack. If they are breached, the security of the entire system will be affected.

[0003] To sum up, how to improve the security and real-time performance of IoT data during transmission is an urgent problem to be solved. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide an IoT data transmission method, device, equipment and storage medium, which can improve the security and real-time performance of IoT data during transmission. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses an IoT data transmission method, which is applied to a Rollup layer and includes:

[0006] Obtain encrypted sensor data sent by sensor devices in the Internet of Things that meet the preset authentication mechanism;

[0007] Processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a data packet to be verified;

[0008] Verify the data packet to be verified through off-chain calculation to obtain the corresponding verification certificate and the target off-chain calculation result, and perform data compression and optimization on the target off-chain calculation result to obtain an optimized data packet;

[0009] Submit the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

[0010] Optionally, the Internet of Things data transmission method further includes:

[0011] Performing identity authentication and device authentication on the sensor device to determine whether the sensor device satisfies the preset authentication mechanism; the preset authentication mechanism includes device identity authentication based on digital signature or blockchain;

[0012] If the sensor device meets the preset authentication mechanism, the sensor device is allowed to access the blockchain network.

[0013] Optionally, the processing the encrypted sensor data to obtain target data includes:

[0014] De-duplication and noise reduction are performed on the encrypted sensor data to obtain cleaned data, and the cleaned data is converted into a target format to obtain converted data;

[0015] The converted data is compressed to obtain target data.

[0016] Optionally, packaging the target data to obtain a data packet to be verified includes:

[0017] The target data are sorted based on the priority and timestamp of the target data to obtain an optimized packing sequence, and the target data are packaged based on the optimized packing sequence to obtain a data packet to be verified.

[0018] Optionally, verifying the to-be-verified data packet through off-chain calculation to obtain a corresponding verification certificate and a target off-chain calculation result includes:

[0019] An optimistic proof and the target off-chain calculation result are generated for the data packet to be verified through off-chain calculation, and a deposit is submitted for the target off-chain calculation result; the optimistic proof is a proof assuming that the target off-chain calculation result is the correct off-chain calculation result, and the deposit is used as a trust guarantee for the off-chain calculation.

[0020] Optionally, submitting the optimized data packet and the verification certificate to the blockchain layer so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate includes:

[0021] Submitting the optimized data packet, the verification proof, and the deposit information corresponding to the deposit to the blockchain layer, and starting a challenge period so that each node of the blockchain layer challenges the target off-chain calculation result based on the optimistic proof to obtain a challenge result;

[0022] If the challenge result indicates that the target off-chain calculation result is a correct off-chain calculation result, then confirming the transaction of the optimized data packet, and updating the transaction status of the optimized data packet through the smart contract layer;

[0023] If the challenge result indicates that the target off-chain calculation result is not a correct off-chain calculation result, the deposit is deducted based on the deposit information and the transaction is terminated.

[0024] Optionally, after saving the optimized data packet in the blockchain layer, the step further includes:

[0025] The visitor identity verification is performed on the visitor through the smart contract layer, so that the visitor can access the optimized data package stored in the blockchain layer after passing the visitor identity verification.

[0026] In a second aspect, the present application discloses an IoT data transmission device, which is applied to the Rollup layer and includes:

[0027] A data receiving module is used to obtain encrypted sensor data sent by sensor devices in the Internet of Things that meet a preset authentication mechanism;

[0028] A data packaging module, used for processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a data packet to be verified;

[0029] A data optimization module is used to verify the data packet to be verified through off-chain calculation to obtain a corresponding verification certificate and a target off-chain calculation result, and to perform data compression and optimization on the target off-chain calculation result to obtain an optimized data packet;

[0030] The data storage module is used to submit the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

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

[0032] Memory, used to store computer programs;

[0033] The processor is used to execute the computer program to implement the aforementioned Internet of Things data transmission method.

[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned Internet of Things data transmission method when executed by a processor.

[0035] In this application, when transmitting IoT data, the Rollup layer obtains the encrypted sensor data sent by the sensor device in the IoT that meets the preset authentication mechanism; the encrypted sensor data is processed to obtain the target data, and the target data is packaged to obtain the data packet to be verified; the data packet to be verified is verified through off-chain calculation to obtain the corresponding verification certificate and the target off-chain calculation result, and the target off-chain calculation result is compressed and optimized to obtain the optimized data packet; the optimized data packet and the verification certificate are submitted to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and the optimized data packet is saved in the blockchain layer. It can be seen that this application combines the immutability of the blockchain and the high performance of the Rollup technology to build a safe and reliable IoT data transmission network. The distributed nature of the blockchain effectively reduces the risks brought by centralization, and at the same time realizes transparent data management through smart contracts, while the Rollup technology greatly improves the efficiency of data transmission and storage by packaging multiple transactions. At the same time, the data collected by the sensor devices will be encrypted before being sent to ensure privacy and security during transmission and prevent unauthorized access or theft. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] 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.

[0037] Figure 1 This is a flow chart of an Internet of Things data transmission method disclosed in this application;

[0038] Figure 2 A schematic diagram of the framework of an environmental monitoring system disclosed in this application;

[0039] Figure 3 A schematic diagram of an Internet of Things data processing flow disclosed in this application;

[0040] Figure 4 A schematic diagram of a data processing flow of a Rollup layer disclosed in this application;

[0041] Figure 5 This is a schematic diagram of the structure of an Internet of Things data transmission device disclosed in this application;

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

[0043] 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.

[0044] At present, when using blockchain to transmit data obtained by sensor devices in the Internet of Things, the credibility of the Internet of Things data before writing into the blockchain network is improved by introducing a relay / side chain, which enhances the security of the system. However, the processing capacity of the relay / side chain is insufficient, which may cause data processing delays and affect the real-time performance of the entire system. In addition, the relay / side chain itself may become an attack target. If it is breached, it will affect the security of the entire system. In order to solve the above technical problems, the present application discloses an Internet of Things data transmission method, which can improve the security and real-time performance of Internet of Things data during transmission.

[0045] See also Figure 1 As shown, an embodiment of the present invention discloses an Internet of Things data transmission method, which is applied to the Rollup layer and includes:

[0046] Step S11: Obtain encrypted sensor data sent by a sensor device that meets a preset authentication mechanism in the Internet of Things.

[0047] In this embodiment, Figure 2 As shown, a secure and efficient IoT data transmission network can be built based on the smart contract layer, sensor devices, Rollup layer and blockchain network. The smart contract layer includes transaction contracts, verification contracts, registration contracts, authentication contracts, etc., which are deployed on the blockchain to manage Rollup transactions, verify proofs, and implement access control and other functions. As the core of the system, the Rollup layer is responsible for packaging a large amount of monitored environmental data into Rollup transactions, and performing calculations and verifications off-chain. Based on the high-performance consensus mechanism of the blockchain layer, the blockchain layer can be used to store proofs of Rollup transactions and provide a tamper-proof distributed ledger. The device layer consists of one or more sensor devices for collecting environmental data in the physical world, such as temperature, humidity, location information, video streams, machine status, etc. Each sensor device is equipped with a data acquisition module for monitoring specific physical parameters or obtaining environmental information. The collected data can be acquired at a fixed time or triggered by specific events, such as environmental changes or abnormal conditions. As Figure 3As shown in the figure, the device layer encrypts the collected data through data encryption technology to send the encrypted data to the Rollup layer, ensuring privacy and security during transmission and preventing unauthorized access or theft. By combining with the Rollup layer, the sensor device layer can effectively transmit a large amount of data to the off-chain for processing, thereby greatly improving the data processing efficiency and security of the entire system. Sensor devices can communicate with the network in a variety of ways, such as Wi-Fi (Wireless Fidelity), Bluetooth, Zigbee (a low-speed, short-distance transmission wireless network protocol), LoRa (Long Range Radio, a low-power LAN wireless standard), 4G / 5G and other wireless technologies, or wired connections, to ensure that data can be transmitted to the Rollup layer stably and quickly, and to ensure low latency and high throughput.

[0048] In a specific implementation, such as in smart agriculture, soil moisture sensors, greenhouse climate monitors and other sensor devices can be used together with irrigation systems and drones to join the Internet of Things to collect a large amount of data in real time, and small computing devices can be deployed in the farm as edge computing nodes to achieve preliminary processing of the collected data. Each device in the device layer has a unique device ID (Identity Document). Specifically, when designing the data structure of the smart contract layer, it is necessary to design the sensor data structure and the Rollup transaction structure. By designing the sensor data structure, the format and fields of the sensor data, such as timestamp, sensor ID, data value, etc., can be defined; by designing the Rollup transaction structure, the format of the Rollup transaction can be defined, including transaction type, data hash, signature, etc. The smart contract layer can realize data verification, access control, and agricultural operation automation, and can also make personalized adjustments according to user needs, such as designing a token-based incentive mechanism. In addition, in order to achieve the immediacy of message synchronization, the smart contract layer needs to implement monitoring of events on the blockchain, such as new block generation, successful transactions, etc., and trigger corresponding operations based on the monitored events, such as updating data and sending notifications. After the smart contract is written, it will be deployed to the blockchain network and the contract address will be generated. The smart contract example is as follows:

[0049] contract SmartFarming

[0050] / / ... other contract state variables

[0051] struct SensorData {

[0052] uint timestamp;

[0053] uint sensorId;

[0054] uint value;

[0055] }

[0056] event DataRecorded(uint indexed transactionId, SensorData data);

[0057] function recordData(bytes calldata encodedData) public {

[0058] / / Decode Rollup transaction data

[0059] SensorData memory data = abi.decode(encodedData,(SensorData));

[0060] / / Verify data

[0061] / / ...

[0062] / / Store data in blockchain

[0063] emit DataRecorded(block.number, data);

[0064] / / Automatically trigger the operation

[0065] if (data.value > threshold) {

[0066] / / Trigger irrigation

[0067] / / ...

[0068] }

[0069] }

[0070] }

[0071] In this embodiment, in order to ensure the legitimacy of the sensor device, before connecting the sensor device to the blockchain network, it is also necessary to perform identity authentication and device authentication on the sensor device to determine whether the sensor device meets the preset authentication mechanism; if the sensor device meets the preset authentication mechanism, the sensor device is allowed to access the blockchain network. Among them, the preset authentication mechanism includes device identity authentication based on digital signatures or blockchain. After connecting the sensor device to the blockchain network, the encrypted data sent by these authenticated sensor devices in the Internet of Things can be obtained.

[0072] Step S12: Process the encrypted sensor data to obtain target data, and package the target data to obtain a data packet to be verified.

[0073] like Figure 4 As shown, in this embodiment, the process of the Rollup layer processing the acquired encrypted sensor data to obtain the target data may specifically include: deduplication and noise reduction of the encrypted sensor data to obtain cleaned data, and converting the cleaned data into the target format to obtain converted data; data compression of the converted data to obtain the target data. After the target data is acquired, the target data can be packaged to obtain a data packet to be verified. At the same time, the specific process of packaging the target data to obtain the data packet to be verified may include: sorting the target data based on the priority and timestamp of the target data to obtain an optimized packaging order, and packaging the target data based on the optimized packaging order to obtain a data packet to be verified. In other words, the Rollup layer collects data from sensor devices, including sensor readings, device status and other information; then denoises, de-duplicates and standardizes the format of the collected encrypted data to ensure data quality; at the same time, a data compression algorithm is used to reduce the data size, thereby reducing the cost of off-chain processing and on-chain storage. When packaging the target data, the received sensor data transactions can be sorted according to the transaction priority and timestamp, and the data can be packaged in the optimized packaging order, which ensures that more important or time-sensitive sensor data can be processed first, while also improving the execution efficiency of the entire Rollup layer. At the same time, aggregating multiple off-chain calculation results into a batch transaction can reduce the number of on-chain transactions, and optimize the transaction order and structure in the batch through algorithms, thereby further improving processing efficiency. Specifically, the aggregated transactions can be encapsulated into a data packet to be verified with a specific data structure of Optimistic Rollup for subsequent submission to the chain.

[0074] In this embodiment, in the application scenario of smart agriculture, by combining the data collected by the sensor equipment with the crop growth model, real-time monitoring of the growth status of crops and prediction of yields can be achieved, thereby realizing precision agriculture. By analyzing historical data and real-time data, a machine learning model is established to build an early warning system for pests and diseases to warn of the occurrence of pests and diseases in advance and reduce losses. Based on soil sensor data, combined with blockchain technology, a soil quality database can be established to provide data support for precision fertilization. The edge node is responsible for the preliminary processing of agricultural data, such as denoising, filtering, and encryption. For key data (such as abnormal temperature), the edge node will send alarm information in real time. The processed agricultural data will be packaged into Rollup transactions. Each transaction contains agricultural data from multiple sensors, and is accompanied by a timestamp and device ID to ensure the traceability of the data.

[0075] Step S13: verify the data packet to be verified through off-chain calculation to obtain the corresponding verification certificate and the target off-chain calculation result, and compress and optimize the target off-chain calculation result to obtain an optimized data packet.

[0076] In this embodiment, the process of verifying the data packet to be verified by off-chain calculation to obtain the corresponding verification proof and the target off-chain calculation result can specifically include: generating an optimistic proof and a target off-chain calculation result for the data packet to be verified by off-chain calculation, and submitting a deposit for the target off-chain calculation result; the optimistic proof is a proof that the target off-chain calculation result is a correct off-chain calculation result, and the deposit is used as a trust guarantee for the off-chain calculation. After obtaining the target off-chain calculation result, the Rollup layer can perform data compression and optimization on the target off-chain calculation result to obtain an optimized data packet. In other words, the state of the sensor device is updated in the off-chain environment to simulate the result of transaction execution; the data processed off-chain is verified to ensure that it complies with the preset rules and logic; the new state root is calculated by simulating the execution of the transaction, but not directly executed on the blockchain. In the off-chain calculation process, sensitive data can be encrypted to protect the privacy of the data during the off-chain processing process. By using optimistic proofs to assume the correctness of the off-chain calculation results, complex calculations can be reduced. At the same time, in order to prevent malicious behavior, a deposit can be submitted as a trust guarantee for off-chain calculations, and the proof and deposit information can be submitted to the blockchain together to start the challenge period. During the challenge period, any node in the blockchain network can challenge the off-chain calculation results. If the challenge is successful, the malicious submitter will lose the deposit; if there is no valid challenge during the challenge period, the batch transaction is finally confirmed and the status update is accepted. Off-chain calculations and on-chain transactions enable the Rollup layer to not only efficiently process large-scale sensor data, but also reduce the consumption of on-chain resources while ensuring data integrity, security and privacy protection. This architecture makes sensor data transmission more efficient and solves the performance bottlenecks and security issues in IoT sensor data transmission under the traditional blockchain system.

[0077] Step S14: submitting the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

[0078] In the present application, after the Rollup layer submits the optimized data packet and the verification certificate to the blockchain layer, it can choose to broadcast the optimized data packet in the network. The blockchain layer can verify the optimized data packet based on the pre-configured smart contract using the verification certificate obtained in the above steps to determine the authenticity and reliability of the optimized data packet, thereby completing the transaction of the optimized data packet and saving the optimized data packet in the blockchain layer. In a specific embodiment, the optimized data packet and the verification certificate are submitted to the blockchain layer so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate. Specifically, it may include: submitting the margin information corresponding to the optimized data packet, the verification certificate and the margin to the blockchain layer, and starting the challenge period so that each node of the blockchain layer challenges the target off-chain calculation result based on the optimistic proof to obtain the challenge result; if the challenge result indicates that the target off-chain calculation result is the correct off-chain calculation result, then confirm the transaction of the optimized data packet, and update the status of the transaction of the optimized data packet through the smart contract layer; if the challenge result indicates that the target off-chain calculation result is not the correct off-chain calculation result, then deduct the margin based on the margin information and terminate the transaction. That is, the blockchain layer is responsible for storing and verifying sensor data processed by Rollup, while providing an immutable distributed ledger.

[0079] It is understandable that after the optimized data package is saved in the blockchain layer, the visitor identity verification can also be performed on the visitor through the smart contract layer, so that the visitor can access the optimized data package saved in the blockchain layer after passing the visitor identity verification. In other words, in addition to creating, updating and querying Rollup transactions and verifying the validity of the proof submitted by the Rollup operator, the smart contract layer can also control access to data according to the user's permissions, that is, to achieve access control. For example, farmers access data stored on the blockchain through dedicated applications, and users use private keys for identity verification, thereby ensuring that only authorized users can access sensitive data. In addition, the smart contract layer can also trigger corresponding events according to preset conditions, such as alarms, data analysis, etc. For example, when the growth of crops reaches a certain stage, the smart contract can issue an event to notify farmers to pick them.

[0080] In this embodiment, in the application scenario of smart agriculture, the smart contract layer is responsible for defining and executing various business logics in agricultural production. According to data such as soil moisture and weather forecast, the smart contract is triggered to automatically adjust the irrigation system to achieve water-saving irrigation; based on farmland maps, crop growth conditions, weather forecasts and other data, the smart contract can automatically plan the flight path of the drone to improve work efficiency. At the same time, it can also record the data of the entire process of planting, processing, and transportation of agricultural products to achieve food safety traceability and enhance consumer trust; register agricultural technologies, varieties, etc. on the blockchain to protect rights and interests; record carbon emissions in the agricultural production process, participate in the carbon trading market, and achieve carbon neutrality. In addition, the loss data can be automatically verified through smart contracts to achieve rapid claims for agricultural insurance.

[0081] It can be seen that this application combines the immutability of blockchain and the high performance of Rollup technology to build a secure and reliable IoT data transmission network. The distributed nature of blockchain effectively reduces the risks brought by centralization, while realizing transparent data management through smart contracts, and Rollup technology greatly improves the efficiency of data transmission and storage by packaging multiple transactions. At the same time, the data collected by the sensor device will be encrypted before being sent to ensure privacy and security during the transmission process and prevent unauthorized access or theft.

[0082] See also Figure 5 As shown, the present application discloses an IoT data transmission device, which is applied to the Rollup layer and includes:

[0083] The data receiving module 11 is used to obtain the encrypted sensor data sent by the sensor device that meets the preset authentication mechanism in the Internet of Things;

[0084] A data packaging module 12, used for processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a data packet to be verified;

[0085] The data optimization module 13 is used to verify the data packet to be verified through off-chain calculation to obtain the corresponding verification certificate and the target off-chain calculation result, and to compress and optimize the target off-chain calculation result to obtain an optimized data packet;

[0086] The data storage module 14 is used to submit the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

[0087] It can be seen that this application combines the immutability of blockchain and the high performance of Rollup technology to build a secure and reliable IoT data transmission network. The distributed nature of blockchain effectively reduces the risks brought by centralization, while realizing transparent data management through smart contracts, and Rollup technology greatly improves the efficiency of data transmission and storage by packaging multiple transactions. At the same time, the data collected by the sensor device will be encrypted before being sent to ensure privacy and security during the transmission process and prevent unauthorized access or theft.

[0088] In a specific embodiment, the device may further include:

[0089] A device authentication module, used to perform identity authentication and device authentication on the sensor device to determine whether the sensor device satisfies the preset authentication mechanism; the preset authentication mechanism includes device identity authentication based on digital signature or blockchain;

[0090] A device access module is used to allow the sensor device to access the blockchain network if the sensor device meets the preset authentication mechanism.

[0091] In a specific implementation, the data packaging module 12 may specifically include:

[0092] a data conversion unit, configured to perform deduplication and noise reduction on the encrypted sensor data to obtain cleaned data, and convert the cleaned data into a target format to obtain converted data;

[0093] A data compression unit is used to compress the converted data to obtain target data.

[0094] In a specific implementation, the data packaging module 12 may specifically include:

[0095] A data packaging unit is used to sort the target data based on the priority and time stamp of the target data to obtain an optimized packaging sequence, and to package the target data based on the optimized packaging sequence to obtain a data packet to be verified.

[0096] In a specific implementation, the data optimization module 13 may specifically include:

[0097] The security deposit submission unit is used to generate an optimistic proof and the target off-chain calculation result for the data packet to be verified through off-chain calculation, and submit a security deposit for the target off-chain calculation result; the optimistic proof is a proof assuming that the target off-chain calculation result is a correct off-chain calculation result, and the security deposit is used as a trust guarantee for the off-chain calculation.

[0098] In a specific implementation, the data storage module 14 may specifically include:

[0099] A challenge result acquisition unit, configured to submit the optimized data packet, the verification proof, and the deposit information corresponding to the deposit to the blockchain layer, and to start a challenge period so that each node of the blockchain layer challenges the target off-chain calculation result based on the optimistic proof to obtain a challenge result;

[0100] A transaction status updating unit, configured to confirm the transaction of the optimized data packet if the challenge result indicates that the target off-chain calculation result is a correct off-chain calculation result, and update the transaction status of the optimized data packet through the smart contract layer;

[0101] A transaction termination unit is used to deduct the deposit based on the deposit information and terminate the transaction if the challenge result indicates that the target off-chain calculation result is not a correct off-chain calculation result.

[0102] In a specific embodiment, the device may further include:

[0103] The visitor authentication module is used to perform visitor identity authentication on the visitor through the smart contract layer, so that the visitor can access the optimized data package saved in the blockchain layer after passing the visitor identity authentication.

[0104] Furthermore, the present application also discloses an electronic device. Figure 6 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.

[0105] Figure 6 A 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 IoT data transmission method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0106] 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.

[0107] 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.

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

[0109] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed method for transmitting data in the Internet of Things. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be described in detail here.

[0110] 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.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] 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 method for transmitting data in the Internet of Things, characterized in that: Applied to the Rollup layer, including: Obtain encrypted sensor data sent by sensor devices in the Internet of Things that meet the preset authentication mechanism; Processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a data packet to be verified; Verify the data packet to be verified through off-chain calculation to obtain the corresponding verification certificate and the target off-chain calculation result, and perform data compression and optimization on the target off-chain calculation result to obtain an optimized data packet; Submit the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

2. The Internet of Things data transmission method according to claim 1, characterized in that: Also includes: Performing identity authentication and device authentication on the sensor device to determine whether the sensor device satisfies the preset authentication mechanism; The preset authentication mechanism includes digital signature-based or blockchain-based device identity authentication; If the sensor device meets the preset authentication mechanism, the sensor device is allowed to access the blockchain network.

3. The Internet of Things data transmission method according to claim 1, characterized in that: The step of processing the encrypted sensor data to obtain target data includes: De-duplication and noise reduction are performed on the encrypted sensor data to obtain cleaned data, and the cleaned data is converted into a target format to obtain converted data; The converted data is compressed to obtain target data.

4. The Internet of Things data transmission method according to claim 1, characterized in that: The step of packaging the target data to obtain a data packet to be verified includes: The target data are sorted based on the priority and timestamp of the target data to obtain an optimized packing sequence, and the target data are packaged based on the optimized packing sequence to obtain a data packet to be verified.

5. The Internet of Things data transmission method according to claim 1, characterized in that: The verifying the data packet to be verified by off-chain calculation to obtain a corresponding verification certificate and a target off-chain calculation result includes: An optimistic proof and the target off-chain calculation result are generated for the data packet to be verified through off-chain calculation, and a deposit is submitted for the target off-chain calculation result; the optimistic proof is a proof assuming that the target off-chain calculation result is the correct off-chain calculation result, and the deposit is used as a trust guarantee for the off-chain calculation.

6. The Internet of Things data transmission method according to claim 5, characterized in that: Submitting the optimized data packet and the verification certificate to the blockchain layer so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, includes: Submitting the optimized data packet, the verification proof, and the deposit information corresponding to the deposit to the blockchain layer, and starting a challenge period so that each node of the blockchain layer challenges the target off-chain calculation result based on the optimistic proof to obtain a challenge result; If the challenge result indicates that the target off-chain calculation result is a correct off-chain calculation result, then confirming the transaction of the optimized data packet, and updating the transaction status of the optimized data packet through the smart contract layer; If the challenge result indicates that the target off-chain calculation result is not a correct off-chain calculation result, the deposit is deducted based on the deposit information and the transaction is terminated.

7. The Internet of Things data transmission method according to any one of claims 1 to 6, characterized in that: After the optimized data packet is stored in the blockchain layer, the method further includes: The visitor identity verification is performed on the visitor through the smart contract layer, so that the visitor can access the optimized data package stored in the blockchain layer after passing the visitor identity verification.

8. An Internet of Things data transmission device, characterized in that: Applied to the Rollup layer, including: A data receiving module is used to obtain encrypted sensor data sent by sensor devices in the Internet of Things that meet a preset authentication mechanism; A data packaging module, used for processing the encrypted sensor data to obtain target data, and packaging the target data to obtain a data packet to be verified; A data optimization module is used to verify the data packet to be verified through off-chain calculation to obtain a corresponding verification certificate and a target off-chain calculation result, and to perform data compression and optimization on the target off-chain calculation result to obtain an optimized data packet; The data storage module is used to submit the optimized data packet and the verification certificate to the blockchain layer, so that the blockchain layer completes the transaction of the optimized data packet through the smart contract layer based on the verification certificate, and saves the optimized data packet in the blockchain layer.

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 Internet of Things data transmission 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, wherein when the computer program is executed by a processor, the Internet of Things data transmission method according to any one of claims 1 to 7 is implemented.