Internet of Things data acquisition system and method based on blockchain

By combining the decentralized oracle network and edge computing framework, the data credibility problem in the connection between blockchain and the Internet of Things is solved, and the effect of quickly obtaining trusted data is achieved.

CN115714787BActive Publication Date: 2025-08-15NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211316729.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-08-15
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In the prior art, the centralized oracle method destroys the decentralization characteristics during the connection between blockchain and the Internet of Things, and cannot guarantee the credibility of data.

Method used

Decentralized oracle network nodes, adapters, IoT data analysis tools and edge computing microservice architecture are adopted, combined with Chainlink and EdgeX Foundry frameworks, to achieve interconnection between blockchain and the Internet of Things and rapid data acquisition.

Benefits of technology

It realizes diverse connections between blockchain and the Internet of Things, quickly obtains off-chain data, and ensures the credibility of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115714787B_ABST
    Figure CN115714787B_ABST
Patent Text Reader

Abstract

The present invention discloses a blockchain-based IoT data acquisition system and method, comprising a gateway, a blockchain network, and on-chain users. The gateway is deployed with a decentralized oracle network node, an adapter, an IoT data analysis tool, and an edge computing microservices architecture. A management contract is deployed on the blockchain network. On-chain users deploy consumer contracts containing predefined variables to the management contract address, initiate requests to the management contract, write the request information to the blockchain event log, and receive IoT data aggregated according to aggregation rules. The present invention organically combines a decentralized oracle with an edge computing framework, enabling interconnection and batch deployment between blockchain and IoT. While expanding the data acquisition capabilities of on-chain smart contracts, it can also diversely connect existing blockchains with IoT, rapidly acquire off-chain data, and ensure data credibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of the Internet of Things and blockchain, and in particular to a method and system for acquiring Internet of Things data based on blockchain. Background Art

[0002] In recent years, the Internet of Things (IoT), blockchain, big data, cloud computing, and other next-generation information technologies have rapidly developed, encompassing diverse industries such as healthcare, education, finance, and insurance. Ubiquitous applications are building smart cities, facilitating social development and daily life. Blockchain, due to its decentralized, tamper-resistant, and traceable nature, is widely used in the IoT. As the future value network, the data source of blockchain systems is crucial. Existing large-scale IoT infrastructure is developed, deployed, and maintained by various parties. Connections are divided into wired and wireless modes, encompassing a wide variety of devices and protocols. How to organically connect blockchain and the IoT is a pressing challenge.

[0003] Existing technologies often use a centralized oracle approach, collecting edge device data into a database, re-screening and redistributing the data before entering the blockchain network. However, in actual blockchain networks, this approach relies on a single institution or organization acting as a guarantor to complete the entire process, undermining the decentralized nature of blockchain networks. In practical applications, this approach cannot guarantee sufficient trust in the data among on-chain users. Summary of the Invention

[0004] In order to address the above deficiencies in the existing technology, the present invention provides a blockchain-based IoT data acquisition method and system, which realizes diversified connections between the existing blockchain and the IoT, quickly obtains off-chain data, and ensures data credibility.

[0005] The present invention adopts the following technical solutions.

[0006] In a first aspect, the present invention provides a blockchain-based method for acquiring IoT data, comprising: a gateway, a blockchain network, and on-chain users, wherein a decentralized oracle network node, an adapter, an IoT data analysis tool, and an edge computing microservice architecture are deployed on the gateway; and a management contract is deployed on the blockchain network;

[0007] On-chain users deploy consumer contracts containing predefined variables to the management contract address; call the request function in the consumer contract to initiate a request to the management contract, and write the request information to the blockchain event log; also used to obtain the status of predefined variables in the consumer contract to obtain result data;

[0008] Decentralized oracle network node, used to subscribe to blockchain event logs, parse and obtain request information, and send the request information to the adapter; it is also used to receive data returned by the adapter and call the management contract function to trigger the management contract callback;

[0009] The adapter is used to listen to the request information sent by the decentralized oracle network node, convert the request information format according to the format required by the IoT data analysis tool, and send the converted request information to the IoT data analysis tool; receive the return data and return it to the decentralized oracle network node;

[0010] Edge computing microservices architecture for subscribing to IoT data and publishing it to IoT data analysis tools;

[0011] IoT data analysis tool, used to aggregate IoT data according to aggregation rules and return it to the adapter;

[0012] The management contract is used to call the callback function to return data to the predefined variables in the consumer contract.

[0013] Furthermore, the system also includes a data provider, which is used to provide management contract addresses to on-chain users and to update configuration information of gateway devices.

[0014] Furthermore, the management contract is also used to authorize decentralized oracle network nodes.

[0015] Furthermore, the data structure followed by the request information includes: device information type, aggregation rule, whether to customize the aggregation rule and customized aggregation rule; wherein the device information type includes device name, device type or device sub-command; the customized rule includes aggregation function or window function.

[0016] Furthermore, if the request information adopts a custom aggregation rule but does not specify a custom aggregation rule, the adapter requests the IoT data analysis tool to specify a new aggregation rule.

[0017] Furthermore, the system also includes an Internet of Things device for periodically uploading collected Internet of Things data to the edge computing microservice architecture.

[0018] In a second aspect, the present invention provides a blockchain-based IoT data acquisition method, comprising: a user on the blockchain deploys a consumer contract containing predefined variables to a management contract address in the blockchain network; calling a request function in the consumer contract to initiate a request to the management contract, and writing the request information to the blockchain event log;

[0019] The gateway deploys decentralized oracle network nodes, adapters, IoT data analysis tools, and edge computing microservices. The decentralized oracle network nodes subscribe to blockchain event logs, parse and obtain request information, and send the request information to the adapter.

[0020] The adapter listens to the request information sent by the decentralized oracle network node, converts the request information format according to the format required by the IoT data analysis tool, and sends the converted request information to the IoT data analysis tool;

[0021] The edge computing microservice architecture subscribes to the data uploaded periodically by IoT devices and publishes it to the IoT data analysis tool. The IoT data analysis tool aggregates the data according to the aggregation rules and returns it to the adapter, which then returns it to the decentralized oracle network node.

[0022] The decentralized oracle network node calls the management contract function to trigger the management contract callback;

[0023] The management contract calls the callback function to return data to the predefined variables in the consumer contract;

[0024] On-chain users obtain the predefined variable status in the consumer contract and obtain the result data.

[0025] Furthermore, the management contract address is provided by a data provider, and the data provider is also used to update the configuration information of the gateway device.

[0026] Furthermore, the management contract is used to authorize the decentralized oracle network nodes.

[0027] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the blockchain-based IoT data acquisition method provided in any possible embodiment of the second aspect are implemented.

[0028] Beneficial effects

[0029] This invention organically combines Chainlink's decentralized oracle with the EdgeX Foundry edge computing framework, enabling interconnection and batch deployment between blockchain and the Internet of Things (IoT), providing a novel deployment method for blockchain-IoT data connectivity. This invention expands the data acquisition capabilities of on-chain smart contracts while enabling diverse connections between existing blockchains and the Internet of Things, rapidly acquiring off-chain data, and ensuring data credibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions implemented in the present invention, the following will introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 This is a diagram of the configuration framework of the blockchain-based Internet of Things gateway according to an embodiment of the present invention;

[0032] Figure 2 This is a workflow diagram of a blockchain-based IoT data acquisition method according to an embodiment of the present invention;

[0033] Figure 3 This is a diagram of the Chainlink node built-in task workflow in an embodiment of the present invention;

[0034] Figure 4 This is a diagram of the data structure received by the adapter in the gateway according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0036] In order to make the solution of the embodiment of the present invention easier to understand, the technical items involved in the solution are briefly introduced below.

[0037] Chainlink Decentralized Oracle Network:

[0038] Chainlink, an oracle network solution proposed by Steve Ellis and others to address smart contract connectivity issues, has become a leader in the blockchain oracle market due to its fully decentralized nature. Chainlink aims to reduce the trust required between smart contract parties and extend the tamper-proof nature of smart contracts to the entire data transmission process from APIs to smart contracts, providing external connectivity for smart contracts and enabling them to interact with off-chain resources.

[0039] EdgeX Foundry edge computing microservice architecture:

[0040] EdgeX Foundry is an industry-leading open source project initiated by the Linux Foundation. It aims to promote hardware interoperability in the IoT ecosystem. As an open source edge computing microservices framework, it provides a complete solution for IoT edge computing.

[0041] eKuiper IoT Data Analysis Tool:

[0042] eKuiper, short for LF Edge eKuiper, is lightweight, open-source IoT edge analytics and streaming processing software written in Go. It can run on a variety of resource-constrained edge devices. Drawing on the architecture of cloud-based streaming processing projects and incorporating the characteristics of edge streaming data processing, eKuiper implements edge streaming data processing by using a rules engine based on sources, business logic processing, and targets.

[0043] In order to further facilitate understanding of the solution of the embodiment of the present invention, the technical details designed in the solution are introduced below.

[0044] Example 1

[0045] Figure 1 The figure shows an IoT data acquisition system based on blockchain provided by an embodiment of the present invention, comprising: a gateway, a blockchain network, and on-chain users, wherein a decentralized oracle network node, an adapter, an IoT data analysis tool, and an edge computing microservice architecture are deployed on the gateway; a management contract is deployed on the blockchain network;

[0046] On-chain users deploy consumer contracts containing predefined variables to the management contract address; call the request function in the consumer contract to initiate a request to the management contract, and write the request information to the blockchain event log; also used to obtain the status of predefined variables in the consumer contract to obtain result data;

[0047] Decentralized oracle network node, used to subscribe to blockchain event logs, parse and obtain request information, and send the request information to the adapter; it is also used to receive data returned by the adapter and call the management contract function to trigger the management contract callback;

[0048] The adapter is used to listen to the request information sent by the decentralized oracle network node, convert the request information format according to the format required by the IoT data analysis tool, and then send it to the IoT data analysis tool; receive the return data and return it to the decentralized oracle network node;

[0049] Edge computing microservices architecture for subscribing to IoT data and publishing it to IoT data analysis tools;

[0050] IoT data analysis tool, used to aggregate IoT data according to aggregation rules and return it to the adapter;

[0051] The management contract is used to call the callback function to return data to the predefined variables in the consumer contract.

[0052] In this embodiment, the blockchain network, serving as both the initial requester and the final receiver, is a crucial component of data exchange and storage. It can be either a permissioned or permissionless blockchain. Permissioned blockchains require authorization to join and become nodes, and are categorized as consortium and private blockchains. Permissionless blockchains, on the other hand, do not require authorization to join and become nodes, and are therefore public blockchains. Generally speaking, permissioned blockchains sacrifice some decentralization for security compared to permissionless blockchains.

[0053] In the IoT oracle system of this embodiment, the gateway serves as the connection entity between local IoT devices (such as various IoT sensors) and the blockchain. Chainlink nodes, adapters, eKuiper, and EdgeXFoundry run on the gateway. The present invention developed an adapter to enable gateway-based device data publishing, subscription, and aggregation.

[0054] Optionally, the system includes an IoT device, which is responsible for collecting real-world data. The IoT device can be a temperature sensor, a flow sensor, etc. In theory, sensors using protocols supported by the south side of EdgeX Foundry, such as OPC-UA, MODBUS, BACNET, etc., can all be used as data collection devices for the IoT oracle system of this embodiment.

[0055] Optionally, the system also includes a data supplier: responsible for updating the configuration information of the gateway device and providing specific methods for data acquisition to users on the chain;

[0056] On-chain user: The initiator of the on-chain request, who uses the method provided by the data supplier to initiate data requests and puts forward new data requirements to the data supplier.

[0057] Example 2

[0058] Corresponding to the blockchain-based IoT data acquisition system provided in Example 1, this embodiment provides a blockchain-based IoT data acquisition method, including: a user on the chain deploys a consumer contract containing predefined variables to a management contract address in the blockchain network; calls a request function in the consumer contract to initiate a request to the management contract, and writes the request information to the blockchain event log;

[0059] The gateway deploys decentralized oracle network nodes, adapters, IoT data analysis tools, and edge computing microservices. The decentralized oracle network nodes subscribe to blockchain event logs, parse and obtain request information, and send the request information to the adapter.

[0060] The adapter listens to the request information sent by the decentralized oracle network node, converts the request information format according to the format required by the IoT data analysis tool, and sends the converted request information to the IoT data analysis tool;

[0061] The edge computing microservice architecture subscribes to the data uploaded periodically by IoT devices and publishes it to the IoT data analysis tool. The IoT data analysis tool aggregates the data according to the aggregation rules and returns it to the adapter, which then returns it to the decentralized oracle network node.

[0062] The decentralized oracle network node calls the management contract function to trigger the management contract callback;

[0063] The management contract calls the callback function to return data to the predefined variables in the consumer contract;

[0064] On-chain users obtain the predefined variable status in the consumer contract and obtain the result data.

[0065] Example 3

[0066] Figure 2 The figure shows a workflow diagram of a blockchain-based IoT data acquisition method provided by an embodiment of the present invention, which includes the following steps:

[0067] Step 1: The data provider provides on-chain users with specific methods for obtaining data;

[0068] In step 2, the user deploys a consumer contract containing predefined variables such as value to the management contract address, which is obtained using the data acquisition method provided by the data provider. The user calls the request function in the consumer contract and writes the request information to the blockchain event log.

[0069] In this embodiment, the blockchain uses the Ethereum testnet Goerli as the network. The consumer contract calls and overrides the request function within the client contract provided by the Chainlink library, initiates a request to the management contract, and writes the request information to the blockchain log. The consumer contract supports custom parameters, including device type, aggregation rules, whether to customize aggregation, and custom aggregation rules.

[0070] Step 3: The Chainlink node subscribes to the blockchain event log, parses it, and retrieves the requested information.

[0071] Step 4: Trigger the Chainlink node task, following Figure 3 The process carries the request information to the external data source; the adapter receives the request and parses the data packet, and updates the rules to eKuiper; eKuiper subscribes to the EdgeX built-in data bus;

[0072] The adapter's primary function is to receive external requests from tasks in the Chainlink node via the bridge, monitor task requests from the Chainlink node, and convert the request format to the RESTful API format exposed by eKuiper. If a specified rule exists, it will be used; if not, a request is made to eKuiper to create a new rule. The adapter can be written in any language and can run as a standalone service, accepting and responding to data in JSON format.

[0073] Step 5: The IoT device periodically uploads the collected data to EdgeX;

[0074] Step 6: eKuiper aggregates the data according to the rules and returns it to the adapter, which then returns it to the Chainlink node.

[0075] Step 7: Chainlink calls the management contract function to trigger the management contract callback;

[0076] Step 8: The management contract calls the callback function to return data to the preset variable value in the consumer contract;

[0077] Step 9: The user obtains the value variable status of the consumption contract to obtain the result data.

[0078] To further facilitate understanding of the solution of the embodiment of the present invention, the technical details and optimization points involved in the solution are further elaborated below:

[0079] Before the solution process is executed, the data supplier needs to provide a specific method for data acquisition. The specific parameters include:

[0080] Management contract address: The management contract address is a hexadecimal number starting with 0x generated when the management contract is deployed to the blockchain network;

[0081] Task Id: After launching the Chainlink node, its built-in Web UI provides the task flow, such as Figure 3 As shown. Task ID can be defined by the data provider or automatically generated;

[0082] Chainlink subscribes to and parses blockchain network event logs. It then requests data from an external provider (adapter) via the bridge according to the configured task flow. Once the adapter returns the data, it immediately parses it and decides whether to multiply (decimals are not supported by the blockchain network) and convert the data type based on the actual data needs. Finally, it calls the management contract's function to trigger a callback, passing the value to the consuming contract.

[0083] Data source: The data source includes the device name, device class name, and device subcommand, which comes from the built-in message bus in EdgeX. The subject of the data published by IoT devices is the device name / device class name / device subcommand, and "#" can be used as a wildcard.

[0084] Predefined aggregation rules: Predefined aggregation rules are divided into two parts: aggregation rule ID and aggregation rule body. The rule body is based on SQL syntax. When configuring each gateway device, the data provider can provide some basic rules for on-chain users to use. If these rules do not meet the needs of on-chain users, on-chain users can customize the rules. The rule ID is generally in the form of device name_aggregation function_device subcommand, and can also be customized by the data provider.

[0085] Aggregation function: Aggregation function is a built-in aggregation function library of the eKuiper tool. The default functions include sum function, count function, etc. Data providers can develop customized aggregation functions for on-chain users to use.

[0086] Window functions: Window functions are also a built-in aggregation function library of the eKuiper tool. The default ones include the rolling function TUMBLINGWINDOW and the jumping function HOPPINGWINDOW. Data providers can develop customized window functions for on-chain users to use.

[0087] The data structure of the request information parsed by the adapter is as follows Figure 4 As shown:

[0088] Data source: The data source includes the device name, device class name, and device subcommand, and specifies the data information to be aggregated;

[0089] Aggregation Rule Id: This rule Id is predefined by the data provider. Users can directly use the default rule configuration provided by the data provider by specifying the predefined rule Id.

[0090] Whether to customize aggregation rules: If customization is enabled, the rule Id parameter will be invalid and you will need to configure custom rules;

[0091] Customized aggregation rules: Customized rules include aggregation functions and window functions. The adapter creates new rules through parsing and sends them to eKuiper to implement user-defined aggregation solutions.

[0092] For the embodiments of the present invention, we can continue to develop on-chain applications and further develop data, such as on-chain device monitoring and on-chain device management, to realize the value of on-chain data;

[0093] Chainlink node configuration uses soft coding, so node tasks can be reused when deploying physical devices in batches without changing specific configuration information;

[0094] Bridge connections and custom adapters use a one-to-many binding method. Multiple bridge connections can be started on the gateway to provide different data sources for different requests.

[0095] The embodiments in this specification are described in a progressive manner. The method embodiments are described briefly because they are basically similar to the data transmission embodiments. For relevant details, please refer to the partial description of the data transmission embodiments and the final technical advantages. Persons of ordinary skill in the art can understand and implement the present invention without inventive effort.

[0096] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the methods described in the above embodiments correspond to the specific working processes of the systems and units in the aforementioned embodiments, and they can refer to each other and will not be repeated here.

[0097] Example 4

[0098] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method provided in any possible implementation manner of the above embodiments.

[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0103] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.

Claims

1. The IoT data acquisition system based on blockchain is characterized by: include: Gateway, blockchain network, and on-chain users, where the gateway is deployed with decentralized oracle network nodes, adapters, IoT data analysis tools, and edge computing microservices architecture; A management contract is deployed on the blockchain network; On-chain users deploy consumer contracts containing predefined variables to the management contract address; call the request function in the consumer contract to initiate a request to the management contract, and write the request information to the blockchain event log; also used to obtain the status of predefined variables in the consumer contract to obtain result data; Decentralized oracle network node, used to subscribe to blockchain event logs, parse and obtain request information, and send the request information to the adapter; it is also used to receive data returned by the adapter and call the management contract function to trigger the management contract callback; The adapter is used to monitor the request information sent by the decentralized oracle network node, convert the request information format according to the format required by the IoT data analysis tool, and send the converted request information to the IoT data analysis tool; receive the return data and return it to the decentralized oracle network node; Edge computing microservices architecture for subscribing to IoT data and publishing it to IoT data analysis tools; IoT data analysis tool, used to aggregate IoT data according to aggregation rules and return it to the adapter; The management contract is used to call the callback function to return data to the predefined variables in the consumer contract.

2. The blockchain-based IoT data acquisition system according to claim 1, characterized in that: include: The system also includes a data provider, which is used to provide management contract addresses to on-chain users and to update configuration information of gateway devices.

3. The blockchain-based IoT data acquisition system according to claim 1, characterized in that: The management contract is also used to authorize decentralized oracle network nodes.

4. The blockchain-based IoT data acquisition system according to claim 1, characterized in that: The data structure followed by the request information includes: data source, aggregation rule, whether to customize the aggregation rule and customized aggregation rule; the data source includes device name, device type or device sub-command; the customized rule includes aggregation function or window function.

5. The blockchain-based IoT data acquisition system according to claim 4 is characterized in that: If a custom aggregation rule is used in the request information but no custom aggregation rule is specified, the adapter requests the IoT data analysis tool to specify a new aggregation rule.

6. The blockchain-based IoT data acquisition system according to claim 1, characterized in that: include: The system also includes an IoT device for periodically uploading collected IoT data to the edge computing microservice architecture.

7. The method for acquiring IoT data based on blockchain is characterized in that: include: On-chain users deploy consumer contracts containing predefined variables to the management contract address in the blockchain network; Call the request function in the consumer contract, initiate a request to the management contract, and write the request information to the blockchain event log; The gateway deploys decentralized oracle network nodes, adapters, IoT data analysis tools, and edge computing microservices architecture; The decentralized oracle network node subscribes to the blockchain event log, parses and obtains the request information, and sends the request information to the adapter; The adapter listens to the request information sent by the decentralized oracle network node, converts the request information format according to the format required by the IoT data analysis tool, and then sends it to the IoT data analysis tool; The edge computing microservice architecture subscribes to the data uploaded periodically by IoT devices and publishes it to the IoT data analysis tool. The IoT data analysis tool aggregates the data according to the aggregation rules and returns it to the adapter, which then returns it to the decentralized oracle network node. The decentralized oracle network node calls the management contract function to trigger the management contract callback; The management contract calls the callback function to return data to the predefined variables in the consumer contract; On-chain users obtain the predefined variable status in the consumer contract and obtain the result data.

8. The method for acquiring IoT data based on blockchain according to claim 7, characterized in that: include: The management contract address is provided by a data provider, and the data provider is also used to update the configuration information of the gateway device.

9. The method for acquiring IoT data based on blockchain according to claim 7, characterized in that: Use management contracts to authorize decentralized oracle network nodes.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the blockchain-based IoT data acquisition method according to any one of claims 7 to 9.