Parallel Blockchain Transaction Processing via Cache Merging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current block chain networks face inefficiencies in processing transaction data due to serial execution of blocks, leading to increased data retention and low processing efficiency.
Innovation Solution
A method where transaction data from multiple blocks is added to an execution queue based on block height and sequence numbers, allowing for parallel execution of contract services, merging of write caches, and verification of read caches to improve processing efficiency and reduce queuing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If transaction data is processed serially according to block height and sequence number, then data security and consistency are maintained, but processing efficiency deteriorates and large amounts of data are retained in the network
Solution Approach 1:
The patent segments the serial transaction processing into multiple parallel execution threads. Each thread independently processes transaction data from different blocks simultaneously, dividing the monolithic serial processing task into concurrent parallel tasks that can execute without blocking each other, thereby dramatically improving throughput and reducing network retention time
Solution Approach 2:
The patent transitions from one-dimensional serial processing (single queue, single thread) to multi-dimensional parallel processing by introducing thread dimension. Multiple execution threads operate concurrently on the same execution queue, adding a temporal parallelism dimension that enables simultaneous processing of multiple transaction batches without requiring sequential completion of each batch
2Speed
If parallel execution of contract services is implemented, then processing speed is improved, but complexity of cache management increases
Solution Approach 1:
The patent introduces an execution result merging module as an intermediary between parallel execution threads and the final transaction results. This mediator collects execution results from multiple parallel threads, resolves conflicts through deterministic ordering based on block height and sequence number, and merges results into a unified state, thereby managing parallel execution complexity without sacrificing speed
Solution Approach 2:
The patent performs preliminary organization of transaction data before parallel execution by sorting and structuring data according to block height and sequence number. This preliminary ordering ensures that when parallel threads execute concurrently, their results can be deterministically merged without complex conflict resolution, reducing cache management complexity while maintaining high execution speed
Data Source
AI summary
This application discloses a method and apparatus for processing data based on a block chain. The method includes adding transaction data in at least two blocks into an execution queue according to a block height sequence and transaction data sequence numbers; executing contract services and acquiring a read cache and a write cache of a parallel transaction generated by executing each contract service, the at least two pieces of transaction data comprising target transaction data; determining a write cache of a merged transaction in block caches, and acquiring a read cache of an updated transaction; determining a write cache of the transaction to be merged of the target transaction data according to the read cache of the updated transaction; and merging the write cache of the transaction to be merged of the target transaction data into a block cache to which the target transaction data belongs.


