Block chain layering and fragmenting scheme based on transaction characteristics
By adopting a layered sharding scheme based on transaction characteristics in the blockchain system, dynamically adjusting sharding and node allocation, the problem of high complexity of cross-shash transactions is solved, the system's throughput and transaction confirmation speed is improved, and the system's efficiency and security are enhanced.
Patent Information
- Application Number
- CN202411730890.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-25
AI Technical Summary
The existing blockchain sharding technology is more complex when handling cross-shash transactions, resulting in slow transaction processing speed, limited throughput and high latency, limiting the large-scale application of blockchain technology.
A layered sharding scheme based on transaction characteristics is proposed. Through the transaction collection module, transaction data analysis module and shard management module, the shard number and node allocation are dynamically adjusted, and the sharding is elected and bridged sharding is selected to improve cross-sanding transaction efficiency.
By dynamically adjusting sharding and node allocation, the complexity and latency of cross-shash transactions are reduced, the throughput and transaction confirmation speed of the blockchain system are improved, and the efficiency and security of the system are enhanced.
Smart Images

Figure CN119520520A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of layered sharding and blockchain technology, and more specifically, to transaction data of blockchain and node allocation in a blockchain system and bridge shard election between shards. Background Art
[0002] Blockchain technology, a decentralized distributed ledger technology, has shown great potential in various fields such as finance, supply chain management, and digital identity authentication. It has promoted the development of digital currencies such as Bitcoin and Ethereum through a secure, transparent, and tamper-proof transaction record mechanism. At the same time, the use of smart contracts has further expanded its application scope. However, with the wide and complex applications, performance bottlenecks such as slow transaction processing speed, limited throughput, and high latency have become the main obstacles to its large-scale application. To address these challenges, sharding technology has been proposed. By dividing the blockchain network into multiple shards that can process transactions in parallel, the throughput and concurrent processing capabilities of the system are improved, but the complexity of cross-shard transaction processing has brought new challenges. Although projects such as Monoxide, Ethereum2.0, and Zilliqa have adopted sharding technology, the problem of cross-shard transactions remains prominent due to insufficient consideration of transaction characteristics.
[0003] For blockchain sharding that adopts full sharding. Kokoris-Kogias et al. proposed a sharding protocol OmniLedger designed to manage identities, which uses ByzCoin's sliding window mechanism to select qualified nodes for the next epoch. This is a client-driven, two-phase execution cross-shard transaction processing protocol. It effectively ensures the atomicity of transactions, allowing cross-shard transactions to be executed correctly.
[0004] Many researchers have proposed their own solutions to the blockchain sharding method of layered sharding. SSchain proposed by Hen et al. adopts a two-layer network structure. The first layer is the root blockchain network, which is similar to the original Bitcoin network. Nodes store complete ledgers in this layer. The second layer is a shard network composed of many shards, and each shard processes transactions independently through the POW consensus mechanism. The Pyramid framework proposed by Hong et al. proposes a hierarchical sharding concept based on a two-layer structure. Nodes first establish their legal identities through the POW mechanism, and then these identities determine the type of shard to which the nodes are assigned. There are two main types of these shards: internal shards and bridge shards. Internal shards are similar to traditional sharding mechanisms. Their nodes process and store transactions within the shards through the Practical Byzantine Fault Tolerance (PBFT) consensus mechanism; while bridge shards are responsible for connecting multiple internal shards. Nodes can be regarded as belonging to multiple internal shards at the same time, and store all relevant states of these internal shards to independently verify the validity of cross-shard transactions. Huang et al. proposed a reputation-based sharding protocol Repchain, which encourages honest and capable nodes to make more contributions. Most current sharding schemes assume that all validators are homogeneous, ignoring the differences in hardware and network of nodes. In fact, some nodes are active in the consensus process, while other nodes are relatively inactive. If a shard contains more inactive nodes, it may be more vulnerable to control by attackers. To solve this problem, at the beginning of each cycle, nodes are sorted according to their reputation values and assigned to smaller shards accordingly. Summary of the invention
[0005] This paper invented a hierarchical sharding scheme based on transaction characteristics. Its entities include: transaction collection module, transaction data analysis module and shard management module. Through the transaction characteristics of blockchain transaction data over a period of time, the number of shards and core nodes are reasonably set, and ordinary nodes are reasonably allocated to each shard to maintain the balance between shards and avoid the occurrence of transaction congested shards and transaction idle shards. In addition, this paper balances the shards according to the reputation value of the shards to ensure the credibility of the shards and avoid the aggregation of malicious nodes. And by selecting shards with high reputation values and strong correlation with other shards as bridge shards based on transaction characteristics of the balanced shards, it helps the internal shards to process cross-shard transactions and improve the efficiency of cross-shard transactions.
[0006] The objective of the present invention is achieved through the following technical solutions: Step 1: In the initialization phase, the transaction data is initialized, and the transaction collection module gives the transaction data to construct a transaction graph; Step 2: The transaction data analysis module selects core nodes based on the transaction data; Step 3: After the core nodes are selected, the shard management module will allocate nodes based on the transaction data analysis results and the situation between shards; Step 4: The transaction data analysis module calculates the reputation value of the node, and calculates the shard reputation value based on the reputation value of the node; Step 5: The shard management module balances the shard situation according to the node reputation value and the shard reputation value in the shard; Step 6: After the shards are balanced, the shard management module selects the bridge shards between shards based on the transaction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0008] Figure 1 This is a diagram of the blockchain layered sharding algorithm model based on transaction features described in an embodiment of the present invention. Specific implementation
[0009] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0010] The cross-chain solution based on a multi-role notary group and credit value described in the embodiment of the present invention comprises the following steps: 1) Initialize the system: Use the data provided by the transaction collection module to construct a transaction graph G(V,E), where the node V represents the entity involved in the transaction and the edge E represents the transaction relationship between the entities. This step aims to capture and reflect the transaction activities in the network and the interaction patterns between nodes. 2) Core node identification: Identify K core nodes. Core nodes are key participants selected by the transaction data analysis module based on their transaction frequency, reputation value or other relevant criteria. Core nodes are associated with other nodes in the shard. The number of core nodes depends on the number of nodes in the shard and the upper limit of transaction volume. 3) Node allocation: First, the shard management module allocates core nodes to corresponding shards according to their transaction frequency to ensure that nodes with active transactions occupy an important position in the shards. Secondly, the remaining nodes are allocated to each shard, and the number of nodes in each shard is roughly balanced to avoid crowded or idle shards. 4) Reputation value calculation: Calculate the reputation value of each node in each shard to evaluate its position in the shard. The calculation formula of the reputation value is as follows: Reputation(ac i )=w1·Stake(ac i )+w2·Time(aci )+w3·Penalties(ac i ) Among them, w1, w2, and w3 are weight coefficients, representing the contribution, activity, and penalty of the node respectively. The contribution of the node is determined by the number of tokens it holds (Stake (ac i ) and the activity is determined by the time it participates in the transaction Time(ac i ) is determined by the number of violations Penalties(ac i ) decision. The purpose of this step is to evaluate the overall reputation level of each shard. 5) Shard balance adjustment: Based on the reputation value of the nodes in the shard, the shard management module makes necessary adjustments to ensure the balance of the reputation value of each shard and to ensure the trustworthiness of the shards. This may involve the reallocation of nodes or the adjustment of transaction relationships between shards. 6) Transaction feature analysis: The transaction data analysis module calculates the transaction frequency between shards and identifies which shards have higher transaction activity. The shard management module determines the optimal bridge shard based on the analysis results and sets these shards as bridge shards. This step helps reduce the occurrence of cross-shard transactions and improve the overall efficiency of the system. In order to solve the problem of abnormally high proportion of cross-shard transactions in random sharding schemes, this paper proposes a hierarchical blockchain sharding algorithm based on transaction characteristics. This sharding strategy allows the system to dynamically reorganize shards according to real-time transaction data and node behavior, adapt to the changing network status and transaction patterns, and thus improve the efficiency and security of the system. At the same time, by analyzing the transaction frequency and reputation value of the transaction account, the proposed hierarchical sharding algorithm identifies the optimal intermediate shard and converts cross-shard transactions into bridge shard transactions, thereby reducing the frequency and complexity of cross-shard transactions, reducing transaction latency, and achieving faster transaction confirmation time and lower network latency. Experimental results show that compared with the random sharding algorithm, the method proposed in this paper can effectively improve the performance of the blockchain system, especially showing significant advantages in processing cross-shard transactions.
Claims
1. A blockchain layered sharding scheme based on transaction characteristics, the technology includes: Step 1: In the initialization phase, the transaction data is initialized, and the transaction collection module gives the transaction data to construct a transaction graph; Step 2: The transaction data analysis module selects core nodes based on the transaction data; Step 3: After the core nodes are selected, the shard management module will allocate nodes based on the transaction data analysis results and the situation between shards; Step 4: The transaction data analysis module calculates the reputation value of the node, and calculates the shard reputation value based on the reputation value of the node; Step 5: The shard management module balances the shard situation according to the node reputation value and the shard reputation value in the shard; Step 6: After the shards are balanced, the shard management module selects the bridge shards between shards based on the transaction data.
2. Construct a transaction graph: Based on the data provided by the transaction collection module, a transaction graph G(V,E) is constructed, where the node V represents the entity involved in the transaction and the edge E represents the transaction relationship between the entities. This step aims to capture and reflect the transaction activities in the network and the interaction patterns between nodes.
3. Core node identification: Identify K core nodes. Core nodes are key participants selected by the transaction data analysis module based on their transaction frequency, reputation value or other relevant criteria. Core nodes are associated with other nodes in the shard. The number of core nodes depends on the number of nodes in the shard and the upper limit of transaction volume.
4. Node allocation: First, the shard management module allocates core nodes to corresponding shards according to their transaction frequency to ensure that nodes with active transactions occupy an important position in the shards. Secondly, the remaining nodes are allocated to each shard, and the number of nodes in each shard is roughly balanced to avoid crowded or idle shards.
5. Reputation value calculation: Calculate the reputation value of each node in each shard to evaluate its position in the shard. The calculation formula of the reputation value is as follows: Reputation(ac i )=w1·Stake(ac i )+w2·Time(ac i )+w3·Penalties(ac i ) in, w1, w2, w3 are weight coefficients, representing the contribution, activity and penalty of the node respectively. The contribution of the node is determined by the number of tokens it holds (Stake (ac i ) and the activity is determined by the time it participates in the transaction Time(ac i ) is determined by the number of violations Penalties(ac i ) decision. The purpose of this step is to evaluate the overall reputation level of each shard.
6. Shard balance adjustment: Based on the reputation value of the nodes in the shard, the shard management module makes necessary adjustments to ensure the balance of the reputation value of each shard and to ensure the trustworthiness of the shards. This may involve the reallocation of nodes or the adjustment of transaction relationships between shards.
7. Transaction feature analysis: The transaction data analysis module calculates the transaction frequency between shards and identifies which shards have high transaction activity. The shard management module determines the optimal bridge shard based on the analysis results and sets these shards as bridge shards. This step helps reduce the occurrence of cross-shard transactions and improve the overall efficiency of the system.