Multi-alliance chain collaboration method and device, computer equipment, readable storage medium and program product
By establishing a multi-consortium blockchain network and building a public query platform, the high costs of consortium blockchain expansion and data isolation have been solved, enabling secure sharing and data verification, and improving the practicality and resistance to malicious behavior of blockchain.
Patent Information
- Application Number
- CN202511776283.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-10
AI Technical Summary
Existing consortium blockchains have high costs for block expansion and data isolation, and it is difficult to protect user rights when consensus nodes collude to cause harm.
By establishing a multi-consortium blockchain network, using relay nodes or middleware to establish communication connections, employing standardized interface protocols and unified data structures, asynchronously synchronizing block headers and transaction digests, dynamically adjusting the cross-chain message sending rate, and building a public query platform for data verification.
It enables secure sharing and data verification of consortium blockchains across different fields, improves the overall usability and user experience of blockchain, and enhances the adaptability and resistance to malicious behavior of the consortium network.
Smart Images

Figure CN121509504A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for multi-consortium blockchain collaboration. Background Technology
[0002] Currently, the main application of blockchain technology is consortium blockchains, which have a wide range of applications, including copyright protection, audit tracking, and anti-counterfeiting verification.
[0003] However, existing consortium blockchains have some limitations. On the one hand, due to the structure of the blocks themselves, it is difficult to extend the blocks in the future, and organizers need to pay higher costs to isolate data. On the other hand, if the blockchain is not maintained or consensus nodes collude to cause harm, users will find it difficult to protect their own rights. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for multi-consortium blockchain collaboration that can improve the security and stability of blockchain, addressing the aforementioned technical issues.
[0005] Firstly, this application provides a multi-consortium blockchain collaboration method, including:
[0006] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0007] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0008] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0009] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0010] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0011] In one embodiment, the relay node is an independently operating third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of the stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0012] In one embodiment, the public query platform is a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing the block header and transaction summary to the public query platform includes:
[0013] The block header and transaction digest are hashed, and the resulting hash value is associated with the underlying identifier for uploading to a public query platform.
[0014] In one embodiment, the cross-chain message sending rate of each consortium blockchain is adjusted by a preset dynamic adjustment formula, including:
[0015] For any consortium blockchain, if the number of transmissions of the consortium blockchain exceeds a first preset multiple of the median number of transmissions of all consortium blockchains, the product of the median number of transmissions of all consortium blockchains and the first preset coefficient is used as the adjusted transmission rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1.
[0016] If the number of times a consortium blockchain receives data exceeds a second preset multiple of the median number of times all consortium blockchains receive data, the product of the median number of times all consortium blockchains send data and the second preset coefficient is used as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0017] In one embodiment, when the consortium blockchain simultaneously meets the triggering conditions of both the penalty rule and the reward rule, the preset dynamic adjustment formula is:
[0018]
[0019] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0020] In one embodiment, the method further includes:
[0021] When users need to verify the integrity or existence of data on the consortium blockchain, they can obtain the hash value corresponding to the data through a public query platform; the hash value includes at least one of the block header hash value or the transaction digest hash value;
[0022] Based on the Merkle tree verification mechanism, a request is made to the consortium blockchain to which the data belongs or other consortium blockchains to obtain the Merkle path corresponding to the hash value;
[0023] The validity of the hash value is verified by using the Merkel path to determine the integrity and existence of the target data.
[0024] Secondly, this application also provides a multi-consortium blockchain collaborative device, comprising:
[0025] The module is used to build a multi-consortium blockchain network. Each consortium blockchain establishes a communication connection through a relay node or middleware, and adopts a standardized interface protocol, unified data structure and message format to achieve data exchange between heterogeneous blockchains. The message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID.
[0026] The building module is used to construct a public query platform, where each consortium blockchain periodically synchronizes block headers and transaction summaries to the public query platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0027] The statistics module is used to set the initial sending rate of cross-chain messages for each consortium blockchain and to count the number of cross-chain messages sent and received for each consortium blockchain in real time.
[0028] The calculation module is used to summarize the number of sends and receives of all consortium chains according to a preset period. Based on the number of sends and receives of all consortium chains, it calculates the median number of sends of all consortium chains and the median ratio of the ratio between the number of receives and the number of sends of each consortium chain.
[0029] The adjustment module is used to adjust the cross-chain message sending rate of each consortium blockchain based on the number of sends, the number of receives, the median number of sends, and the median ratio, using a preset dynamic adjustment formula.
[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0031] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0032] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0033] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0034] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0035] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0037] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0038] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0039] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0040] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0041] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0042] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0043] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0044] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0045] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0046] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0047] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0048] The aforementioned multi-consortium blockchain collaboration method, apparatus, computer equipment, computer-readable storage medium, and computer program products establish a multi-consortium blockchain network. Each consortium blockchain establishes a communication connection through relay nodes or middleware, employing standardized interface protocols, unified data structures, and message formats to achieve data exchange between heterogeneous chains. The message format includes message type, message payload, source chain ID, target chain ID, and source chain sending round ID. A public query platform is constructed, where each consortium blockchain periodically synchronizes block headers and transaction summaries. Data synchronization between different consortium blockchains is performed asynchronously. The process does not transmit specific transaction content or sensitive data; it sets the initial sending rate of cross-chain messages for each consortium chain, and counts the number of cross-chain messages sent and received for each consortium chain in real time; it summarizes the sending and receiving counts of all consortium chains at a preset period, and calculates the median number of sending counts and the median ratio between the number of receiving counts and the number of sending counts for each consortium chain based on the sending and receiving counts of all consortium chains; based on the sending counts, receiving counts, median sending counts, and median ratios, it adjusts the cross-chain message sending rate of each consortium chain using a preset dynamic adjustment formula. By building a multi-consortium chain alliance network, consortium chains from different fields can be interconnected, thereby achieving secure sharing; by building a public query platform, users can verify the existence and integrity of data on any consortium chain, thereby improving the overall usability and user experience of the blockchain; by dynamically adjusting the sending rate of each consortium chain according to the number of cross-chain message sending and receiving counts of each consortium chain, it can increase the adaptability of the alliance network and effectively prevent malicious behavior by a single chain or a few nodes. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a diagram illustrating the application environment of a multi-consortium blockchain collaboration method in one embodiment.
[0051] Figure 2 This is a flowchart illustrating a multi-consortium blockchain collaboration method in one embodiment;
[0052] Figure 3 This is a flowchart illustrating a multi-consortium blockchain collaboration method in another embodiment;
[0053] Figure 4 This is a structural block diagram of a multi-consortium blockchain collaborative device in one embodiment;
[0054] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0056] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0057] The multi-consortium blockchain collaboration method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on a cloud or other network server. Specifically, terminal 102 or server 104 implements a multi-consortium blockchain collaboration method, which includes:
[0058] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0059] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0060] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0061] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0062] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0063] Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0064] In one exemplary embodiment, such as Figure 2 As shown, a multi-consortium blockchain collaboration method is provided, which can be applied to... Figure 1 Taking the server in the example, the explanation includes the following steps 202 to 210. Wherein:
[0065] Step 202: Establish a multi-consortium blockchain network; wherein, each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts a standardized interface protocol, unified data structure and message format to realize data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID.
[0066] Among them, relay nodes or middleware are responsible for the actual communication and verification work. Relay nodes can be independently running third-party services or nodes jointly maintained by participating chains. Standardized interface protocols include methods for establishing connections between heterogeneous chains, methods for packaging and parsing messages, and methods for handling errors and timeouts.
[0067] Among them, message type is used to distinguish different business intentions; message load refers to the core business data; source chain ID and target chain ID are unique chain identifiers; it is used for routing and addressing of relay nodes to ensure that messages can be delivered correctly; source chain sending round ID is used to locate the historical state of the source chain to obtain and verify proof, while ensuring the processing order of messages.
[0068] For example, relay nodes or middleware are used to facilitate data exchange between different consortium chains. At the same time, in heterogeneous cross-chain communication, a broad and standardized interface protocol is selected to realize data exchange between different chains, and a unified data structure and message format are adopted to simplify cross-chain communication. The message format includes message type, message payload, source chain ID, target chain ID, and source chain sending round ID.
[0069] Step 204: Construct a public query platform, where each consortium blockchain periodically synchronizes its block headers and transaction summaries to the public query platform; however, data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0070] The public query platform is used to view and verify the data of each chain.
[0071] For example, each participating chain jointly builds a public query platform. Simultaneously, each chain periodically synchronizes information to enable interconnection between them. Specifically, each consortium chain periodically synchronizes block headers and transaction summaries to the query website, excluding specific transaction content or sensitive data. The synchronization frequency can be adjusted based on actual needs, such as daily or weekly, without specific limitations. Furthermore, different consortium chains can perform data synchronization asynchronously, ensuring that the synchronization efficiency between chains is not affected.
[0072] Step 206: Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time.
[0073] For example, the initial sending rate of cross-chain messages for each consortium chain is set, and the number of times cross-chain messages are sent and received for each chain is counted in real time to calculate the sending and receiving status of each chain.
[0074] Step 208: Summarize the number of sends and receives for all consortium blockchains according to a preset period. Based on the number of sends and receives for all consortium blockchains, calculate the median number of sends for all consortium blockchains and the median ratio between the number of receives and the number of sends for each consortium blockchain.
[0075] For example, the number of times all consortium chains send and receive messages is periodically summarized according to a preset period. Based on the number of times all consortium chains send and receive messages, the median number of times all consortium chains send messages is calculated. The ratio between the number of times cross-chain messages are received and sent is calculated for each consortium chain to obtain the storage ratio of each consortium chain. The median of the ratio between the number of times consortium chains receive messages and send messages is then calculated for the storage ratio of each consortium chain.
[0076] Step 210: Based on the number of sends, the number of receives, the median number of sends, and the median ratio, adjust the cross-chain message sending rate of each consortium chain using a preset dynamic adjustment formula.
[0077] For example, based on the number of cross-chain messages sent and received by each consortium blockchain, as well as the median number of messages sent and the median storage ratio, the sending rate of cross-chain messages for each consortium blockchain is adjusted according to a preset dynamic adjustment formula. This includes limiting the sending rate of a consortium blockchain when the number of cross-chain messages sent by it is significantly higher than that of other blockchains; rewarding the sending rate of a consortium blockchain when the number of cross-chain messages received by it is significantly higher than that of other blockchains; and smoothly adjusting the sending rate of a consortium blockchain when both the number of cross-chain messages sent and received by it are significantly higher than those of other blockchains.
[0078] In the aforementioned multi-consortium blockchain collaboration method, by establishing a multi-consortium blockchain alliance network, consortium blockchains from different fields can be interconnected to achieve secure sharing; by building a public query platform, users can verify the existence and integrity of data on any consortium blockchain, thereby improving the overall usability and user experience of the blockchain; by dynamically adjusting the sending rate of each consortium blockchain according to the number of cross-chain messages sent and received, the adaptability of the alliance network can be increased, effectively preventing malicious behavior by a single blockchain or a few nodes.
[0079] In one embodiment, the relay node is an independently operating third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0080] The interoperability protocol includes transaction formats, verification rules, and consensus rules to ensure that each consortium blockchain can understand and process data from other blockchains.
[0081] For example, when building a multi-consortium blockchain network, the consortium blockchains establish communication connections through relay nodes or middleware. These relay nodes can be independently operating third-party service nodes or shared nodes jointly maintained by the consortium blockchains. In heterogeneous cross-chain operations, the selected standardized interface protocol can be the JSON-RPC protocol or the gRPC protocol, thereby ensuring that different consortium blockchains can efficiently convert data.
[0082] For example, for consortium blockchains with a privacy level higher than the preset level, a simplified interoperability protocol can be used to transmit the hash values of stable blocks on the chain to the outside world. This interoperability protocol only focuses on cross-chain messages and does not design block headers and block transaction digests.
[0083] In this embodiment, for consortium blockchains with a privacy level higher than the preset level, the security of consortium blockchain data can be guaranteed by simplifying the interoperability protocol, thereby achieving secure sharing.
[0084] In one embodiment, the public query platform is a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing the block header and transaction digest to the public query platform includes: hashing the block header and transaction digest, associating the resulting hash value with the basic identifier, and uploading it to the public query platform.
[0085] For example, when cross-chain queries are required, users need a public query platform. This public query platform can be a blockchain query website maintained separately by each consortium blockchain, or it can be a unified query platform jointly built by all consortium blockchains. This public query platform can provide a transparent interface for viewing and verifying the data of each consortium blockchain.
[0086] For example, each consortium blockchain needs to periodically synchronize information, hash the block header and transaction digest, associate the resulting hash value with the base identifier, and periodically synchronize the associated data to a public query platform. This data does not contain specific transaction content or sensitive data. Furthermore, the synchronization frequency can be adjusted according to actual needs, such as daily or weekly, without specific limitations. Additionally, different consortium blockchains can perform data synchronization asynchronously, thus not affecting the synchronization efficiency between them.
[0087] In this embodiment, by building a public query platform through various consortium blockchains, the credibility and traceability of data can be improved, as well as the efficiency of querying and verification. By hashing the block header and transaction digest and associating the resulting hash value with the basic identifier, efficient and secure data integrity verification can be achieved, increasing user trust.
[0088] In one embodiment, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula, including: for any consortium blockchain, if the number of times the consortium blockchain sends messages exceeds a first preset multiple of the median number of times all consortium blockchains send messages, the product of the median number of times all consortium blockchains send messages and a first preset coefficient is used as the adjusted sending rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1; if the number of times the consortium blockchain receives messages exceeds a second preset multiple of the median number of times all consortium blockchains receive messages, the product of the median number of times all consortium blockchains send messages and a second preset coefficient is used as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0089] The first preset coefficient is the transmission rate adjustment factor; the second preset coefficient is the storage ratio adjustment factor.
[0090] For example, based on the aggregated transmission counts of each consortium blockchain, the median transmission count of all consortium blockchains is obtained. For any consortium blockchain, when its transmission count is significantly higher than that of other blockchains, and the ratio of its transmission count to that of other blockchains is greater than a first preset multiple, the product of the median transmission count of all consortium blockchains and a first preset coefficient is used as the adjusted transmission rate of that consortium blockchain to limit its transmission rate. The first preset coefficient is greater than 0 and less than 1; for example, it can be 0.5, without specific limitation. The adjusted transmission rate of the consortium blockchain in this case is:
[0091]
[0092] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the median number of times all chains are sent.
[0093] For example, based on the aggregated reception counts of each consortium blockchain, for any given consortium blockchain, when its reception count is significantly higher than other blockchains, and the ratio of its reception count to the reception counts of other blockchains is greater than a second preset multiple, the product of the median of the reception counts of all consortium blockchains and the second preset coefficient is used as the adjusted transmission rate for that consortium blockchain, thus rewarding its transmission rate. The second preset coefficient is greater than 1; for example, it can be 2, without specific limitation. In this case, the adjusted transmission rate of the consortium blockchain is:
[0094]
[0095] in, Indicates the first The current transmission rate of the chain. This represents the second preset coefficient. This represents the median number of times all chains are sent.
[0096] For example, based on the aggregated send and receive counts of each consortium blockchain, the median ratio of the send to receive counts for all consortium blockchains is obtained. When a consortium blockchain simultaneously meets the trigger conditions of both the penalty and reward rules, the preset dynamic adjustment formula is:
[0097]
[0098] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0099] In this embodiment, the cross-chain message sending rate of each consortium blockchain is dynamically adjusted based on the number of times cross-chain messages are sent and received. This optimizes resource allocation, improves overall efficiency, and ensures the stability of the multi-consortium blockchain network, thereby achieving more equitable cross-chain collaboration.
[0100] In one embodiment, the method further includes: when a user needs to verify the integrity or existence of data on a consortium blockchain, obtaining the hash value corresponding to the data through a public query platform; the hash value includes at least one of a block header hash value or a transaction digest hash value; based on the Merkle tree verification mechanism, requesting the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains; verifying the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0101] For example, when a user needs to verify the integrity or existence of data on a consortium blockchain, they initiate a query to a public query platform. The public query platform retrieves the block header hash or transaction digest hash corresponding to the data from the database and returns the retrieved hash to the user. Based on the Merkle tree verification mechanism, the user requests the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains, and verifies the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0102] In this embodiment, by using the Merkle tree verification mechanism to verify the validity of the hash value, efficient and secure data verification can be achieved, thereby ensuring the integrity of the data and the efficiency of data verification.
[0103] like Figure 3 As shown, a specific embodiment illustrates a multi-consortium blockchain collaboration method, including steps 302 to 308. Wherein,
[0104] Step 302: Establish a multi-consortium blockchain alliance network.
[0105] Specifically, communication connections between consortium blockchains are established through relay nodes or middleware. These relay nodes can be independently operating third-party service nodes or shared nodes jointly maintained by various consortium blockchains. Standardized interface protocols, unified data structures, and message formats are adopted to achieve data exchange between heterogeneous chains. The standardized interface protocol can be JSON-RPC or gRPC, and the message format includes message type, message payload, source chain ID, target chain ID, and source chain sending round ID.
[0106] Step 304: Build a public query platform, where each consortium blockchain will periodically synchronize block headers and transaction summaries to the public query platform.
[0107] Specifically, when cross-chain queries are required, users need a public query platform. This public query platform can be a blockchain query website maintained separately by each consortium blockchain, or it can be a unified query platform jointly built by all consortium blockchains. This public query platform can provide a transparent interface for viewing and verifying data from each consortium blockchain.
[0108] Each consortium blockchain needs to periodically synchronize information, hashing the block header and transaction digest, associating the resulting hash value with a basic identifier, and periodically synchronizing the associated data to a public query platform. This data does not contain specific transaction content or sensitive information. The synchronization frequency can be adjusted according to actual needs, such as daily or weekly, without specific limitations. Furthermore, different consortium blockchains can perform data synchronization asynchronously, thus not affecting the synchronization efficiency between them.
[0109] Step 306: Set the initial sending rate of cross-chain messages for each consortium chain, and dynamically adjust the sending rate of cross-chain messages for each consortium chain based on the number of times all consortium chains send and receive messages according to a preset period.
[0110] Specifically, assuming there are three consortium blockchains A, B, and C, the initial sending rate of cross-chain messages for each consortium blockchain is set as follows: Calculate the number of times each consortium blockchain sends data within a given period. , , and number of receptions , , .
[0111] Assuming the number of transmissions by each consortium blockchain , , and the number of times received , , Calculate the median number of sends across all consortium blockchains. And the median of the ratio between the number of times each affiliate link receives data and the number of times it sends data. .
[0112] If the first preset multiplier is set to 3, the number of transmissions on consortium chain A is significantly higher than on other chains, and the number of transmissions on consortium chain A is... When the ratio of the number of sends to other chains is greater than 3, the median number of sends across all consortium chains is... With the first preset coefficient The product of these two values serves as the adjusted sending rate for consortium blockchain A. To limit the transmission rate of the consortium blockchain, if the first preset coefficient... If we set it to 0.5, then the adjusted sending rate of consortium chain A is:
[0113]
[0114] If the second preset multiplier is set to 3, the number of acceptances on consortium chain A is significantly higher than on other chains, and the number of acceptances on consortium chain A is... When the ratio of the number of receptions to other chains is greater than 3, the median number of transmissions across all consortium chains is... With the second preset coefficient The product of these two values serves as the adjusted sending rate for consortium blockchain A. To limit the transmission rate of the consortium blockchain, if the second preset coefficient... If we set it to 2, then the adjusted sending rate of consortium chain A is:
[0115]
[0116] If consortium blockchain A simultaneously meets the trigger conditions of both the penalty rule and the reward rule, then the adjusted sending rate of consortium blockchain A will be:
[0117]
[0118] Step 308: Verify the integrity or existence of data on the consortium blockchain based on the Merkle tree verification mechanism.
[0119] Specifically, when a user needs to verify the integrity or existence of data on a consortium blockchain, they initiate a query to a public query platform. This platform retrieves the block header hash or transaction digest hash corresponding to the data from its database and returns the retrieved hash to the user. Based on the Merkle tree verification mechanism, the user requests the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or from other consortium blockchains, and verifies the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0120] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0121] Based on the same inventive concept, this application also provides a multi-consortium blockchain collaboration device for implementing the multi-consortium blockchain collaboration method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more multi-consortium blockchain collaboration device embodiments provided below can be found in the limitations of the multi-consortium blockchain collaboration method described above, and will not be repeated here.
[0122] In one exemplary embodiment, such as Figure 4 As shown, a multi-consortium blockchain collaborative device is provided, including: a component module 402, a construction module 404, a statistics module 406, a calculation module 408, and an adjustment module 410, wherein:
[0123] Module 402 is used to build a multi-consortium blockchain network. Each consortium blockchain establishes a communication connection through a relay node or middleware, and adopts a standardized interface protocol, unified data structure and message format to realize data exchange between heterogeneous blockchains. The message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID.
[0124] Module 404 is used to build a public query platform, where each consortium blockchain periodically synchronizes block headers and transaction summaries to the public query platform; data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0125] The statistics module 406 is used to set the initial sending rate of cross-chain messages for each consortium chain and to count the number of cross-chain messages sent and received for each consortium chain in real time.
[0126] The calculation module 408 is used to summarize the number of transmissions and receptions of all consortium chains according to a preset period, and calculate the median number of transmissions of all consortium chains and the median ratio of the ratio of the number of receptions to the number of transmissions of each consortium chain based on the number of transmissions and receptions of all consortium chains.
[0127] The adjustment module 410 is used to adjust the cross-chain message sending rate of each consortium chain based on the number of sending, the number of receiving, the median number of sending, and the median ratio, using a preset dynamic adjustment formula.
[0128] In one embodiment, the component module is further configured to use relay nodes that are independently operating third-party service nodes or shared nodes jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; wherein, for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash values of stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0129] In one embodiment, the construction module is also used to publicly query the blockchain query website maintained by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; to synchronize the block header and transaction digest to the public query platform, including: hashing the block header and transaction digest, associating the resulting hash value with the basic identifier, and uploading it to the public query platform.
[0130] In one embodiment, the adjustment module is further configured to adjust the cross-chain message sending rate of each consortium blockchain using a preset dynamic adjustment formula, including: for any consortium blockchain, if the number of times the consortium blockchain sends messages exceeds a first preset multiple of the median number of times all consortium blockchains send messages, the product of the median number of times all consortium blockchains send messages and a first preset coefficient is used as the adjusted sending rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1; if the number of times the consortium blockchain receives messages exceeds a second preset multiple of the median number of times all consortium blockchains receive messages, the product of the median number of times all consortium blockchains send messages and a second preset coefficient is used as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0131] In one embodiment, the adjustment module is further configured to preset a dynamic adjustment formula when the triggering conditions of both the penalty rule and the reward rule are met simultaneously in the consortium blockchain:
[0132]
[0133] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0134] In one embodiment, the construction module is further configured to obtain the hash value corresponding to the data through a public query platform when the user needs to verify the integrity or existence of data on the consortium blockchain; the hash value includes at least one of the block header hash value or transaction digest hash value; based on the Merkle tree verification mechanism, request the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains; verify the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0135] Each module in the aforementioned multi-chain collaborative device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0136] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a multi-chain collaborative method.
[0137] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0139] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0140] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0141] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0142] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0143] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0144] In one embodiment, when the processor executes the computer program, it also implements the following steps: the relay node is an independently running third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; wherein, for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of the stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0145] In one embodiment, when the processor executes the computer program, it also performs the following steps: the public query platform is a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing the block header and transaction digest to the public query platform includes: hashing the block header and transaction digest, associating the resulting hash value with the basic identifier, and uploading it to the public query platform.
[0146] In one embodiment, when the processor executes the computer program, it further implements the following steps: adjusting the cross-chain message sending rate of each consortium blockchain using a preset dynamic adjustment formula, including: for any consortium blockchain, if the number of times the consortium blockchain sends messages exceeds a first preset multiple of the median number of times all consortium blockchains send messages, using the product of the median number of times all consortium blockchains send messages and a first preset coefficient as the adjusted sending rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1; if the number of times the consortium blockchain receives messages exceeds a second preset multiple of the median number of times all consortium blockchains receive messages, using the product of the median number of times all consortium blockchains send messages and a second preset coefficient as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0147] In one embodiment, when the processor executes the computer program, it further performs the following steps: When the consortium blockchain simultaneously meets the triggering conditions of both the penalty rule and the reward rule, a preset dynamic adjustment formula is established:
[0148]
[0149] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0150] In one embodiment, when the processor executes the computer program, it further performs the following steps: when a user needs to verify the integrity or existence of data on a consortium blockchain, it obtains the hash value corresponding to the data through a public query platform; the hash value includes at least one of a block header hash value or a transaction digest hash value; based on the Merkle tree verification mechanism, it requests the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains; and verifies the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0151] The implementation principle and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be repeated here.
[0152] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0153] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0154] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0155] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0156] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0157] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0158] In one embodiment, when the computer program is executed by the processor, it also implements the following steps: the relay node is an independently running third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; wherein, for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of the stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0159] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the public query platform is a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing the block header and transaction digest to the public query platform includes: hashing the block header and transaction digest, associating the resulting hash value with the basic identifier, and uploading it to the public query platform.
[0160] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: adjusting the cross-chain message sending rate of each consortium blockchain using a preset dynamic adjustment formula, including: for any consortium blockchain, if the number of times the consortium blockchain sends messages exceeds a first preset multiple of the median number of times all consortium blockchains send messages, using the product of the median number of times all consortium blockchains send messages and a first preset coefficient as the adjusted sending rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1; if the number of times the consortium blockchain receives messages exceeds a second preset multiple of the median number of times all consortium blockchains receive messages, using the product of the median number of times all consortium blockchains send messages and a second preset coefficient as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0161] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: When the consortium blockchain simultaneously meets the triggering conditions of both the penalty rule and the reward rule, the preset dynamic adjustment formula is:
[0162]
[0163] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0164] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when a user needs to verify the integrity or existence of data on a consortium blockchain, it obtains the hash value corresponding to the data through a public query platform; the hash value includes at least one of a block header hash value or a transaction digest hash value; based on the Merkle tree verification mechanism, it requests the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains; and verifies the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0165] The implementation principle and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be repeated here.
[0166] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0167] Establish a multi-consortium blockchain network; where each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts standardized interface protocols, unified data structures and message formats to achieve data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID;
[0168] A public query platform is built, where each consortium blockchain regularly synchronizes its block headers and transaction summaries to the platform. Data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process.
[0169] Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time;
[0170] The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated.
[0171] Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
[0172] In one embodiment, when the computer program is executed by the processor, it also implements the following steps: the relay node is an independently running third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; wherein, for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of the stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
[0173] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the public query platform is a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing the block header and transaction digest to the public query platform includes: hashing the block header and transaction digest, associating the resulting hash value with the basic identifier, and uploading it to the public query platform.
[0174] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: adjusting the cross-chain message sending rate of each consortium blockchain using a preset dynamic adjustment formula, including: for any consortium blockchain, if the number of times the consortium blockchain sends messages exceeds a first preset multiple of the median number of times all consortium blockchains send messages, using the product of the median number of times all consortium blockchains send messages and a first preset coefficient as the adjusted sending rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1; if the number of times the consortium blockchain receives messages exceeds a second preset multiple of the median number of times all consortium blockchains receive messages, using the product of the median number of times all consortium blockchains send messages and a second preset coefficient as the adjusted sending rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
[0175] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: When the consortium blockchain simultaneously meets the triggering conditions of both the penalty rule and the reward rule, the preset dynamic adjustment formula is:
[0176]
[0177] in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
[0178] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when a user needs to verify the integrity or existence of data on a consortium blockchain, it obtains the hash value corresponding to the data through a public query platform; the hash value includes at least one of a block header hash value or a transaction digest hash value; based on the Merkle tree verification mechanism, it requests the Merkle path corresponding to the hash value from the consortium blockchain to which the data belongs or other consortium blockchains; and verifies the validity of the hash value through the Merkle path to determine the integrity and existence of the target data.
[0179] The implementation principle and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be repeated here.
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0181] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0183] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A multi-consortium blockchain collaboration method, characterized in that, The method includes: A multi-consortium blockchain network is established, wherein each consortium blockchain establishes a communication connection through relay nodes or middleware, and adopts a standardized interface protocol, unified data structure and message format to realize data exchange between heterogeneous blockchains; the message format includes message type, message payload, source chain ID, target chain ID and source chain sending round ID; A public query platform is constructed, and each consortium blockchain periodically synchronizes its block headers and transaction summaries to the public query platform; however, data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process. Set the initial sending rate of cross-chain messages for each consortium blockchain, and count the number of cross-chain messages sent and received for each consortium blockchain in real time; The number of sends and receives of all consortium blockchains is summarized according to a preset period. Based on the number of sends and receives of all consortium blockchains, the median number of sends of all consortium blockchains and the median ratio of the ratio of the number of receives to the number of sends of each consortium blockchain are calculated. Based on the number of sends, the number of receives, the median number of sends, and the median ratio, the cross-chain message sending rate of each consortium blockchain is adjusted using a preset dynamic adjustment formula.
2. The method according to claim 1, characterized in that, The relay node is an independently operating third-party service node or a shared node jointly maintained by various consortium blockchains; the standardized interface protocol is the JSON-RPC protocol or the gRPC protocol; for consortium blockchains with a privacy level higher than the preset level, only a simplified interoperability protocol is used to transmit the hash value of stable blocks on the chain to the outside world; the simplified interoperability protocol only defines the core fields of cross-chain messages and does not define the block header and block transaction digest.
3. The method according to claim 1, characterized in that, The public query platform is either a blockchain query website maintained separately by each consortium blockchain, or a unified query platform jointly built by all consortium blockchains; synchronizing block headers and transaction summaries to the public query platform includes: The block header and transaction digest are hashed, and the resulting hash value is associated with the basic identifier for uploading to the public query platform.
4. The method according to claim 1, characterized in that, The method of adjusting the cross-chain message sending rate of each consortium blockchain using a preset dynamic adjustment formula includes: For any consortium blockchain, if the number of transmissions of the consortium blockchain exceeds a first preset multiple of the median number of transmissions of all consortium blockchains, the product of the median number of transmissions of all consortium blockchains and a first preset coefficient is used as the adjusted transmission rate of the consortium blockchain to penalize it; the first preset coefficient is greater than 0 and less than 1. If the number of receptions by the consortium blockchain exceeds a second preset multiple of the median number of receptions by all consortium blockchains, the product of the median number of transmissions by all consortium blockchains and the second preset coefficient is used as the adjusted transmission rate of the consortium blockchain to reward it; the second preset coefficient is greater than 1.
5. The method according to claim 4, characterized in that, When the consortium blockchain simultaneously meets the triggering conditions of both the penalty rule and the reward rule, the preset dynamic adjustment formula is: in, Indicates the first The current transmission rate of the chain. This represents the first preset coefficient. This represents the second preset coefficient. Indicates the first The number of cross-chain message receptions for each chain. Indicates the first The number of cross-chain message sending times for each chain. This represents the median proportion of storage per chain. This represents the median number of times all chains are sent.
6. The method according to claim 1, characterized in that, The method further includes: When a user needs to verify the integrity or existence of data on the consortium blockchain, the hash value corresponding to the data can be obtained through a public query platform; the hash value includes at least one of the block header hash value or the transaction digest hash value; Based on the Merkle tree verification mechanism, a request is made to the consortium blockchain to which the data belongs or other consortium blockchains to obtain the Merkle path corresponding to the hash value; The validity of the hash value is verified using the Merkel path to determine the integrity and existence of the target data.
7. A multi-consortium blockchain collaborative device, characterized in that, The device includes: The module is used to build a multi-consortium blockchain network. Each consortium blockchain establishes a communication connection through a relay node or middleware, and uses a standardized interface protocol, unified data structure, and message format to achieve data exchange between heterogeneous blockchains. The message format includes message type, message payload, source chain ID, target chain ID, and source chain sending round ID. The module is used to build a public query platform, where each consortium blockchain periodically synchronizes block headers and transaction summaries to the public query platform; wherein, data synchronization between different consortium blockchains is performed asynchronously, and no specific transaction content or sensitive data is transmitted during the synchronization process; The statistics module is used to set the initial sending rate of cross-chain messages for each consortium blockchain and to count the number of cross-chain messages sent and received for each consortium blockchain in real time. The calculation module is used to summarize the number of sends and receives of all consortium chains according to a preset period. Based on the number of sends and receives of all consortium chains, it calculates the median number of sends of all consortium chains and the median ratio of the ratio between the number of receives and the number of sends of each consortium chain. The adjustment module is used to adjust the cross-chain message sending rate of each consortium blockchain based on the number of sends, the number of receives, the median number of sends, and the median ratio, using a preset dynamic adjustment formula.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.