CN112801665A - Cross-chain transaction method and system based on server relay - Google Patents

Cross-chain transaction method and system based on server relay Download PDF

Info

Publication number
CN112801665A
CN112801665A CN202110293735.8A CN202110293735A CN112801665A CN 112801665 A CN112801665 A CN 112801665A CN 202110293735 A CN202110293735 A CN 202110293735A CN 112801665 A CN112801665 A CN 112801665A
Authority
CN
China
Prior art keywords
transaction
chain
server
block chain
xtxi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110293735.8A
Other languages
Chinese (zh)
Other versions
CN112801665B (en
Inventor
陈昱晓
张朝栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing All Things Intelligent Chain Technology Co ltd
Original Assignee
Beijing All Things Intelligent Chain Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing All Things Intelligent Chain Technology Co ltd filed Critical Beijing All Things Intelligent Chain Technology Co ltd
Priority to CN202110293735.8A priority Critical patent/CN112801665B/en
Publication of CN112801665A publication Critical patent/CN112801665A/en
Application granted granted Critical
Publication of CN112801665B publication Critical patent/CN112801665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Abstract

The invention provides a cross-chain transaction method and a system based on server relay, wherein the method comprises the following steps: step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO; step 2, the server selects the block chain network state of the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation; likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation. The invention makes non-invasive multi-chain improvement on the alliance chain architecture on the basis of the alliance chain, namely, under the condition of ensuring that the bottom architecture is not modified, the traditional single chain architecture is expanded into the multi-chain architecture on the basis of the alliance chain, and a cross-chain communication scheme between chains is provided.

Description

Cross-chain transaction method and system based on server relay
Technical Field
The invention relates to the technical field of block chains, in particular to a cross-chain transaction method and a cross-chain transaction system based on server relay.
Background
The blockchain is originated from Bitcoin system (Bitcoin) proposed by the chinese smart, which operates in a large P2P network in the form of distributed append-only ledger. A standard block chain model can be composed of an application layer, a contract layer, a consensus layer, an excitation layer, a network layer and a data link layer from top to bottom, wherein the contract layer provides a self-defined intelligent contract for the upper application layer to call and develop; the consensus layer provides decentralized consensus protocols in the P2P network, such as workload proofs, practical Byzantine fault-tolerant algorithms, and the like; the incentive layer provides a mechanism for issuing and distributing currency in the system; the network layer provides a mechanism for message forwarding and message propagation in the P2P network; the data link layer contains transaction data and encryption techniques for the data, among other things.
In part, a negative influence brought by a decentralized consensus mechanism is that a block chain cannot provide high throughput rate and high expansibility, even if the number of block chain links is expanded, the improvement on the operation efficiency is limited, and the influence on the consensus speed is even negative along with the dynamic expansion of the number, so that the linear expansion cannot be realized; in addition, as the running time increases, the blockchain storage nodes risk data expansion, and one full node must carry all the account data of the blockchain, and may even exceed the upper limit of the storage medium on the single chain. The blockchain model is closed loop in the whole, as the number of blockchain items increases, the blockchain forms a value island, and the asset interest interaction between chains is very difficult and is often completed by an offline third party. In view of the above drawbacks, although the block chain is studied and implemented on a large scale, it is still unable to carry commercial application scenarios, and is almost unusable especially in large data, high concurrency, low latency scenarios.
The block chain is not possible to adopt a triangular theory, namely the block chain is difficult to simultaneously achieve three principles of decentralization, safety and transaction processing performance. The public chain has reliable guarantee on decentralization and safety, but has poor satisfaction on transaction processing performance; the private chain has considerable efficiency in transaction processing performance and security, but only unopened user nodes have read-write authority and are highly centralized. The federation chain is a block chain between the public chain and the private chain, can guarantee safety and transaction processing performance, and is multicenter, that is, is managed by a plurality of homogeneous organizations and organizations. However, due to the limitation of model architecture of the blockchain, they all present a kind of league in transaction processing performance, and although the league chain and the private chain have advantages in performance compared with the public chain, their throughput and concurrency are not satisfactory in the overall internet environment.
The impossible triangle theory of the block chain model and the block chain shows that the block chain system with high performance and large capacity is impossible to break through under the existing single chain structure, and the bottom layer data structure of the block chain system needs to be modified or the top layer framework needs to be transversely expanded.
Most of the current block chain cross-chain platforms in the industry are public chains, and probably the alliance chain cross-chain technology is not open. Each cross-chain platform is mainly used for opening information isolated islands of block chains on different services, namely, closed-loop block chains are opened to enable the closed-loop block chains to be capable of communicating with each other, but the closed-loop block chains have differences in internal architecture and implementation, and have the problems of performance bottlenecks and insufficient throughput.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a cross-link transaction method and system based on server relay, which can improve the performance bottleneck of the system while realizing cross-link transaction.
The technical scheme adopted by the invention is that in the server relay-based cross-link transaction method, the whole block link network is divided into a plurality of independent block links in an alliance link form, and the method comprises the following steps:
step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO;
step 2, the server selects the block chain network state of the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation;
likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation.
As is well known in the art, the resource that was used as the transaction input XTXI in this transaction is derived from the resource that was used as the transaction output XTXO in the previous transaction.
Optionally, the XTXI header information includes: server write to process previous transaction of same resource: the server processes a timestamp and a self-increment sequence of a previous transaction, wherein the self-increment sequence is used for distinguishing different processed resources in the same timestamp;
in the step 2, the server selects a blockchain network state of the XTXI, and traces the XTXI to a corresponding blockchain in a hash manner according to the selected blockchain network state, including:
the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXI, and routes the XTXI to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information;
the fragment group component information is all the block chain information in the block chain network within a period of time, and once the number of the block chains within a certain period of time changes, new fragment group component information corresponding to the period of time is generated.
Optionally, the XTXI header information further includes: the federation number and machine number to which the server processing the previous transaction for the same resource belongs.
Optionally, the message header information of the XTXO includes: the server processing the transaction of the same resource writes: the server processes the timestamp and the self-increment sequence of the transaction;
in the step 2, allocating the XTXO to a corresponding block chain, comprising:
and the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXO, and routes the XTXO to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information.
Optionally, the message header information of the XTXO further includes: and processing the alliance number and the machine number of the server of the same resource in the transaction.
Optionally, routing the decomposed transaction to a corresponding blockchain by using a consistent hash algorithm includes:
performing hash calculation on packet header information of decomposed transaction to obtain a target hash value, clockwise finding a virtual node in a hash ring according to the target hash value, wherein the hash value of the virtual node is a latest hash value larger than the target hash value, and if no hash value larger than the target hash value exists, continuously clockwise finding a virtual node corresponding to a next, namely a smallest first hash value in the hash ring; the real node corresponding to the virtual node is the found block chain; the hash ring is a virtual ring formed by the whole hash value space, the hash value of the virtual node is also in the ring, and the virtual node and the real node are in a many-to-one relationship.
Optionally, the method further includes:
step 3, the server regularly records the newly and successfully processed cross-link transaction on a newly added node of the linked list in a linked list mode in the memory of the server;
the step 2 further comprises: before the server selects the block chain network state of the XTXI, the XTXI is subjected to double-pattern verification based on cross-chain transactions recorded in a memory.
Optionally, step 3 further includes:
when the number of the existing nodes in the linked list of the memory reaches a set number, the server verifies the cross-link transaction data recorded on the existing nodes, and after the verification is passed, the existing nodes are deleted from the linked list to release the memory space; the set number is the maximum number of consecutive nodes that ensure that double flowers do not occur for the same transaction.
Optionally, the method further includes:
step 4, the server carries out the following compatible processing on the intra-chain transaction request:
when the server receives an intra-chain transaction request, intra-chain transactions in the intra-chain transaction request are decomposed to obtain transaction input and transaction output, block chain network state selection is conducted on the transaction input and the transaction output obtained through decomposition, routing is conducted to the same corresponding block chain in a hash mode according to the selected block chain network state, and asset migration operation is conducted on the same block chain based on all decomposed transactions of the intra-chain transactions.
The invention also provides a cross-chain transaction system based on server relay, wherein the whole blockchain network is divided into a plurality of independent blockchains in a alliance chain form, and the system comprises: a server and more than two of the blockchains, wherein,
the server is configured to decompose a cross-chain transaction in the received cross-chain transaction request to obtain a decomposed transaction, where the decomposed transaction includes: a transaction input XTXI and a transaction output XTXO;
the server is further used for selecting the block chain network state of the XTXI, and tracing the XTXI to the corresponding block chain in a hash mode according to the selected block chain network state so as to execute asset locking operation; similarly, the XTXO is allocated to the corresponding block chain;
the block chain is used for performing locking operation on the assets of the XTXI from source tracing and performing asset releasing operation on the XTXO allocated.
By adopting the technical scheme, the invention at least has the following advantages:
the invention relates to a cross-chain transaction method and a system based on server relay, which are characterized in that a non-invasive multi-chain improvement is carried out on an alliance chain architecture on the basis of an alliance chain, namely, under the condition that the bottom architecture of the alliance chain is not modified, the traditional single-chain architecture is expanded into the multi-chain architecture based on the alliance chain, a cross-chain communication scheme between chains is provided, the throughput rate of processing transactions by the alliance chain is improved, the storage capacity of a single node is reduced, an alliance chain isolated island is opened, the expandability of the whole system of the alliance chain is increased, and an alliance chain cross-chain consensus platform, namely a server in the invention can bear large data and high-concurrency commercial application scenes.
Drawings
FIG. 1 is a flowchart of a server relay-based cross-link transaction method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a server relay-based cross-link transaction method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a server relay-based cross-link transaction method according to a third embodiment of the present invention;
fig. 4 is a schematic composition diagram of a server relay-based cross-link transaction system according to a fourth embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the intended purpose, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
The invention discloses a cross-chain transaction method based on server relay, wherein the whole block chain network is divided into a plurality of independent block chains in an alliance chain form, also called consensus block chain or consensus single chain, consensus is achieved inside the consensus single chain through a consensus algorithm and does not interact with other consensus single chains to form a single closed loop, and each consensus single chain is responsible for partial transaction and processes core data of the consensus single chain.
As shown in fig. 1, the method includes:
step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO;
step 2, the server selects the block chain network state of the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation; likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation.
As is well known in the art, the resource that was used as the transaction input XTXI in this transaction is derived from the resource that was used as the transaction output XTXO in the previous transaction.
Optionally, the XTXI header information includes: server write to process previous transaction of same resource: the server processes a timestamp and a self-increment sequence of a previous transaction, wherein the self-increment sequence is used for distinguishing different processed resources in the same timestamp;
in the step 2, the server selects a blockchain network state of the XTXI, and traces the XTXI to a corresponding blockchain in a hash manner according to the selected blockchain network state, including:
the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXI, and routes the XTXI to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information;
the fragment group component information is all the block chain information in the block chain network within a period of time, and once the number of the block chains within a certain period of time changes, new fragment group component information corresponding to the period of time is generated.
Optionally, the XTXI header information further includes: the federation number and machine number to which the server processing the previous transaction for the same resource belongs.
Optionally, the message header information of the XTXO includes: the server processing the transaction of the same resource writes: the server processes the timestamp and the self-increment sequence of the transaction;
in the step 2, allocating the XTXO to a corresponding block chain, comprising:
and the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXO, and routes the XTXO to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information.
Optionally, the message header information of the XTXO further includes: and processing the alliance number and the machine number of the server of the same resource in the transaction.
Further, no matter whether the decomposed transaction is XTXI or XTXO, the decomposed transaction is routed to the corresponding blockchain by using a consistent hash algorithm, which specifically includes:
performing hash calculation on packet header information of decomposed transaction to obtain a target hash value, clockwise finding a virtual node in a hash ring according to the target hash value, wherein the hash value of the virtual node is a latest hash value larger than the target hash value, and if no hash value larger than the target hash value exists, continuously clockwise finding a virtual node corresponding to a next, namely a smallest first hash value in the hash ring; the real node corresponding to the virtual node is the found block chain; the hash ring is a virtual ring formed by the whole hash value space, the hash value of the virtual node is also in the ring, and the virtual node and the real node are in a many-to-one relationship.
In a second embodiment of the present invention, a server relay-based cross-link transaction method, where an entire blockchain network is divided into a plurality of blockchains in an independent alliance chain form, as shown in fig. 2, the method includes:
step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO;
step 2, the server selects the block chain network state of the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation; likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation.
Preferably, a blockchain verifies double flowers for the XTXI before performing an asset lock operation.
Step 3, the server regularly records the newly and successfully processed cross-link transaction on a newly added node of the linked list in a linked list mode in the memory of the server; preferably, the linked list is a bi-directional linked list.
The step 2 further comprises: before the server selects the block chain network state of the XTXI, the XTXI is subjected to double-pattern verification based on cross-chain transactions recorded in a memory.
Optionally, step 3 further includes:
when the number of the existing nodes in the linked list of the memory reaches a set number, the server verifies the cross-link transaction data recorded on the existing nodes, and after the verification is passed, the existing nodes are deleted from the linked list to release the memory space; the set number is the maximum number of consecutive nodes that ensure that double flowers do not occur for the same transaction.
The embodiment of the present invention is substantially the same as the first embodiment, and the difference is that the server of the present embodiment completely records the processed cross-link transaction in the memory in the form of a linked list, and although the server is not a real block chain, the present embodiment simulates the principle of a block chain, and stores the cross-link transaction data in the form of a linked list, which not only breaks through the performance bottleneck of the block chain, but also makes it possible to prune the stored linked list in the memory periodically to avoid the overlarge range of the data stored in the memory.
Because the server needs to accurately verify whether double flowers exist in each cross-chain transaction, the server is required to store full ledger information, namely all transaction information, so as to avoid double flowers. Because the cross-link transaction information is stored in the memory, and the memory capacity is limited, the server cannot really store the full account book information in actual operation, and does not need to really store the full account book information, because the information books are stored on respective block chains and do not need to be redundantly stored. Therefore, pruning operation needs to be performed on the full ledger in the memory. The pruning mode is as follows: every other cycle, the server will create a Check Point (Check Point), if the transaction data on the doubly linked list node before the Check Point passes the transaction verification of the server, that is, the server will determine whether the transaction is a double-flower transaction, and whether the cross-chain transaction has completed asset locking and releasing. The linked list nodes before the period can be dequeued and discarded, so that pruning is performed to avoid the overlarge range of the stored data in the memory. The link list nodes for the discarded record cross-link transaction are not truly discarded, only the memory is removed and the link list nodes are not verified in the next period, according to the service requirement, the link list nodes can be stored as historical records for verification and analysis, and a low-priority thread is generally added to a file in an appending mode. The underlying logic of pruning is "double-flower" which is impossible to be repeatedly consumed at times other than one cycle, and if the two double-flower times are separated by one cycle, then it can be identified that the pruning is actually easy to route to the blockchain. It can also be seen that the flow of the server processing the "double flower" transaction is actually a pre-process, since the server does not contain the full ledger information, it can only identify the "double flower" transaction within a period, and the double flower transaction beyond a period is missed, but this is not essential, since the blockchain is also identified. The preprocessing here is only to speed up the response speed and avoid unnecessary communication and processing overhead.
In a third embodiment of the present invention, a server relay-based cross-link transaction method, where an entire blockchain network is divided into a plurality of independent blockchains in a federation chain form, as shown in fig. 3, the method includes:
step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO;
step 2, the server firstly performs double-pattern verification on the XTXI based on cross-chain transactions recorded in a memory, then performs block chain network state selection on the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation; likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation.
Step 3, the server regularly records the newly and successfully processed cross-link transaction on a newly added node of the linked list in a linked list mode in the memory of the server;
step 4, the server carries out the following compatible processing on the intra-chain transaction request:
when the server receives an intra-chain transaction request, intra-chain transactions in the intra-chain transaction request are decomposed to obtain transaction input and transaction output, block chain network state selection is conducted on the transaction input and the transaction output obtained through decomposition, routing is conducted to the same corresponding block chain in a hash mode according to the selected block chain network state, and asset migration operation is conducted on the same block chain based on all decomposed transactions of the intra-chain transactions.
The embodiment of the present invention is substantially the same as the second embodiment, except that in this embodiment, the server is also compatible with processing intra-chain transactions, which is similar in principle to processing inter-chain transactions, except that since the transactions occur within the same blockchain, the release operation is not performed after the lock is performed, but the asset migration is performed directly from the blockchain.
In a fourth embodiment of the present invention, a server relay-based inter-chain transaction system, where an entire blockchain network is divided into a plurality of independent blockchains in a federation chain form, as shown in fig. 4, includes: a server 100 and more than two of the blockchains 200, wherein,
the server 100 is configured to decompose a cross-chain transaction in the received cross-chain transaction request to obtain a decomposed transaction, where the decomposed transaction includes: a transaction input XTXI and a transaction output XTXO;
the server 100 is further configured to select a blockchain network state of the XTXI, and trace the XTXI to a corresponding blockchain 200 by means of hash according to the selected blockchain network state to perform an asset locking operation; similarly, the XTXO is then allocated to the corresponding block chain 200;
the blockchain 200 is used to perform a lock operation on the asset of the XTXI from source tracing and perform an asset release operation on the XTXO from allocation.
In this embodiment, the functions performed by the server 100 and the blockchain 200 may be the same as those performed by the server and the blockchain in the first, second, or third embodiments, so as to form systems with different implementation schemes.
Preferably, in order to improve the processing efficiency, the server 100 and the blockchain 200 may each interact with the outside world through their corresponding proxy gateways. The server 100 can further be divided into two roles of a master server and a slave server, transaction decomposition and division of transaction routing are performed, a cross-chain transaction request can be responded more efficiently, and when the number of the cross-chain transaction requests is large, the cross-chain transaction requests can be temporarily stored and distributed to the servers in a message queue cluster and load balancing router mode, so that peak clipping and valley filling of flow are achieved.
In terms of engineering implementation, the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. With this understanding in mind, the method of the present invention may be embodied in the form of a computer software product stored on a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and including instructions for causing a device (e.g., a network device such as a base station) to perform the method of the present invention.
While the invention has been described in connection with specific embodiments thereof, it is to be understood that it is intended by the appended drawings and description that the invention may be embodied in other specific forms without departing from the spirit or scope of the invention.

Claims (10)

1. A server relay based cross-link transaction method, wherein an entire blockchain network is divided into a plurality of independent blockchains in a federation chain form, the method comprising:
step 1, a server decomposes a cross-chain transaction in a received cross-chain transaction request to obtain a decomposed transaction, wherein the decomposed transaction comprises: a transaction input XTXI and a transaction output XTXO;
step 2, the server selects the block chain network state of the XTXI, and traces the XTXI to a corresponding block chain in a hash way according to the selected block chain network state so as to execute asset locking operation;
likewise, the XTXO is assigned to a corresponding block chain to perform an asset release operation.
2. The method of claim 1, wherein the XTXI header information comprises: server write to process previous transaction of same resource: the server processes a timestamp and a self-increment sequence of a previous transaction, wherein the self-increment sequence is used for distinguishing different processed resources in the same timestamp;
in the step 2, the server selects a blockchain network state of the XTXI, and traces the XTXI to a corresponding blockchain in a hash manner according to the selected blockchain network state, including:
the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXI, and routes the XTXI to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information;
the fragment group component information is all the block chain information in the block chain network within a period of time, and once the number of the block chains within a certain period of time changes, new fragment group component information corresponding to the period of time is generated.
3. The method of claim 2, wherein the XTXI header information further comprises: the federation number and machine number to which the server processing the previous transaction for the same resource belongs.
4. The method of claim 2, wherein the header information of the XTXO comprises: the server processing the transaction of the same resource writes: the server processes the timestamp and the self-increment sequence of the transaction;
in the step 2, allocating the XTXO to a corresponding block chain, comprising:
and the server determines corresponding fragment component information according to the timestamp in the message header information of the XTXO, and routes the XTXO to a corresponding block chain by adopting a consistent Hash algorithm on the basis of the determined fragment component information.
5. The method of claim 4, wherein the XTXO's header information further comprises: and processing the alliance number and the machine number of the server of the same resource in the transaction.
6. The method of claim 2 or 4, wherein routing the resolved transaction to the corresponding blockchain using a consistent hash algorithm comprises:
performing hash calculation on packet header information of decomposed transaction to obtain a target hash value, clockwise finding a virtual node in a hash ring according to the target hash value, wherein the hash value of the virtual node is a latest hash value larger than the target hash value, and if no hash value larger than the target hash value exists, continuously clockwise finding a virtual node corresponding to a next, namely a smallest first hash value in the hash ring; the real node corresponding to the virtual node is the found block chain; the hash ring is a virtual ring formed by the whole hash value space, the hash value of the virtual node is also in the ring, and the virtual node and the real node are in a many-to-one relationship.
7. The method of claim 1, further comprising:
step 3, the server regularly records the newly and successfully processed cross-link transaction on a newly added node of the linked list in a linked list mode in the memory of the server;
the step 2 further comprises: before the server selects the block chain network state of the XTXI, the XTXI is subjected to double-pattern verification based on cross-chain transactions recorded in a memory.
8. The method of claim 7, wherein step 3 further comprises:
when the number of the existing nodes in the linked list of the memory reaches a set number, the server verifies the cross-link transaction data recorded on the existing nodes, and after the verification is passed, the existing nodes are deleted from the linked list to release the memory space; the set number is the maximum number of consecutive nodes that ensure that double flowers do not occur for the same transaction.
9. The method of claim 1, further comprising:
step 4, the server carries out the following compatible processing on the intra-chain transaction request:
when the server receives an intra-chain transaction request, intra-chain transactions in the intra-chain transaction request are decomposed to obtain transaction input and transaction output, block chain network state selection is conducted on the transaction input and the transaction output obtained through decomposition, routing is conducted to the same corresponding block chain in a hash mode according to the selected block chain network state, and asset migration operation is conducted on the same block chain based on all decomposed transactions of the intra-chain transactions.
10. A server relay based cross-chain transaction system, wherein the entire blockchain network is divided into a plurality of blockchains in the form of independent alliance chains, the system comprising: a server and more than two of the blockchains, wherein,
the server is configured to decompose a cross-chain transaction in the received cross-chain transaction request to obtain a decomposed transaction, where the decomposed transaction includes: a transaction input XTXI and a transaction output XTXO;
the server is further used for selecting the block chain network state of the XTXI, and tracing the XTXI to the corresponding block chain in a hash mode according to the selected block chain network state so as to execute asset locking operation; similarly, the XTXO is allocated to the corresponding block chain;
the block chain is used for performing locking operation on the assets of the XTXI from source tracing and performing asset releasing operation on the XTXO allocated.
CN202110293735.8A 2021-03-19 2021-03-19 Cross-chain transaction method and system based on server relay Active CN112801665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110293735.8A CN112801665B (en) 2021-03-19 2021-03-19 Cross-chain transaction method and system based on server relay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110293735.8A CN112801665B (en) 2021-03-19 2021-03-19 Cross-chain transaction method and system based on server relay

Publications (2)

Publication Number Publication Date
CN112801665A true CN112801665A (en) 2021-05-14
CN112801665B CN112801665B (en) 2021-08-24

Family

ID=75817206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110293735.8A Active CN112801665B (en) 2021-03-19 2021-03-19 Cross-chain transaction method and system based on server relay

Country Status (1)

Country Link
CN (1) CN112801665B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028989A (en) * 2023-03-27 2023-04-28 北京笔新互联网科技有限公司 Block chain verification method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413175A (en) * 2018-10-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of information processing method, device and electronic equipment
CN110063041A (en) * 2016-12-21 2019-07-26 区块链控股有限公司 Computer-implemented system and method for implementing complex functionality on blockchains while preserving security-based restrictions on script size and opcode limits
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain
CN111127017A (en) * 2019-12-27 2020-05-08 四川星际荣威科技有限公司 Block chain full-fragmentation method and device based on P2P storage network and multi-layer architecture
CN111181715A (en) * 2019-12-30 2020-05-19 杭州云象网络技术有限公司 Multi-party cross-linking method based on consistent Hash consensus protocol
CN111461889A (en) * 2020-04-20 2020-07-28 同济大学 Cross-chain transaction system, method and storage medium for alliance blockchain
CN111736963A (en) * 2020-06-08 2020-10-02 中国科学院计算技术研究所 Transaction processing system and method for backbone-free multi-partition blockchain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110063041A (en) * 2016-12-21 2019-07-26 区块链控股有限公司 Computer-implemented system and method for implementing complex functionality on blockchains while preserving security-based restrictions on script size and opcode limits
CN109413175A (en) * 2018-10-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of information processing method, device and electronic equipment
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain
CN111127017A (en) * 2019-12-27 2020-05-08 四川星际荣威科技有限公司 Block chain full-fragmentation method and device based on P2P storage network and multi-layer architecture
CN111181715A (en) * 2019-12-30 2020-05-19 杭州云象网络技术有限公司 Multi-party cross-linking method based on consistent Hash consensus protocol
CN111461889A (en) * 2020-04-20 2020-07-28 同济大学 Cross-chain transaction system, method and storage medium for alliance blockchain
CN111736963A (en) * 2020-06-08 2020-10-02 中国科学院计算技术研究所 Transaction processing system and method for backbone-free multi-partition blockchain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028989A (en) * 2023-03-27 2023-04-28 北京笔新互联网科技有限公司 Block chain verification method and device

Also Published As

Publication number Publication date
CN112801665B (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN110033243B (en) Main chain evidence storing method, system and storage medium based on block chain intelligent contract
WO2020043048A1 (en) Parallel chain data synchronization method, device, and storage medium
CN108062672A (en) A kind of process dispatch method based on block chain intelligence contract
CN111144883B (en) Processing performance analysis method and device for blockchain network
CN111400112B (en) Writing method and device of storage system of distributed cluster and readable storage medium
CN108376106A (en) A kind of block chain message feedback method and system
CN104346373B (en) Subregion journal queue synchronization management method and equipment
CN112887380B (en) Cross-chain intercommunication method and system
CN112835977B (en) Database management method and system based on block chain
CN110704438B (en) Method and device for generating bloom filter in blockchain
CN108062243A (en) Generation method, task executing method and the device of executive plan
CN109194646A (en) A kind of safety certification data access method based on block chain
WO2021047541A1 (en) Method and device for obtaining transaction dependency relationship in blockchain
CN110839056B (en) Data processing method and device based on block chain and node network
CN110351286A (en) Link flood attack detects response mechanism in a kind of software defined network
CN110087250A (en) A kind of network slice layout scheme and its method based on multiple target combined optimization model
CN110008206A (en) A kind of data processing method and device based on block catenary system
CN108833610A (en) A kind of information updating method, apparatus and system
CN112801665B (en) Cross-chain transaction method and system based on server relay
CN110113406A (en) Based on distributed calculating service cluster frame
CN113568577A (en) Distributed packet storage method based on alliance block chain
CN109658249A (en) A kind of block chain performance optimization method
CN115065690A (en) Decentralized system and method based on different heterogeneous instruction sets
CN110535697B (en) Method for balancing block chain cross-domain broadcast network load
CN111460038A (en) Quasi-real-time data synchronization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant