Blockchain Node Transaction Processing via Thread and Coroutine Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing volume of data in blockchain systems requires more efficient processing and storage of blockchain transactions, as existing methods struggle to effectively manage computational and storage resources, especially as systems scale and operate over time.

Innovation Solution

A method is introduced where a blockchain node determines whether transactions are CPU-bound or I/O-bound, allocating threads and coroutines accordingly for parallel and asynchronous processing, optimizing resource utilization by distributing transactions across multiple threads and using coroutines for concurrent execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If more computational resources are allocated to process blockchain transactions, then transaction processing efficiency is improved, but system resource consumption increases

Engineering Contradiction:
Improvetransaction processing efficiencyVSAvoidcomputational resources
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent segments the blockchain transaction processing system into multiple threads and coroutines, dividing the monolithic processing approach into concurrent executable units. This allows the system to process multiple transactions simultaneously without requiring proportional increases in physical computational resources, as threads and coroutines share the underlying hardware more efficiently than separate processes would.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces asynchronous concurrency as an additional dimension of parallelism beyond traditional multi-threading. By implementing coroutines that can execute asynchronously and be suspended/resumed without blocking underlying threads, the system adds a temporal dimension to resource utilization, allowing better overlap of I/O operations with computation and improving throughput without linearly increasing resource consumption.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If traditional single-threaded processing is used, then resource management is simple, but transaction processing speed is slow

Engineering Contradiction:
Improvetransaction processing speedVSAvoidprocessing architecture
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces coroutines as an intermediary layer between the thread management system and the transaction processing logic. Coroutines provide a lightweight abstraction that enables cooperative multitasking and asynchronous operations without the full overhead of traditional threading, thus improving processing speed while keeping the architecture more manageable than pure multi-threaded approaches.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The coroutine mechanism enables transactions to yield control voluntarily when waiting for I/O operations, allowing other coroutines to execute during wait periods. This self-service approach to concurrency management reduces the need for complex thread scheduling and synchronization mechanisms, improving speed while maintaining relative architectural simplicity.

Inventive Principle:
Principle #25Self-service

3Productivity

If I/O operations are performed synchronously, then implementation is simple, but system responsiveness and throughput decrease

Engineering Contradiction:
Improvesystem throughputVSAvoidI/O handling mechanism
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements asynchronous I/O handling where coroutines can be suspended during I/O operations and other coroutines can continue executing useful work. This ensures continuous utilization of computational resources rather than idle waiting, maintaining high system throughput. The coroutine suspension/resumption mechanism allows I/O-bound operations to proceed without blocking the entire system.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS11487736B2Blockchain transaction processing systems and methods
Publication Date: 2022.11.01 ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
  • US11487736B2 patent drawing
  • US11487736B2 patent drawing
  • US11487736B2 patent drawing

AI summary

Disclosed are computer-implemented methods, non-transitory computer-readable media, and systems or processing blockchain transactions. One computer-implemented method includes receiving a number of blockchain transactions to be executed by a blockchain node. The blockchain node allocates one or more threads and one or more coroutines for processing the number of blockchain transactions based on whether the number of blockchain transactions are CPU-bound or I/O-bound. The blockchain node executes the number of blockchain transactions using the one or more threads and one or more coroutines, generates a blockchain block including the number of blockchain transactions, and adds the blockchain block to the blockchain.