Method and system for dynamic control of inter-chain interaction load in multi-chain and cross-chain scenarios
By dynamically regulating the inter-chain load in multi-chain and cross-chain scenarios, the problem of load imbalance in the blockchain system is solved, the efficiency and flexibility of cross-chain information transmission are achieved, resource allocation is optimized, and the scalability of the system is improved.
Patent Information
- Application Number
- CN202310432921.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing blockchain systems have load balancing problems in multi-chain communication scenarios, resulting in excessive load on some chains and underutilization of resources on other chains, affecting information transmission efficiency and system scalability.
A dynamic control method for inter-chain interaction load in a multi-chain cross-chain scenario is adopted. By measuring the load factor of each chain, the appropriate execution method is selected for cross-chain calls or access switching, and the load distribution is dynamically adjusted to achieve load balancing.
It improves the efficiency and flexibility of information transmission across cross-chain or multi-chain systems, solves the bottleneck problem of single-chain load, and achieves optimized resource allocation and efficient operation of the system.
Smart Images

Figure CN116566991B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cross-chain data interaction and cross-chain resource allocation of blockchains, and specifically relates to a method and system for dynamically regulating inter-chain interaction load in a multi-chain cross-chain scenario. Background Art
[0002] In recent years, blockchain technology, as an emerging distributed computer system, has gained widespread adoption in industry and academia. However, due to the inherent technical characteristics of blockchain systems, information and data are relatively isolated, forming "islands" between different blockchains. This interoperability significantly limits the application of blockchain systems. How to efficiently and cost-effectively enable data exchange between different blockchains and continuously improve the scalability of blockchain systems has long been a hot topic of public concern.
[0003] A blockchain is a continuously growing list of blocks, each containing several records linked to the previous block through cryptographic techniques, forming a chain-like structure. Each block permanently and verifiably records the hash value of the previous block it links to, as well as the timestamp and transaction history of the current block, ensuring that these records and the data within the block cannot be maliciously tampered with. As a decentralized data storage structure, the blockchain is responsible for preserving all recorded data. All data recorded on the blockchain is unmodifiable, and the entire blockchain is distributed across all nodes in its consensus network, eliminating the possibility of data alteration.
[0004] Cross-chain technology is a system architecture or method that enables data exchange and intercommunication between blockchains, serving as a bridge for blockchain expansion and connectivity. Broadly speaking, cross-chain technology also encompasses multi-chain systems or architectures that integrate multiple blockchains, known as multi-chain systems. By leveraging the consensus mechanisms of multiple blockchains and verifiable inter-chain data transmission mechanisms, multi-chain systems provide external access to cross-chain methods such as multi-chain data exchange and cross-chain contract calls. They also enable efficient and rapid cross-chain data transmission and resource allocation within the system.
[0005] Load balancing is a technology that distributes workloads evenly across multiple operating units. It provides a cost-effective way to expand bandwidth, enhance network data processing capabilities, increase throughput, and improve the availability and flexibility of network services, building upon existing network structures. In the blockchain space, services must first connect to a node on the blockchain before they can provide services. When transaction volume is excessive at a given moment, these transactions can cause node congestion. Therefore, similar to classic network services, blockchain services require load balancing to distribute requests across multiple nodes on the chain. In cross-chain or multi-chain applications, situations may arise where the majority of nodes on one or a few chains are already operating at high capacity, leaving cross-chain services on other chains waiting.
[0006] In summary, there is an urgent need for a method or system that can achieve load balancing in multi-chain communication scenarios, addressing the load bottleneck of a single blockchain within a cross-chain or multi-chain system. Existing blockchain load balancing mechanisms only consider the load of each blockchain node within a single chain. Cross-chain load balancing using these methods can strain already limited cross-chain data channels. Therefore, designing and implementing a multi-chain load balancing method specifically for cross-chain information transmission would undoubtedly bring enormous versatility and practical value. Summary of the Invention
[0007] In response to the problems existing in existing cross-chain and multi-chain systems, and in order to improve the information interaction efficiency of cross-chain and multi-chain systems, the present invention provides a method and system for dynamically regulating the inter-chain interaction load in a multi-chain cross-chain scenario, which solves the load balancing problem of each chain in the cross-chain information transmission scenario and improves the flexibility of the system and the efficiency of information transmission.
[0008] The specific technical solutions are as follows:
[0009] The present invention first provides a method for dynamically regulating inter-chain interaction load in a multi-chain and cross-chain scenario, comprising the following steps:
[0010] 1) When a cross-chain business occurs, the business end communicates with the access blockchain and submits a transaction to execute the cross-chain business;
[0011] 2) The access blockchain receives a transaction to execute a cross-chain business. The access blockchain confirms the target blockchain of the transaction through the cross-chain information interface and obtains the load information of the target blockchain. The access blockchain measures the load level of the target blockchain based on the obtained target blockchain load information.
[0012] 3) The access blockchain selects the execution mode from cross-chain call or access switching based on the measured load level of the target blockchain;
[0013] 4) The target blockchain completes the execution of the cross-chain business according to the execution method selected in step 3).
[0014] As a preferred solution of the present invention, the access blockchain in step 1) is the blockchain where the business end account is located when the transaction occurs.
[0015] As a preferred embodiment of the present invention, the cross-chain information interface in step 2) is a smart contract account. The smart contract account is used to record the ID of the access blockchain corresponding to the accounts of all blockchains. The smart contract account shares the same address in each blockchain. When the target chain is a cross-chain business, the blockchain that needs to execute the cross-chain business is required.
[0016] As a preferred solution of the present invention, when measuring the load of the blockchain in step 2), the measurement criteria include the following parts:
[0017] 2.1) Internal transaction load measurement factor It is used to represent the load of internal transactions on the i-th chain, where sto used and sto total Indicates the storage space in the block that has been used and is available for transactions within this chain; k i It is a dynamic load factor used to adjust the transaction volume of the chain; gas (tx internal ) indicates the amount of gas used for internal transactions;
[0018] 2.2) Cross-chain contract execution load measurement factor μ i =gas(tx crosscont )*m i , used to represent the increased load on the i-th chain to complete the cross-chain contract execution; where gas (tx crosscont ) represents the amount of gas used to execute the cross-chain contract call of the target on this chain; m i A dynamic load factor used to adjust the proportion of cross-chain execution metrics for this chain;
[0019] 2.3) Cross-chain contract call load measurement factor π i =num(tx crosscont )*n i , used to represent the load of cross-chain contract execution requested on the i-th chain, where num(tx crosscont ) indicates the number of cross-chain contract execution requests required in this block; n i It is a dynamic load factor used to adjust the metric proportion of the chain load.
[0020] As a preferred embodiment of the present invention, the method for selecting the execution mode in step 3) is:
[0021] Comprehensively compare the three load factors of each blockchain in the multi-chain cross-chain scenario, including the internal transaction load measurement factor φ i , cross-chain contract execution load measurement factor μ i And the cross-chain contract call load measurement factor π i ;
[0022] When the cross-chain contract execution load measurement factor μ of the target blockchain i Lower than the cross-chain contract execution load measurement factor μ connected to the blockchain i , and the internal transaction load measurement factor of the target blockchain is φ i Not higher than the internal transaction load measurement factor φ of the connected blockchain i When selecting the execution method of cross-chain call;
[0023] When the cross-chain contract execution load measurement factor μ of the target blockchain i Higher than the cross-chain contract execution load measurement factor μ connected to the blockchain i , and the cross-chain contract call load measurement factor of the target blockchain is π i Not higher than the cross-chain contract call load measurement factor π of the connected blockchain i Select the execution method of access switching.
[0024] As a preferred embodiment of the present invention, in step 4),
[0025] The execution method of cross-chain call is as follows:
[0026] 3.1) The access blockchain obtains the target blockchain ID from the cross-chain information interface, encapsulates the call method and call data in the cross-chain call into a cross-chain contract call transaction, and generates subsequent blocks on this chain; when subsequent blocks are generated, the access blockchain will package the cross-chain contract call transaction and the target blockchain ID into the cross-chain transaction request area of the block;
[0027] 3.2) When the target blockchain generates a block, referencing the block generated by the access blockchain in step 3.1), the target blockchain will execute the cross-chain contract call transaction requested in the cross-chain transaction request area of the access blockchain's generated block. The cross-chain call will be completed and recorded in the cross-chain transaction execution area of the target blockchain's generated block;
[0028] The specific execution method of access switching is as follows:
[0029] 4.1) The access blockchain obtains the target blockchain's ID from the cross-chain information interface, encapsulates the account information and verification information into a cross-chain access handover transaction, and generates subsequent blocks on this chain. When subsequent blocks are generated, the access blockchain will package the cross-chain access handover transaction and the target blockchain's ID into the cross-chain transaction request area of the block. The verification information is the corresponding hash sequence on the Merkle tree of the account in the target blockchain. The account information is the address and transaction history of the account initiating the cross-chain transaction.
[0030] 4.2) When the target blockchain generates a block, referencing the block generated by the access blockchain in step 4.1), the target blockchain will execute the cross-chain access transaction requested in the cross-chain transaction request area of the access blockchain's generation block, verify and write the account information, and record it in the cross-chain transaction execution area of the target blockchain's generation block.
[0031] As a preferred embodiment of the present invention, blocks generated by both the access blockchain and the target blockchain include a block header, a block body, a cross-chain transaction execution area, and a cross-chain transaction request area. The block header contains the hash value of the entire generated block and references the hash values of newly generated blocks on other blockchains in a multi-chain cross-chain scenario. The block body contains the block headers of transactions within the current chain and transactions executed within the current chain. The cross-chain transaction execution area stores transactions from other blockchains that have already been executed in the current block, and the cross-chain transaction request area stores transactions from other blockchains that need to be completed in the current block. In this scenario, all blockchains form both shards of the same blockchain and mirror images of each other, enabling rapid inter-chain information exchange through mutual references within the sharded state.
[0032] When neither of the above two conditions is met, multiple blockchains are in an overloaded state and business processing is temporarily suspended.
[0033] The present invention also provides a control system for the above-mentioned inter-chain interactive load dynamic control method, comprising:
[0034] The transaction request module is used when cross-chain business is generated. The business end communicates with the access blockchain and submits cross-chain business transactions;
[0035] The load monitoring module is used to access the blockchain to receive cross-chain business transactions, confirm the target blockchain of the transaction through the cross-chain information interface and obtain the load information of the target blockchain; and to measure the load level of the target blockchain based on the obtained target blockchain load information;
[0036] The execution mode selection module is used to select the execution mode from cross-chain call or access switching based on the load level of the target blockchain;
[0037] The cross-chain business execution module is used to select the execution method and complete the execution of cross-chain business.
[0038] The present invention not only has good versatility and practical value, but also has great reference significance. The specific beneficial technical effects and innovations are mainly manifested in the following aspects:
[0039] 1. The multi-chain architecture of the present invention uses a dynamic inter-chain interactive load control system to solve the load bottleneck problem of a single blockchain in a cross-chain or multi-chain system, thereby increasing the lower limit of the system load.
[0040] 2. This invention uses mirroring technology and sharding technology to build a blockchain multi-chain architecture, solving the communication problem between cross-chain or multi-chain system blockchains. The interaction experience between the outside world and the system is similar to that of a single blockchain, making the business transparent to the outside world.
[0041] 3. The inter-chain interaction load dynamic control system of the present invention adopts an architectural method of integrating to form new blocks, which solves the problem of data format consistency between cross-chain or multi-chain system blockchains, thereby making the system highly versatile.
[0042] 4. The control method of the inter-chain interactive load dynamic control system of the present invention adopts a dynamically adjusted load measurement factor as a measurement standard. The different load types and degrees of each chain can be customized according to the load characteristics of the multi-chain system, making the control method applicable to various node types and application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Schematic diagram of the data structure of single-chain blocks of each blockchain in the multi-chain architecture of the present invention.
[0044] Figure 2 This is a simplified diagram of the blockchain multi-chain architecture framework of the present invention.
[0045] Figure 3 This is a schematic diagram of a cross-chain request case implementation of the present invention to solve the load balancing problem. DETAILED DESCRIPTION
[0046] In order to clearly illustrate the present invention and make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention are clearly and completely described below in conjunction with the accompanying drawings so that those skilled in the art can implement them according to the description.
[0047] In order to improve the information interaction efficiency of cross-chain and multi-chain systems, the present invention provides a method for dynamically regulating the inter-chain interaction load in a multi-chain cross-chain scenario; the method comprises the following steps:
[0048] 1) When a cross-chain transaction occurs, the business end communicates with the access blockchain and submits the cross-chain transaction; the access blockchain is the blockchain where the business end account is located when the transaction occurs;
[0049] 2) The access blockchain receives the cross-chain business transaction, confirms the target blockchain of the transaction through the cross-chain information interface and obtains the load information of the target blockchain; the access blockchain uses the internal transaction load measurement factor φ i , cross-chain contract execution load measurement factor μ i And the cross-chain contract call load measurement factor π i To measure the load of the target blockchain; the cross-chain information interface is a smart contract account, which is used to record the ID of the access blockchain corresponding to the accounts of all blockchains. The smart contract account shares the same address in each blockchain; the target chain is the blockchain that needs to execute the transaction when the cross-chain business transaction occurs.
[0050] The internal transaction load measurement factor It is used to represent the load of internal transactions on the i-th chain, where sto used and sto total Indicates the storage space in the block that has been used and is available for transactions within this chain; k i It is a dynamic load factor used to adjust the transaction volume of the chain; gas (tx internal ) indicates the amount of gas used for internal transactions;
[0051] Cross-chain contract execution load measurement factor μ i =gas(tx crosscont )*m i , used to represent the increased load on the i-th chain to complete the cross-chain contract execution; where gas (tx crosscont ) represents the amount of gas used to execute the cross-chain contract call of the target on this chain; m i A dynamic load factor used to adjust the proportion of cross-chain execution metrics for this chain;
[0052] Cross-chain contract call load measurement factor π i =num(tx crosscont )*n i , used to represent the load of cross-chain contract execution requested on the i-th chain, where num(tx crosscont ) indicates the number of cross-chain contract execution requests required in this block; n i It is a dynamic load factor used to adjust the metric proportion of the chain load.
[0053] 3) Comprehensively compare the three load factors of each blockchain in the multi-chain cross-chain scenario, including the internal transaction load measurement factor φ i , cross-chain contract execution load measurement factor μ i And the cross-chain contract call load measurement factor π i ;
[0054] When the cross-chain contract execution load measurement factor μ of the target blockchain i Lower than the cross-chain contract execution load measurement factor μ connected to the blockchain i , and the internal transaction load measurement factor of the target blockchain is φ i Not higher than the internal transaction load measurement factor φ of the connected blockchain i When selecting the execution method of cross-chain call;
[0055] When the cross-chain contract execution load measurement factor μ of the target blockchain i Higher than the cross-chain contract execution load measurement factor μ connected to the blockchain i , and the cross-chain contract call load measurement factor of the target blockchain is π i Not higher than the cross-chain contract call load measurement factor π of the connected blockchain i Select the execution method of access switching.
[0056] 4) The target blockchain completes the execution of the cross-chain business according to the execution method selected in step 3).
[0057] The execution method of cross-chain call is as follows:
[0058] 3.1) The access blockchain obtains the target blockchain ID from the cross-chain information interface, encapsulates the call method and call data in the cross-chain call into a cross-chain contract call transaction, and generates subsequent blocks on this chain; when subsequent blocks are generated, the access blockchain will package the cross-chain contract call transaction and the target blockchain ID into the cross-chain transaction request area of the block;
[0059] 3.2) When the target blockchain generates a block, referencing the block generated by the access blockchain in step 3.1), the target blockchain will execute the cross-chain contract call transaction requested in the cross-chain transaction request area of the access blockchain's generated block. The cross-chain call will be completed and recorded in the cross-chain transaction execution area of the target blockchain's generated block;
[0060] The specific execution method of access switching is as follows:
[0061] 4.1) The access blockchain obtains the target blockchain's ID from the cross-chain information interface, encapsulates the account information and verification information into a cross-chain access handover transaction, and generates subsequent blocks on this chain. When subsequent blocks are generated, the access blockchain will package the cross-chain access handover transaction and the target blockchain's ID into the cross-chain transaction request area of the block. The verification information is the corresponding hash sequence on the Merkle tree of the account in the target blockchain. The account information is the address and transaction history of the account initiating the cross-chain transaction.
[0062] 4.2) When the target blockchain generates a block, referencing the block generated by the access blockchain in step 4.1), the target blockchain will execute the cross-chain access transaction requested in the cross-chain transaction request area of the access blockchain's generation block, verify and write the account information, and record it in the cross-chain transaction execution area of the target blockchain's generation block. Specific embodiment:
[0064] The technology of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments:
[0065] As shown in Figure 1, the blocks generated by the access blockchain and the target blockchain both include a block header, a block body, a cross-chain transaction execution area, and a cross-chain transaction request area; the block header contains the hash value of the entire generated block and references the hash value of the newly generated block of other blockchains in the multi-chain cross-chain scenario; the block body contains the block header of the transaction within the current chain and the transaction executed within the current chain; the cross-chain transaction execution area stores the transactions from other blockchains that have been executed in this block; and the cross-chain transaction request area stores the transactions in this block that need to be completed in other blockchains.
[0066] like Figure 2 As shown in the figure, in the simplest blockchain multi-chain architecture, there are two mirror shard chains, chain a and chain b. Contract C is deployed on a certain address on chain b. The dotted arrows represent the cross-chain reference relationship, which is the initial state of the multi-chain system before the transaction. Figure 3 As shown, when chain a communicates with the front-end business and receives a transaction to call contract C, the transaction is broadcast on the network of chain a. The process is as follows:
[0067] (1) When chain a attempts to generate a new block, it monitors this transaction and attempts to execute the contract call;
[0068] (2) When chain a executes a contract call, chain a queries the access chain of the called contract through the cross-chain information interface and finds that the contract C is located on another chain b that is not the current chain, and determines that cross-chain data communication is required;
[0069] (3) Chain a will now determine the specific execution method based on the load measurement factor returned by the load monitoring method:
[0070] (3-a) When the load detection method returns a low cross-chain contract execution load measurement factor μ on chain b, and a low internal transaction load measurement factor φ, the dynamic load adjustment mechanism chooses to implement the contract call in the transaction through a cross-chain contract call. Chain a encapsulates the call method and call data into a cross-chain contract call transaction, and packages this transaction with the ID of chain b into the cross-chain transaction request area of chain a and broadcasts it on the network of chain a.
[0071] (3-b) When the load detection method returns a high cross-chain contract execution load measurement factor u on chain b, but a low cross-chain contract call load factor π, the dynamic load adjustment mechanism will choose to implement the access account call involved in the transaction through an account access switch request. Chain a encapsulates the account information and verification information into a cross-chain access switch transaction, and packages this transaction with the ID of chain b into the cross-chain transaction request area of chain a and broadcasts it on the network of chain a.
[0072] (4) When a new block is generated on chain b, it will access the newly generated block on chain a, and find the cross-chain contract transaction or account access switching operation that needs to be executed by chain b in the cross-chain transaction request area of the block, obtain the calling method and data from the transaction data, and execute the calling operation of contract C;
[0073] (5) After the transaction is executed, the transaction and the ID of chain a are packaged and recorded in the cross-chain transaction execution area of the new block and broadcast on the network of chain b.
[0074] At this point, the contract call is completed, and the front-end business can complete subsequent operations by querying the status of contract C.
[0075] In a preferred embodiment of the present invention, the method for dynamically regulating the inter-chain interaction load in a multi-chain cross-chain scenario is not limited to a single contract call. When used for a long time, the system administrator can adjust the dynamic load factor on each chain so that certain specific chains adjust the load priority type in access priority and operation priority, thereby targetedly changing the resource allocation strategy on each chain. In this embodiment scenario, chain a has a large amount of information interaction with external front-end businesses, and most of the user's operations on the account are also performed on chain a; the computing power of chain b is higher than that of chain a, but the network communication load capacity is lower, and the overall resource volume is more than that of chain a; in order to more efficiently utilize the resources on each chain, chain a should bear more front-end business access operations, and chain b should bear more computing load, and the overall load of chain b should be higher than that of chain a; to achieve this load distribution method, the dynamic adjustment mechanism of the load of each chain in the multi-chain system described in this method can set a lower dynamic load factor n on chain a. i , set a lower dynamic load factor k in chain b i With m i .
[0076] At this point, the load strategy of each chain is set. When the system described in this method is used for a long time, each chain will execute the load balancing mechanism according to the set resource allocation strategy.
[0077] The above description of the embodiments is intended to facilitate understanding and application of the present invention by those skilled in the art. It will be apparent that those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without requiring inventive effort. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art based on the disclosure of the present invention should fall within the scope of protection of the present invention.
Claims
1. A method for dynamically regulating inter-chain interaction load in a multi-chain cross-chain scenario, characterized in that: The following steps are involved: 1) When a cross-chain business occurs, the business end communicates with the access blockchain and submits a transaction to execute the cross-chain business; 2) The access blockchain receives a transaction to execute a cross-chain business. The access blockchain confirms the target blockchain of the transaction through the cross-chain information interface and obtains the load information of the target blockchain. The access blockchain measures the load level of the target blockchain based on the obtained target blockchain load information. 3) The access blockchain selects the execution method from cross-chain call or access switching based on the measured load level of the target blockchain; 4) The target blockchain completes the cross-chain transaction execution according to the execution method selected in step 3); The execution method of cross-chain call is as follows: a1) The access blockchain obtains the target blockchain ID from the cross-chain information interface, encapsulates the call method and call data in the cross-chain call into a cross-chain contract call transaction, and generates subsequent blocks on this chain; when subsequent blocks are generated, the access blockchain will package the cross-chain contract call transaction and the target blockchain ID into the cross-chain transaction request area of the block; a2) When the target blockchain generates a block, it references the block generated by the access blockchain in step a1). The target blockchain will execute the cross-chain contract call transaction requested in the cross-chain transaction request area of the access blockchain's generated block. The cross-chain call will be completed and recorded in the cross-chain transaction execution area of the target blockchain's generated block. The specific execution method of access switching is as follows: b1) The access blockchain obtains the target blockchain's ID from the cross-chain information interface, encapsulates the account information and verification information into a cross-chain access switch transaction, and generates subsequent blocks on the current chain. When subsequent blocks are generated, the access blockchain will package the cross-chain access switch transaction and the target blockchain's ID into the cross-chain transaction request area of the block. The verification information is the corresponding hash sequence on the Merkle tree of the account in the target blockchain. The account information is the address of the account initiating the cross-chain transaction and its transaction history. b2) When the target blockchain generates a block, it references the block generated by the access blockchain in step b1). The target blockchain will execute the cross-chain access transaction requested in the cross-chain transaction request area of the access blockchain's generated block, verify and write the account information, and record it in the cross-chain transaction execution area of the target blockchain's generated block.
2. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: The blockchain accessed in step 1) is the blockchain where the business-side account is located when the transaction occurs.
3. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: The cross-chain information interface in step 2) is a smart contract account. The smart contract account is used to record the ID of the access blockchain corresponding to the accounts of all blockchains. The smart contract account shares the same address in each blockchain.
4. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: When the target chain mentioned in step 2) is a cross-chain business, the blockchain that executes the cross-chain business is required.
5. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: When measuring the load of the blockchain in step 2), the metrics include the following: 21) Internal transaction load measurement factor , used to indicate the The load of internal transactions on the chain, where and Indicates the storage space in the block that has been used and is available for transactions within this chain; A dynamic load factor used to adjust the transaction volume of the chain; Indicates the amount of gas used for internal transactions; 22) Cross-chain contract execution load measurement factor , used to indicate the The increased load on the chain to complete the cross-chain contract execution; Indicates the amount of gas used to execute the cross-chain contract call of the target on this chain; A dynamic load factor used to adjust the proportion of cross-chain execution metrics for this chain; 23) Cross-chain contract call load measurement factor , used to indicate the The load of cross-chain contract execution requests on the chain, where Indicates the number of cross-chain contract execution requests required in this block; It is a dynamic load factor used to adjust the metric proportion of the chain load.
6. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: In step 3), you can select the execution method as follows: Comprehensively compare the three load factors of each blockchain in a multi-chain cross-chain scenario, including the internal transaction load measurement factor , Cross-chain contract execution load measurement factor and cross-chain contract call load measurement factors ; When the cross-chain contract execution load measurement factor of the target blockchain Lower than the cross-chain contract execution load measurement factor of the connected blockchain , and the internal transaction load measurement factor of the target blockchain Not higher than the internal transaction load measurement factor of the connected blockchain When selecting the execution method of cross-chain call; When the cross-chain contract execution load measurement factor of the target blockchain Higher cross-chain contract execution load measurement factor than the connected blockchain , and the cross-chain contract call load measurement factor of the target blockchain Not higher than the cross-chain contract call load measurement factor of the connected blockchain Select the execution method of access switching.
7. The method for dynamic control of inter-chain interaction load according to claim 1, characterized in that: The blocks generated by both the access blockchain and the target blockchain include a block header, a block body, a cross-chain transaction execution area, and a cross-chain transaction request area. The block header contains the hash value of the entire generated block and references the hash value of the newly generated block of other blockchains in the multi-chain cross-chain scenario. The block body contains the block headers of transactions within the current chain and transactions executed within the current chain. The cross-chain transaction execution area stores transactions from other blockchains that have been executed in this block; The cross-chain transaction request area stores transactions in this block that need to be completed in other blockchains.
8. A control system based on the dynamic control method for inter-chain interaction load according to claim 1, characterized in that: include: The transaction request module is used when cross-chain business is generated. The business end communicates with the access blockchain and submits cross-chain business transactions; The load monitoring module is used to access the blockchain to receive cross-chain business transactions, confirm the target blockchain of the transaction through the cross-chain information interface and obtain the load information of the target blockchain; and to measure the load level of the target blockchain based on the obtained target blockchain load information; The execution mode selection module is used to select the execution mode from cross-chain call or access switching based on the load level of the target blockchain; The cross-chain business execution module is used to select the execution method and complete the execution of cross-chain business.
Citation Information
Patent Citations
Method for improving business data transmission quality and business data transmission device
CN101471759A
Cross-chain network bridge construction method based on heterogeneous blockchain
CN113194141A