A consortium chain high-concurrency cross-channel transaction processing method and system
By generating composite keys in the middle man node of the alliance chain and performing batch processing, the data conflict and transaction failure problems of the alliance chain cross-channel trading system in the high concurrency scenario are solved, and transaction processing efficiency and performance are improved.
Patent Information
- Application Number
- CN202310215196.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-03-07
AI Technical Summary
The existing cross-channel trading system of alliance chains has data conflicts and transaction failures in high concurrency scenarios, and the single-chain transaction processing performance is low, which limits the large-scale implementation and application of alliance chains.
By generating compound keys in the middleman node, multiple transactions are saved to the transaction pool, and batch processing of multiple transactions is realized through the splitting and summary statistics of compound keys, reducing the risk of concurrent conflicts.
It improves the processing efficiency of cross-channel transactions, reduces the risk of concurrent conflicts under high concurrent transactions, and improves the transaction processing performance of the alliance chain.
Smart Images

Figure CN116226283B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and specifically relates to a consortium chain high-concurrency cross-channel transaction processing method and system. Background Art
[0002] As an emerging technology, blockchain plays an important role in decentralized technologies and applications such as storage, computing, security, transactions, and interactions. Because it provides a decentralized, immutable distributed ledger, it has been applied to many fields.
[0003] With the implementation of more and more blockchain applications, the problem of network isolation is becoming more and more serious. Transaction operations on a single chain can no longer meet the actual application requirements of information transmission and value transfer. Hyperledger Fabric, a mainstream alliance chain platform at home and abroad, has obviously taken this into consideration. In its architectural design, it uses channel technology to implement a multi-chain architecture, allowing different business chains to be deployed on multiple channels. However, in order to ensure business privacy, entities outside the channel cannot access the information in the channel, and an intermediary mechanism is required to implement cross-channel communication of the alliance chain. However, the current cross-channel transaction mode based on intermediaries is one-to-one and does not support concurrent operations. This is because in complex scenarios of high-concurrency cross-channel transactions, data conflicts are prone to occur, leading to transaction failures. Compared with Internet transaction systems, the single-chain transaction processing performance of the alliance chain has always been an obstacle to its large-scale implementation. These problems are exacerbated when executing cross-channel transactions, because the cumbersome cross-channel transaction processing makes the system transaction execution less efficient.
[0004] In view of the above background and problems, more and more research has been conducted on the performance of blockchain, and the optimization of cross-channel technology performance based on alliance chain to achieve information transmission and value transfer has become one of the important research directions. However, factors such as the transaction processing of alliance chain have hindered the further development of cross-channel transaction systems based on alliance chain.
[0005] The current research focuses on realizing a cross-channel transaction processing system based on shared data among trusted intermediaries, and on this basis, provides services for cross-channel asset transfer scenarios and applications, solving the problems of value islands and channel isolation in alliance chains.
[0006] Inspired by the two-phase commit protocol, Androulaki et al. used a trusted channel to implement cross-channel transactions, requiring all participants to be able to access the channel and create and spend assets on the channel. Considering that such a trusted channel does not always exist in practice, they proposed cross-shard transactions between channels, which can be carried out without a trusted channel.
[0007] The patent "Channel allocation method, device and electronic device for cross-chain alliance chain" groups multiple external blockchains to be connected to the alliance chain, maps each group to a virtual internal blockchain set of the alliance chain, forms an alliance chain subnet, and then creates a shared data channel for all external blockchains in each alliance subnet, thereby connecting multiple external blockchains to the target alliance chain.
[0008] However, the focus of existing technologies is to achieve alliance chain performance optimization based on a single channel. Specifically, the alliance chain transaction processing system based on a single channel has the following problems:
[0009] (1) The existing solution only considers the improvement of transaction performance on a single channel when processing transactions, but does not consider the improvement of transaction performance under multiple channels. The current cross-channel transaction processing of the alliance chain is only suitable for scenarios with few and simple businesses, and does not consider cross-channel transactions in high-concurrency scenarios. The limitations of the business have affected the large-scale application of the alliance chain system.
[0010] (2) Currently, cross-channel transactions are mainly based on the middleman mechanism to achieve inter-channel communication. The two-phase lock protocol allows the middleman to process only one transaction at a time, and other transactions need to wait, which affects the improvement of the throughput of the cross-channel transaction system. Summary of the invention
[0011] In order to solve the above problems existing in the related art, the present invention provides a method and system for processing high-concurrency cross-channel transactions in a consortium chain. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0012] The present invention provides a consortium chain high-concurrency cross-channel transaction processing method, comprising:
[0013] The client initiates a transaction request according to the user operation and sends the transaction request to the target middleman node in the alliance chain network; the transaction request includes: the key of the transaction requester, the key of the transaction recipient and the transaction content; each transaction initiator corresponds to a source channel in the alliance chain network, and each transaction recipient corresponds to a target channel in the alliance chain network; different channels represent different services;
[0014] The target middleman node generates a composite key including the key of the target middleman node according to its own key and each received transaction request, and adds the composite key to the transaction pool;
[0015] The target middleman node queries multiple composite keys including the key of the target middleman node from the transaction pool, splits the multiple composite keys, and obtains transaction content included in each composite key and a target transaction recipient corresponding to each transaction content according to the splitting result;
[0016] The target middleman node determines the first total transaction content of each target transaction recipient, and sends a processing success notification to the client corresponding to each target transaction recipient;
[0017] The client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, and conducts a transaction of the first total transaction content of the target transaction recipient.
[0018] In some embodiments, the client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification to conduct a transaction of the first total transaction content of the target transaction recipient, including:
[0019] After the client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, the target channel obtains the first total transaction content from the target middleman and sends the obtained first total transaction content to the target transaction recipient.
[0020] In some embodiments, before the target channel obtains the first total transaction content from the target middleman, the method further includes:
[0021] The target channel queries the transaction pool for a composite key including the key of the target transaction recipient, and splits the queried composite key to obtain transaction content;
[0022] The target channel determines the second total transaction content of the target transaction recipient according to the split transaction content;
[0023] The target channel obtains the first total transaction content from the target middleman, including:
[0024] When the first total transaction content is the same as the second total transaction content, the target channel obtains the first total transaction content from the target intermediary.
[0025] In some embodiments, the target intermediary node generates a composite key including the key of the target intermediary node according to its own key and each received transaction request, including:
[0026] For each transaction request received, the target middleman node concatenates the key of the target middleman node, the key of the transaction requester in the transaction request, the key of the transaction recipient, and the transaction content to obtain a composite key corresponding to the transaction request.
[0027] In some embodiments, the target middleman node queries the transaction pool for multiple composite keys including the key of the target middleman node, including:
[0028] When the target middleman node does not add a composite key to the transaction pool within a first preset time period, the target middleman node queries the transaction pool for a plurality of composite keys including the key of the target middleman node.
[0029] In some embodiments, before the target intermediary node queries the transaction pool for multiple composite keys including the key of the target intermediary node, the method further includes:
[0030] The target middleman node queries the transaction pool for composite keys containing keys of the same middleman node at a preset frequency;
[0031] Merge the composite keys containing the keys of the same middleman node to obtain a shared composite key;
[0032] After all the shared composite keys of the transaction pool are obtained, the transaction pool is cleared and the shared composite keys are stored in the transaction pool.
[0033] In some embodiments, the target intermediary node determines the first total transaction content of each target transaction recipient, including:
[0034] For each target transaction recipient, the target intermediary node superimposes multiple transaction contents corresponding to the target transaction recipient to obtain a first total transaction content of the target recipient.
[0035] In some embodiments, before sending the transaction request to the target middleman node in the consortium chain network, the method further includes:
[0036] The client sends the transaction request to a source channel corresponding to the transaction initiator in the transaction request;
[0037] The source channel verifies the transaction request and feeds back the verification result to the client;
[0038] The step of sending the transaction request to a target middleman node in the alliance chain network includes:
[0039] When the verification result indicates that the verification is passed, the client sends the transaction request to a target middleman node in the alliance chain network.
[0040] The present invention also provides a consortium chain high-concurrency cross-channel transaction processing system, comprising:
[0041] The client is used to provide an interface for users to interact with the alliance chain network, and to configure and manage the alliance chain network;
[0042] The consortium chain network comprises: an intermediary institution, at least one source channel and at least one target channel; wherein the intermediary institution comprises at least one intermediary node, each of which is responsible for transaction transmission between a source channel and a corresponding target channel; the at least one intermediary node and the target channel share a transaction pool; each source channel comprises at least one transaction requester, and each target channel comprises at least one transaction receiver;
[0043] The client is further used to initiate a transaction request according to a user operation, and send the transaction request to a target middleman node in the alliance chain network; the transaction request includes: a key of the transaction requester, a key of the transaction recipient, and transaction content;
[0044] Each middleman node is used to generate a composite key containing the key of the middleman node according to its own key and each received transaction request, and add the composite key to the transaction pool; query multiple composite keys containing the key of the middleman node from the transaction pool, split the multiple composite keys, and obtain the transaction content contained in each composite key and the target transaction recipient corresponding to each transaction content according to the splitting result; determine the first total transaction content of each target transaction recipient, and send a processing success notification to the client corresponding to each target transaction recipient;
[0045] The client is further used to call the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, and conduct a transaction of the first total transaction content of the target transaction recipient.
[0046] The present invention has the following beneficial technical effects:
[0047] The present invention realizes the transformation from a single transaction processing mode to a multi-transaction processing mode under a middleman mechanism. By generating and querying a composite key, the middleman can process multiple transactions at one time, thereby improving the processing efficiency of cross-channel transactions. The composite key is used to save transactions to a transaction pool, thereby avoiding direct reading and writing of transaction parties. By summarizing and counting the composite keys, the transaction contents of multiple transactions are written at one time, thereby greatly reducing the risk of concurrency conflicts under high-concurrency transactions.
[0048] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flow chart of a consortium chain high-concurrency cross-channel transaction processing method provided by an embodiment of the present invention;
[0050] Figure 2 A member interaction diagram in an exemplary consortium chain high-concurrency cross-channel transaction processing system provided by an embodiment of the present invention;
[0051] Figure 3 A structural model diagram of an exemplary alliance chain network provided in an embodiment of the present invention;
[0052] Figure 4 An exemplary composite key construction principle diagram provided for an embodiment of the present invention;
[0053] Figure 5 An exemplary composite key reuse principle diagram provided for an embodiment of the present invention;
[0054] Figure 6 A schematic diagram of three mechanisms of an exemplary consortium chain high-concurrency cross-channel transaction processing system provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0056] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0057] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.
[0058] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0059] Figure 1 is a flow chart of a high-concurrency cross-channel transaction processing method for a consortium chain provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0060] S101. The client initiates a transaction request based on the user operation and sends the transaction request to the target middleman node in the alliance chain network; the transaction request includes: the key of the transaction requester, the key of the transaction recipient and the transaction content; each transaction initiator corresponds to a source channel in the alliance chain network, and each transaction recipient corresponds to a target channel in the alliance chain network; different channels represent different businesses.
[0061] For example, Figure 2 This is a member interaction diagram of the consortium chain high-concurrency cross-channel transaction processing system. Figure 3 This is a structural model diagram of the alliance chain network. Also refer to Figure 2 and Figure 3, the system includes a client and a consortium chain network, wherein the client is an interface for users to interact with the consortium chain network components, and is responsible for the configuration and node management of the consortium chain network (for example, the number of organizations and the number of nodes in each organization can be set), including initialization and update of configuration, start and stop of nodes, etc.; it is also responsible for the management of channels, including channel creation, update, query, etc. The consortium chain network includes: an intermediary organization, at least one source channel and at least one target channel, and the intermediary organization (intermediary group) includes at least one intermediary node. Specifically, the transaction initiator can be an account with assets in the source channel, which is the initiator of the cross-channel transaction; the transaction receiver can be an account existing on the target channel, which receives the transaction content (for example, transfer funds) from the initiator of the cross-channel transaction. The intermediary node is responsible for the transaction transmission between the source channel and the target channel, specifically including the reception of source channel transactions and the distribution of target channel transactions. The transaction pool is shared between the intermediary nodes and the target channels to ensure the consistency of multi-channel transactions. Specifically, the channel is used to achieve business isolation in the consortium chain network. An alliance can include multiple channels, such as two channels, each channel represents a business. Organizations represent entities such as enterprises and institutions in the consortium chain network. Each consortium chain network includes at least three organizational entities, one of which is an intermediary organization (Organization 3) and joins two channels respectively. The other two organizations (Organization 1 and Organization 2) are located in two channels respectively, and the intermediary organization communicates between the two channels. Peer nodes are used to maintain the ledger and chain code in the channel, process transaction proposals and responses, and maintain the latest status of the ledger by continuously applying for updated transactions. The ledger is used to store data, which specifically includes two components: the world state and the blockchain, which are responsible for recording the latest data of the blockchain and all changes that lead to the current world state.
[0062] In some embodiments, before sending the transaction request to the target middleman node in the alliance chain network, the method further includes: the client sends the transaction request to the source channel corresponding to the transaction initiator in the transaction request; the source channel verifies the transaction request and feeds back the verification result to the client; the transaction request is sent to the target middleman node in the alliance chain network, including: when the verification result indicates that the verification is passed, the client sends the transaction request to the target middleman node in the alliance chain network; otherwise, it is not sent. For example, Figure 2 The grpc request in is the transaction request sent by the client to the source channel, and the feedback execution result is the verification result fed back by the source channel to the client.
[0063] Exemplarily, the key of the transaction initiator is used to uniquely identify an account on the source channel. By querying this key, the remaining tradable content of the account (for example, the account balance) can be obtained, and the corresponding transaction content can be deducted if the remaining tradable content is sufficient. The key of the transaction receiver is used to uniquely identify an account on the target channel, and the transaction content (for example, funds) can be transferred to the account through this key. The transaction content can be the asset (funds) to be transferred in the cross-channel transaction. For example, the type is a real number greater than 0, and the total funds received by the middleman can be accumulated through this value. The middleman's key can query the total transaction content transferred in and out of the middleman's account.
[0064] Here, the target middleman node may be a middleman node arbitrarily selected by the client from a plurality of middleman nodes.
[0065] S102: The target middleman node generates a composite key including the key of the target middleman node according to its own key and each received transaction request, and adds the composite key to the transaction pool.
[0066] Specifically, for each transaction request received, the target intermediary node concatenates the key of the target intermediary node, the key of the transaction requester in the transaction request, the key of the transaction recipient, and the transaction content to obtain a composite key corresponding to the transaction request.
[0067] For example, Figure 4 The schematic diagram of composite key construction is disclosed. Figure 4 As shown, for a transaction request, the target middleman node can concatenate its own key MKey, the transaction initiator's key Key1, the transaction recipient's key Key2 and the transaction content value in sequence to obtain the composite key "MKey_Key1_Key2_value" of the transaction request, where MKey is the primary key of the composite key.
[0068] S103. The target middleman node queries multiple composite keys including the key of the target middleman node from the transaction pool, splits the multiple composite keys, and obtains the transaction content included in each composite key and the target transaction recipient corresponding to each transaction content according to the splitting result.
[0069] In some embodiments, after the target intermediary node adds a composite key to the transaction pool, and the target intermediary node does not add a composite key to the transaction pool within a first preset time period, the target intermediary node queries the transaction pool for multiple composite keys including the key of the target intermediary node.
[0070] Exemplarily, the first preset time period can be set according to actual needs, such as 30 seconds or 10 seconds, etc.; in this way, the target intermediary node can process multiple transaction requests together after receiving all the transaction requests, thereby improving processing efficiency.
[0071] In some embodiments, before the target middleman node queries multiple composite keys containing the key of the target middleman node from the transaction pool, composite key reuse can also be performed, which is specifically manifested as follows: before the target middleman node queries multiple composite keys containing the key of the target middleman node from the transaction pool, the target middleman node queries the composite keys containing the keys of the same middleman node from the transaction pool at a preset frequency; the composite keys containing the keys of the same middleman node are merged to obtain a shared composite key; after obtaining all the shared composite keys of the transaction pool, the transaction pool is cleared, and the shared composite keys are stored in the transaction pool.
[0072] For example, Figure 5 This is a schematic diagram of the composite key reuse, where tx1, tx2, and tx3 are three transactions initiated by the transaction requester O1 to three different transaction recipients D1, D2, and D3, and Figure 5 It also includes another transaction initiated by the transaction requester O1 to the transaction receiver D1; the transaction contents corresponding to these four transactions are V1, V2, V3, and V4, and the four composite keys corresponding to these four transactions are stored in the transaction pool, and M1 is the target middleman node. The target middleman node M1 can aggregate and reuse the composite keys corresponding to these four transactions to obtain a shared composite key "O1-M1:{D1:V1+V4; D2:V2; D3:V3}", and delete these four composite keys in the transaction pool, and store the generated shared composite key in the transaction pool. Since the composite key transaction pool is traversed and the composite keys with the same primary key are merged according to the connection between the primary keys of the composite key, a shared composite key can store multiple transactions, thereby improving the reusability of the composite key.
[0073] S104: The target intermediary node determines the first total transaction content of each target transaction recipient, and sends a processing success notification to the client corresponding to each target transaction recipient.
[0074] Specifically, for each target transaction recipient, the target intermediary node superimposes multiple transaction contents corresponding to the target transaction recipient to obtain a first total transaction content of the target recipient.
[0075] S105. The client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, and conducts a transaction of the first total transaction content of the target transaction recipient.
[0076] In some embodiments, after the client calls the smart contract on the target channel corresponding to the target transaction recipient based on the successful processing notification, the target channel obtains the first total transaction content from the target intermediary and sends the obtained first total transaction content to the target transaction recipient.
[0077] In some embodiments, before the target channel obtains the first total transaction content from the target middleman, the target channel may also query the composite key containing the key of the target transaction recipient from the transaction pool, and split the queried composite key to obtain the transaction content; the target channel determines the second total transaction content of the target transaction recipient based on the split transaction content, and when the first total transaction content is the same as the second total transaction content, the target channel obtains the first total transaction content from the target middleman, and sends the obtained first total transaction content to the target transaction recipient, thereby realizing the distribution of the transaction. For example, Figure 2 As shown, after the target transaction party receives the first total transaction content, it will feedback the final result to the corresponding client.
[0078] According to the above method, the above system can be composed of three different mechanisms, such as Figure 6 As shown, these three mechanisms include:
[0079] Transaction preprocessing mechanism: Get the transaction request to construct a composite key instead of directly reading and writing the account, and then add the composite key to the transaction pool queue for subsequent unified batch processing;
[0080] Incremental accumulation mechanism: By splitting the composite key, the change in the transaction content (for example, transaction amount) of the middleman account is obtained, and the change is accumulated to obtain the final change value, which is written into the ledger at one time to avoid data conflicts caused by direct reading and writing to the middleman for each transaction under high concurrency, resulting in transaction failure;
[0081] Cross-channel transaction query mechanism: The target channel queries the existing transactions on the source channel through the cross-channel query function. In this way, the target channel and the source channel transactions can be synchronized to avoid the occurrence of inconsistent transaction information between the source channel and the target channel.
[0082] A processing flow of high-concurrency transactions in a cross-channel transaction processing system is provided below to exemplify the method provided by the present invention.
[0083] (1) Different users concurrently initiate cross-channel asset transfer transaction requests through the client Go coroutine. The client uses the transaction pool to queue these requests and randomly selects a middleman from the middleman group to process the transaction. Then, the Go SDK, a software development tool through the consortium chain, is used to concurrently send this batch of transactions to the source channel. The source channel verifies the legitimacy of the user's transaction request, including whether the account exists and whether the balance is sufficient. If the verification fails, the failure result will be fed back to the client. Only if the verification passes will the initiator's account balance be deducted.
[0084] (2) The middleman node creates a composite key based on the transaction information and adds it to the transaction pool. The middleman key is used as the fuzzy query primary key to traverse the transaction pool to obtain all composite keys containing the primary key. The composite keys in the query result set are split, and all transaction amounts transferred to the middleman are obtained and accumulated to obtain the final transfer amount. The middleman account is updated for the last time, and a successful result is fed back to the client.
[0085] (3) After receiving the success notification, the client calls the smart contract on the target channel to perform the final asset transfer. Specifically, it calls the cross-channel query function to obtain all the composite keys on the source channel and the final transfer amount received by the middleman.
[0086] (4) The target channel deducts the asset value of the corresponding value from the intermediary account, traverses the cross-channel query composite key result set, obtains the target account and transaction amount, and then calculates the transfer amount based on the conversion rate of the two assets and updates the target account, and returns the result to the client.
[0087] Through the above (2)-(3), the model of the alliance chain cross-channel transaction processing system and the multi-transaction processing mode are designed. The model includes transaction preprocessing mechanism, incremental accumulation mechanism and cross-channel query mechanism, which are responsible for different functional modules and realize the transformation from the middleman mechanism order transaction processing mode to the multi-transaction processing mode. The cross-channel transaction processing system has clear functional modules and is easy to maintain. With the batch processing design, the middleman can process multiple transactions at a time, which is convenient for improving the efficiency of cross-channel transaction processing.
[0088] Through the above (4)-(6), the network model and composite key construction of the cross-channel transaction system, as well as the composite key reuse method, are designed. Combined with the cross-channel transaction processing model, the composite key records the relevant account keys and transaction amounts involved in each transaction request. Through the composite key reuse method, a shared composite key can record multiple transaction information, reducing storage overhead and narrowing the scope of the query key.
[0089] Through the above (7), a high-concurrency processing process of the alliance chain cross-channel transaction system is designed. When a transaction is initiated concurrently, the composite key technology is used to save the transaction to the transaction pool to avoid direct reading and writing of the transaction account. By summarizing the composite key, the accumulated results of the amounts of multiple transactions are written at once, which well ensures that no concurrency conflicts will occur under high-concurrency transactions. The high-concurrency transaction processing process enables the system to have good transaction performance.
[0090] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A high-concurrency cross-channel transaction processing method for a consortium chain, characterized in that: include: The client initiates a transaction request based on the user's operation and sends the transaction request to the target middleman node in the alliance chain network; The transaction request includes: the key of the transaction requester, the key of the transaction recipient and the transaction content; each transaction initiator corresponds to a source channel in the alliance chain network, and each transaction recipient corresponds to a target channel in the alliance chain network; different channels represent different businesses; The target middleman node generates a composite key including the key of the target middleman node according to its own key and each received transaction request, and adds the composite key to the transaction pool; The target middleman node queries multiple composite keys including the key of the target middleman node from the transaction pool, splits the multiple composite keys, and obtains transaction content included in each composite key and a target transaction recipient corresponding to each transaction content according to the splitting result; The target middleman node determines the first total transaction content of each target transaction recipient, and sends a processing success notification to the client corresponding to each target transaction recipient; The client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, and conducts a transaction of the first total transaction content of the target transaction recipient.
2. The consortium chain high-concurrency cross-channel transaction processing method according to claim 1 is characterized in that: The client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification to conduct a transaction of the first total transaction content of the target transaction recipient, including: After the client calls the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, the target channel obtains the first total transaction content from the target middleman and sends the obtained first total transaction content to the target transaction recipient.
3. The high-concurrency cross-channel transaction processing method of the alliance chain according to claim 2 is characterized in that: Before the target channel obtains the first total transaction content from the target middleman, the method further includes: The target channel queries the transaction pool for a composite key including the key of the target transaction recipient, and splits the queried composite key to obtain transaction content; The target channel determines the second total transaction content of the target transaction recipient according to the split transaction content; The target channel obtains the first total transaction content from the target middleman, including: When the first total transaction content is the same as the second total transaction content, the target channel obtains the first total transaction content from the target intermediary.
4. The consortium chain high-concurrency cross-channel transaction processing method according to claim 1 is characterized in that: The target middleman node generates a composite key including the key of the target middleman node according to its own key and each received transaction request, including: For each transaction request received, the target middleman node concatenates the key of the target middleman node, the key of the transaction requester in the transaction request, the key of the transaction recipient, and the transaction content to obtain a composite key corresponding to the transaction request.
5. The consortium chain high-concurrency cross-channel transaction processing method according to claim 1 is characterized in that: The target middleman node queries the transaction pool for multiple composite keys including the key of the target middleman node, including: When the target middleman node does not add a composite key to the transaction pool within a first preset time period, the target middleman node queries the transaction pool for a plurality of composite keys including the key of the target middleman node.
6. The consortium chain high-concurrency cross-channel transaction processing method according to claim 1 is characterized in that: Before the target intermediary node queries the transaction pool for multiple composite keys including the key of the target intermediary node, the method further includes: The target middleman node queries the transaction pool for composite keys containing keys of the same middleman node at a preset frequency; Merge the composite keys containing the keys of the same middleman node to obtain a shared composite key; After all the shared composite keys of the transaction pool are obtained, the transaction pool is cleared and the shared composite keys are stored in the transaction pool.
7. The high-concurrency cross-channel transaction processing method of the alliance chain according to claim 1 is characterized in that: The target intermediary node determines the first total transaction content of each target transaction recipient, including: For each target transaction recipient, the target intermediary node superimposes multiple transaction contents corresponding to the target transaction recipient to obtain a first total transaction content of the target recipient.
8. The high-concurrency cross-channel transaction processing method of the alliance chain according to claim 1 is characterized in that: Before sending the transaction request to the target middleman node in the alliance chain network, the method further includes: The client sends the transaction request to a source channel corresponding to the transaction initiator in the transaction request; The source channel verifies the transaction request and feeds back the verification result to the client; The step of sending the transaction request to a target middleman node in the alliance chain network includes: When the verification result indicates that the verification is passed, the client sends the transaction request to a target middleman node in the alliance chain network.
9. A high-concurrency cross-channel transaction processing system for alliance chains, characterized in that: include: The client is used to provide an interface for users to interact with the alliance chain network, and to configure and manage the alliance chain network; The consortium chain network comprises: an intermediary institution, at least one source channel and at least one target channel; wherein the intermediary institution comprises at least one intermediary node, each of which is responsible for transaction transmission between a source channel and a corresponding target channel; the at least one intermediary node and the target channel share a transaction pool; each source channel comprises at least one transaction requester, and each target channel comprises at least one transaction receiver; The client is further used to initiate a transaction request according to a user operation, and send the transaction request to a target middleman node in the alliance chain network; the transaction request includes: a key of the transaction requester, a key of the transaction recipient, and transaction content; Each middleman node is used to generate a composite key containing the key of the middleman node according to its own key and each received transaction request, and add the composite key to the transaction pool; query multiple composite keys containing the key of the middleman node from the transaction pool, split the multiple composite keys, and obtain the transaction content contained in each composite key and the target transaction recipient corresponding to each transaction content according to the splitting result; determine the first total transaction content of each target transaction recipient, and send a processing success notification to the client corresponding to each target transaction recipient; The client is further used to call the smart contract on the target channel corresponding to the target transaction recipient according to the successful processing notification, and conduct a transaction of the first total transaction content of the target transaction recipient.
Citation Information
Patent Citations
Data processing method, device and equipment based on block chain and storage medium
CN110599181A
Drug cooperation and traceability system and method based on alliance chain
CN110766422A