Blockchain Data Processing via Smart Contract Classification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current blockchain-based data processing methods are inefficient for reading data due to the need to traverse all transaction data to retrieve specific information, leading to a poor data reading rate.
Innovation Solution
Classifying and storing data in a blockchain using a smart contract-based block generation rule, which categorizes data into service types, allowing for the generation of blocks specific to each component and service type, thereby enabling direct querying of relevant data without traversing the entire dataset.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If all transaction data is packed into a single block for storage in the blockchain, then the blockchain structure is simple and data integrity is maintained, but the data reading rate deteriorates because the system must traverse all transaction data to query specific information
Solution Approach 1:
The patent segments transaction data by service type (e.g., transfer services, query services, account management services) and stores each type in separate blocks. This allows the system to directly query specific service data without traversing the entire blockchain, resolving the contradiction between maintaining simple blockchain structure and reducing data reading time.
2Loss of time
If transaction data is classified and stored separately by service type in multiple blocks, then the data reading rate improves by allowing direct querying of relevant data, but the blockchain structure becomes more complex
Solution Approach 1:
The patent introduces an intermediary classification mechanism that categorizes transaction data by service type before storage. This intermediary layer organizes data into structured blocks with clear service type identifiers, making the blockchain queryable by service type without requiring complex traversal, thus improving data reading speed while managing structural complexity through systematic organization.
Data Source
Figure 1
Figure 2A
Figure 2b
AI summary
A block chain-based data processing method and apparatus, a device, and a readable storage medium are provided in implementations of the disclosure. The method includes the following. Virtual asset associated data of an item transmitted by a first device is obtained, where the item includes at least two components. A smart contract is triggered based on the virtual asset associated data of the item, and a block generation rule is obtained through the smart contract, where the block generation rule includes a service type of data used for block generation. The virtual asset associated data of the item is classified according to the smart contract and the service type in the block generation rule, to obtain N types of classified data, where each of the N types of classified data corresponds to one service type, and N is a positive integer. For each of the N types of classified data, virtual asset associated data belonging to a first target component is obtained, and component asset data of the first target component is determined according to the virtual asset associated data belonging to the first target component, where the at least two components include the first target component. A block used to record the first target component is generated according to the component asset data of the first target component, and the block is added into a block chain to which the smart contract belongs. As such, with the disclosure, data can be classified and stored in the block chain, thereby improving a data reading rate.