Oracle Contract Node for Real-Time Off-Chain Data Retrieval
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
There is a lag in acquiring processing results of events by users in blockchain systems, which affects the timely execution of smart contracts and reduces the efficiency of blockchain message processing due to the inability of blockchain networks to actively initiate network calls and acquire off-chain data in real-time.
Innovation Solution
A blockchain message processing method and apparatus that utilizes an oracle contract node to acquire service contract information, transmit it to an off-chain node, and retrieve event request results, enabling real-time data interaction between on-chain and off-chain nodes by connecting them through an oracle contract node.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If users manually acquire event processing results through the Internet and transmit them to the blockchain network, then the smart contract can obtain external data, but there is a lag in acquiring the processing result which affects subsequent service execution efficiency
Solution Approach 1:
The oracle contract node proactively initiates network calls to acquire event processing results from off-chain nodes before the smart contract needs them. This preliminary action eliminates the lag caused by manual user acquisition and ensures data is ready when needed by the smart contract, thereby improving processing efficiency while maintaining reliability
Solution Approach 2:
The oracle contract node serves as an intermediary between the blockchain network and off-chain nodes. It automatically manages the acquisition and transmission of event processing results, replacing the manual user role and enabling timely data delivery to smart contracts without compromising data reliability
2Stability of the object's composition
If the blockchain network cannot actively initiate network calls, then the decentralized architecture is maintained, but the smart contract cannot acquire off-chain data in real-time
Solution Approach 1:
The oracle contract node acts as a mediator that operates within the decentralized blockchain architecture while having the capability to actively initiate network calls to off-chain nodes. This intermediary role allows the system to maintain decentralization and stability while eliminating data acquisition delays through automated real-time data fetching
Solution Approach 2:
The oracle contract node performs preliminary data acquisition by actively calling off-chain nodes before the smart contract execution requires the data. This advance action resolves the time loss issue while preserving the decentralized architecture, as the oracle node operates autonomously within the existing blockchain structure
Data Source
AI summary
Embodiments of this application disclose a blockchain message processing method performed by a computer device acting as an oracle contract node. The method includes: acquiring service contract information, and adding the service contract information to an oracle contract, the service contract information including a contract identifier of a service smart contract and a service request event corresponding to the service smart contract; acquiring a target off-chain node, and transmitting the service contract information to the target off-chain node through the oracle contract, so that the target off-chain node acquires an event request result corresponding to the service request event; and acquiring the event request result transmitted by the target off-chain node, and returning the event request result to the service smart contract corresponding to the contract identifier.


